Skip to content
Snippets Groups Projects
Commit c17e4a06 authored by iaibrys's avatar iaibrys
Browse files

Merge branch 'develop'

* develop: (540 commits)
  Dummy change to pick up new feedbackjs
  Fix issues with pdf rendering and admin index.
  Fix issue with edit button in admin page not working.
  Fix issue with edit icons.
  Small updates
  Build feedback.js in Dockerfile
  Update project depedencies
  Resolve "The feedback widget is very slow"
  Fix DB.
  Fix test issues.
  Feature/remove coffeescript
  Move coffeescript to ES6; add webpack
  Tweak url
  Add button for filemanager. resolves #231
  $CI_COMMIT_REF_SLUG -> $CI_COMMIT_REF_NAME
  Add production deploy to CI
  Add user to logging.
  Resolve "Filesystem restructure after git removal"
  fix test script
  Fix typo.
  ...

# Conflicts:
#	.gitlab-ci.yml
parents 18eaca65 e276db20
Branches master
No related tags found
No related merge requests found
Pipeline #375 passed
---
engines:
brakeman:
enabled: true
bundler-audit:
enabled: true
csslint:
enabled: true
coffeelint:
enabled: true
duplication:
enabled: true
config:
languages:
ruby:
mass_threshold: 24
javascript:
python:
php:
eslint:
enabled: true
fixme:
enabled: true
rubocop:
enabled: true
ratings:
paths:
- Gemfile.lock
- "**.erb"
- "**.haml"
- "**.rb"
- "**.rhtml"
- "**.slim"
- "**.css"
- "**.coffee"
- "**.inc"
- "**.js"
- "**.jsx"
- "**.module"
- "**.php"
- "**.py"
exclude_paths:
- ./config/
- ./node_modules/
- ./spec/
- ./test/
- ./vendor/
- ./dtu-core/
- ./bin/
- ./public/
- ./pdfjs/
- ./app/assets/javascripts/mathjax.js
- ./app/assets/javascripts/mathjax-editing.js
- ./app/assets/javascripts/json-stringify-safe.js
- ./app/assets/javascripts/edit-page.js
- ./app/assets/stylesheets/base.css
--exclude-exts=.min.css
--ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes
README.md
README.rdoc
**/.git
**/.gitignore
**/.idea
**/node_modules
LICENSE
tmp/
log/
**/*.sqlite3
vendor/assets/components/
public/assets/
**/.codeclimate.yml
**/.csslintrc
**/.rubocop.yml
**/.eslintrc.yml
**/.eslintignore
**/coffeelint.json
**/*{.,-}min.js
node_modules/
deps/**/*
assets/**/*
public/**/*
/*.js
module.exports = {
"extends": ["eslint:recommended", "airbnb-base"],
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jquery": true
},
"globals": {
},
rules: {
'no-console': 'off',
"no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
"class-methods-use-this": 'off',
"no-param-reassign": 'off',
"max-len": ["error", 120, 2],
},
};
pdf.js
.idea
node_modules
log
*.log
**/*.log
tmp
db/*.sqlite3
/external.env
vendor/assets/components
public/assets/
public/vendor/
public/assets/Exercise*.md
public/assets/parse-errors.html
public/assets/podcasts_static.html
public/assets/Agendas.md
spec/files/data
spec/files/test_file*.json
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
image: docker:stable
services:
- docker:dind
stages: stages:
- test
- build - build
- test
- release
- deploy - deploy
variables:
DOCKER_DRIVER: overlay2
CONTAINER_IMAGE: lab.compute.dtu.dk:5005/$CI_PROJECT_PATH
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- echo docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
test: test:
tags:
- enote-shell
stage: test stage: test
script: echo "Running tests" script:
- echo "Running tests"
- echo docker run $CONTAINER_TEST_IMAGE ./scripts/run-tests.sh
- docker pull $CONTAINER_TEST_IMAGE
- docker run $CONTAINER_TEST_IMAGE ./scripts/run-tests.sh
build: build:
tags:
- enote-shell
stage: build stage: build
script: script:
- echo "Building the app" - echo "Building the app"
- ls -als - echo docker build --tag $CONTAINER_TEST_IMAGE .
- docker build --tag $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE
release-image:
tags:
- enote-shell
stage: release
script:
- echo "Releasing image ${CONTAINER_TEST_IMAGE} as ${CONTAINER_RELEASE_IMAGE}"
- docker pull $CONTAINER_TEST_IMAGE
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
- docker images | grep ${CI_PROJECT_PATH}
- docker push $CONTAINER_RELEASE_IMAGE
deploy: deploy_devel:
tags:
- deploy-devel
stage: deploy stage: deploy
script: echo "deploying" script:
- echo "Deploy to development server"
- cd /enote/src/dtu-enote
- echo docker stop course_website
- ../../gen/docker-stop.sh
- docker-compose -f ../../gen/docker-compose-enote.yml pull
- ../../gen/docker-start.sh
- docker ps -q -f status=exited | xargs -I '{}' docker rm -f '{}'
- docker ps -q -f status=dead | xargs -I '{}' docker rm -f '{}'
- echo docker pull $CONTAINER_RELEASE_IMAGE
- docker images | grep ${CI_PROJECT_PATH}
- echo bundle exec rake deploy:redeploy[dtu-enote-website]
- docker image prune -f
environment:
name: develop
url: https://enote-devel3.compute.dtu.dk
only:
- develop
deploy_production:
tags:
- deploy-prod-2019
stage: deploy
script:
- echo "Deploy to ${CI_BUILD_REF_SLUG} server"
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- cd /enote/src/dtu-enote
- ../../gen/docker-stop.sh
- docker-compose -f ../../gen/docker-compose-enote.yml pull
- docker images | grep ${CI_PROJECT_PATH}
- ../../gen/docker-start.sh
- docker ps -q -f status=exited | xargs -I '{}' docker rm -f '{}'
- docker ps -q -f status=dead | xargs -I '{}' docker rm -f '{}'
- docker image prune -f
environment:
name: production
url: https://quiz.compute.dtu.dk
only:
- release-2019.0
[submodule "deps/dtu-core"]
path = deps/dtu-core
url = https://lab.compute.dtu.dk/enote/dtu-enote-core.git
[submodule "deps/dtu-quiz-parser"]
path = deps/dtu-quiz-parser
url = https://lab.compute.dtu.dk/enote/dtu-quiz-parser.git
[submodule "deps/pdfjs"]
path = deps/pdfjs
url = https://lab.compute.dtu.dk/enote/dtu-enote-pdfjs.git
[submodule "deps/feedbackjs"]
path = deps/feedbackjs
url = https://lab.compute.dtu.dk/enote/feedback.git
**/*{.,-}min.js
node_modules/**/*
deps/**/*
assets/**/*
public/**/*
{
/*
* ENVIRONMENTS
* =================
*/
// Define globals exposed by modern browsers.
"browser": true,
// Define globals exposed by jQuery.
"jquery": true,
// Define globals exposed by Node.js.
"node": true,
// Allow ES6.
"esversion": 6,
/*
* ENFORCING OPTIONS
* =================
*/
// Force all variable names to use either camelCase style or UPPER_CASE
// with underscores.
"camelcase": true,
// Prohibit use of == and != in favor of === and !==.
"eqeqeq": true,
// Enforce tab width of 2 spaces.
"indent": 2,
// Prohibit use of a variable before it is defined.
"latedef": true,
// Enforce line length to 100 characters
"maxlen": 100,
// Require capitalized names for constructor functions.
"newcap": true,
// Enforce use of single quotation marks for strings.
"quotmark": "single",
// Enforce placing 'use strict' at the top function scope
"strict": true,
// Prohibit use of explicitly undeclared variables.
"undef": true,
// Warn when variables are defined but never used.
"unused": true,
/*
* RELAXING OPTIONS
* =================
*/
// Suppress warnings about == null comparisons.
"eqnull": true
}
.rspec 0 → 100644
--color
--require spec_helper
GlobalVars:
AllowedVariables:
- $redis
- $worker_redis
- $redis_course_website
Metrics/LineLength:
Max: 160
Metrics/CyclomaticComplexity:
Max: 11
Metrics/PerceivedComplexity:
Max: 11
Metrics/ClassLength:
Max: 300
Metrics/MethodLength:
Max: 60
Metrics/AbcSize:
Max: 60
Metrics/BlockLength:
Max: 60
Style/AsciiComments:
Enabled: false
Metrics/ParameterLists:
CountKeywordArgs: false
AllCops:
DisplayCopNames: true
Exclude:
- '**/*.yml'
- 'db/**/*'
- 'config/**/*'
- 'test/**/*'
- 'doc/**/*'
- 'bin/**/*'
- 'node_modules/**/*'
FROM dtucompute/enote-base-ubuntu1804:v2019
ARG DEPENDENCY_HASH=1
ARG TZ=Europe/Copenhagen
ARG UID=1000
ARG GID=1000
EXPOSE 3000
ENV APP_ROOT /app
WORKDIR ${APP_ROOT}/
USER dtuuser
ENV CHOWN=dtuuser:dtugroup
#
# COURSE
#
LABEL "github"="https://github.com/dtu-compute/dtu-course-website"
LABEL version="2019"
LABEL description="This Dockerfile builds the container \
to house the DTU course website."
RUN sudo apt update
RUN sudo apt-get -y install redis
RUN sudo apt-get -y install imagemagick
RUN sudo apt-get -y install libsqlite3-dev
# https://github.com/yarnpkg/yarn/issues/3189
#RUN sudo apt-get remove cmdinstall
RUN sudo apt update
RUN sudo apt remove -y cmdtest
RUN sudo apt remove -y yarn
RUN sudo npm install -g yarn
RUN yarn --version
# Install the necessary gems
COPY deps ${APP_ROOT}/deps
COPY Gemfile ${APP_ROOT}/Gemfile
COPY Rakefile ${APP_ROOT}/Rakefile
COPY Gemfile ${APP_ROOT}/Gemfile.lock
RUN sudo chown ${CHOWN} Gemfile*
RUN sudo chown -R ${CHOWN} ${APP_ROOT}/deps
RUN bundle install --without development --binstubs
# Install client-side components
COPY package.json ${APP_ROOT}/package.json
COPY yarn.lock ${APP_ROOT}/yarn.lock
RUN sudo chown -R ${CHOWN} ~/.npm
RUN sudo chown -R ${CHOWN} ~/.config
RUN cd deps/feedbackjs && npm install && npm install gulp
RUN cd deps/feedbackjs && npm run build
RUN yarn install
# Add PDF.JS
RUN cd deps/pdfjs && \
npm install && \
npm install gulp && \
sudo npm install -g gulp && \
gulp generic && \
cd ${APP_ROOT}
# Copy application code to container
COPY ./app ${APP_ROOT}/app
COPY ./scripts ${APP_ROOT}/scripts
COPY ./deps ${APP_ROOT}/deps
COPY ./config ${APP_ROOT}/config
COPY ./db ${APP_ROOT}/db
COPY ./lib ${APP_ROOT}/lib
COPY ./bin ${APP_ROOT}/bin
COPY ./public-maintenance ${APP_ROOT}/public-maintenance
COPY ./spec ${APP_ROOT}/spec
COPY ./test ${APP_ROOT}/test
COPY maintenance.ru config.ru .rspec Procfile Rakefile postcss.config.js ${APP_ROOT}/
RUN sudo chown -R ${CHOWN} ${APP_ROOT}/spec/files
RUN sudo chown -R ${CHOWN} ${APP_ROOT}/db
RUN sudo chown -R ${CHOWN} ${APP_ROOT}/scripts
RUN mkdir -p ${APP_ROOT}/tmp
RUN mkdir -p ${APP_ROOT}/log
# Generate cookie key
RUN RAILS_ENV=production PRECOMPILE=1 bundle exec rake secret > ~/secret-key-base.txt
# RUN NODE_ENV=development yarn run webpack --config config/webpack/development.js
# RUN NODE_ENV=production yarn run webpack --config config/webpack/production.js
RUN RAILS_ENV=production PRECOMPILE=1 bundle exec rake assets:precompile --trace
CMD ["/bin/bash", "-l", "-c", "./scripts/run-server.sh 2>&1 | tee ${APP_ROOT}/log/run-server.log"]
Gemfile 0 → 100644
# frozen_string_literal: true
source 'https://rubygems.org'
ruby '2.5.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.4'
# gem 'sprockets', '3.6.3' # https://github.com/rails/sass-rails/issues/381
# gem 'sprockets', '~> 3.7'
gem 'sprockets','~> 4.0.0.beta8'
gem 'webpacker', '~> 4.x'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use less for stackedit stylesheets
gem 'less-rails'
gem 'therubyracer'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2.2'
gem 'listen', '= 3.1.1'
gem 'bower-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
# it also causes mysterious problems with MathJax
# gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 3.5.1'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
gem 'activemodel', '~> 5.1.4'
gem 'activerecord', '~> 5.1.4'
gem 'sqlite3', '~> 1.3.0'
gem 'dtu-core', path: 'deps/dtu-core'
gem 'quiz', path: 'deps/dtu-quiz-parser'
gem 'awesome_print', '~> 1.6', '>= 1.6.1'
# Web Stack
gem 'foreman', '~> 0.84.0'
gem 'rack-rewrite', '~> 1.5.1'
gem 'thin', '~> 1.7.2'
group :development, :test do
gem 'capybara'
gem 'guard-rspec'
gem 'pry'
gem 'rails-controller-testing'
gem 'rspec-core'
gem 'rspec-html-matchers'
gem 'rspec-rails', '~> 3.0'
gem 'rubocop', require: false
end
group :test do
gem 'database_cleaner'
#gem 'fakefs', git: '/Users/iain/Projects/enote/dtu-enote-installer/src/fakefs', branch: 'fix', require: 'fakefs/safe'
#gem 'fakefs', '~> 0.2', require: 'fakefs/safe'
gem 'fakefs', git: 'https://github.com/iainbryson/fakefs', branch: 'fix', require: 'fakefs/safe'
gem 'fakeredis', '~> 0.7', require: 'fakeredis/rspec'
end
gem 'rubycas-client', '~> 2.3.8', git: 'https://github.com/rubycas/rubycas-client'
gem 'nokogiri', '~> 1.8.5'
# redis
gem 'redis', '~> 3.2'
gem 'redis-namespace'
gem 'redis-rack-cache'
gem 'redis-rails'
# git for file manager
gem 'git', '>= 1.2.2'
gem 'responders', '~> 2.0'
gem 'font-awesome-rails', '~> 4.7.0.3'
gem 'lograge', '~> 0.4'
gem 'logstash-event'
gem 'datagrid', '~> 1.5'
gem 'kaminari'
gem 'addressable'
gem 'rest-client', '~> 2.0'
# Added at 2018-04-23 09:29:09 -0700 by iainbryson:
gem 'micro_magick', '~> 1.1'
# Added at 2018-06-09 09:16:14 +0200 by iainbryson:
gem 'i18n', '~> 0.9.5'
GIT
remote: https://github.com/iainbryson/fakefs
revision: a95feb1a38661fb388077e8a65f92670fe76366e
branch: fix
specs:
fakefs (0.20.0)
GIT
remote: https://github.com/rubycas/rubycas-client
revision: 7b67c8f1b5515ee4e28479d640d2da0a5aadfbe0
specs:
rubycas-client (2.3.10.rc1)
activesupport
PATH
remote: deps/dtu-core
specs:
dtu-auth2 (0.2018.01)
dtu-core (0.2019.01)
dtu-auth2 (~> 0.2018)
dtu-file-management (~> 0.2018)
rails (~> 5.1)
dtu-file-management (0.2018.01)
PATH
remote: deps/dtu-quiz-parser
specs:
quiz (0.2.0)
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.7)
actionpack (= 5.1.7)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.7)
actionpack (= 5.1.7)
actionview (= 5.1.7)
activejob (= 5.1.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.7)
actionview (= 5.1.7)
activesupport (= 5.1.7)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.7)
activesupport (= 5.1.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.7)
activesupport (= 5.1.7)
globalid (>= 0.3.6)
activemodel (5.1.7)
activesupport (= 5.1.7)
activerecord (5.1.7)
activemodel (= 5.1.7)
activesupport (= 5.1.7)
arel (~> 8.0)
activesupport (5.1.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
arel (8.0.0)
ast (2.4.0)
awesome_print (1.8.0)
bindex (0.7.0)
bower-rails (0.11.0)
builder (3.2.3)
capybara (3.18.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.2)
xpath (~> 3.2)
coderay (1.1.2)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
commonjs (0.2.7)
concurrent-ruby (1.1.5)
crass (1.0.4)
daemons (1.3.1)
database_cleaner (1.7.0)
datagrid (1.5.8)
rails (>= 4.0)
diff-lcs (1.3)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
erubi (1.8.0)
eventmachine (1.2.7)
execjs (2.7.0)
fakeredis (0.7.0)
redis (>= 3.2, < 5.0)
ffi (1.10.0)
font-awesome-rails (4.7.0.5)
railties (>= 3.2, < 6.1)
foreman (0.84.0)
thor (~> 0.19.1)
formatador (0.2.5)
git (1.5.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
guard (2.15.0)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-rspec (4.7.3)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.2)
jbuilder (2.8.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
json (1.8.6)
kaminari (1.1.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.1.1)
kaminari-activerecord (= 1.1.1)
kaminari-core (= 1.1.1)
kaminari-actionview (1.1.1)
actionview
kaminari-core (= 1.1.1)
kaminari-activerecord (1.1.1)
activerecord
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
less (2.6.0)
commonjs (~> 0.2.7)
less-rails (4.0.0)
actionpack (>= 4)
less (~> 2.6.0)
sprockets (>= 2)
libv8 (3.16.14.19)
listen (3.1.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9.7)
lograge (0.11.0)
actionpack (>= 4)
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
logstash-event (1.2.02)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.0.13)
mail (2.7.1)
mini_mime (>= 0.1.1)
method_source (0.9.2)
micro_magick (1.1.0)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331)
mini_mime (1.0.1)
mini_portile2 (2.3.0)
minitest (5.11.3)
multi_json (1.13.1)
nenv (0.3.0)
netrc (0.11.0)
nio4r (2.3.1)
nokogiri (1.8.5)
mini_portile2 (~> 2.3.0)
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
parallel (1.17.0)
parser (2.6.3.0)
ast (~> 2.4.0)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (3.0.3)
rack (2.0.7)
rack-cache (1.9.0)
rack (>= 0.4)
rack-proxy (0.6.5)
rack
rack-rewrite (1.5.1)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.1.7)
actioncable (= 5.1.7)
actionmailer (= 5.1.7)
actionpack (= 5.1.7)
actionview (= 5.1.7)
activejob (= 5.1.7)
activemodel (= 5.1.7)
activerecord (= 5.1.7)
activesupport (= 5.1.7)
bundler (>= 1.3.0)
railties (= 5.1.7)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.4)
actionpack (>= 5.0.1.x)
actionview (>= 5.0.1.x)
activesupport (>= 5.0.1.x)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.1.7)
actionpack (= 5.1.7)
activesupport (= 5.1.7)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (3.0.0)
rake (12.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
rdoc (4.3.0)
redis (3.3.5)
redis-actionpack (5.0.2)
actionpack (>= 4.0, < 6)
redis-rack (>= 1, < 3)
redis-store (>= 1.1.0, < 2)
redis-activesupport (5.0.7)
activesupport (>= 3, < 6)
redis-store (>= 1.3, < 2)
redis-namespace (1.6.0)
redis (>= 3.0.4)
redis-rack (2.0.5)
rack (>= 1.5, < 3)
redis-store (>= 1.2, < 2)
redis-rack-cache (2.0.2)
rack-cache (>= 1.6, < 2)
redis-store (>= 1.2, < 2)
redis-rails (5.0.2)
redis-actionpack (>= 5.0, < 6)
redis-activesupport (>= 5.0, < 6)
redis-store (>= 1.2, < 2)
redis-store (1.6.0)
redis (>= 2.2, < 5)
ref (2.0.0)
regexp_parser (1.4.0)
request_store (1.4.1)
rack (>= 1.4)
responders (2.4.1)
actionpack (>= 4.2.0, < 6.0)
railties (>= 4.2.0, < 6.0)
rest-client (2.0.2)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-html-matchers (0.9.1)
nokogiri (~> 1)
rspec (>= 3.0.0.a, < 4)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-rails (3.8.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubocop (0.68.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.6)
ruby-progressbar (1.10.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (0.4.2)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
shellany (0.0.1)
spring (2.0.2)
activesupport (>= 4.2)
sprockets (4.0.0.beta8)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thin (1.7.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.9)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.6)
unicode-display_width (1.5.0)
web-console (3.5.1)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
webpacker (4.0.2)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
xpath (3.2.0)
nokogiri (~> 1.8)
PLATFORMS
ruby
DEPENDENCIES
activemodel (~> 5.1.4)
activerecord (~> 5.1.4)
addressable
awesome_print (~> 1.6, >= 1.6.1)
bower-rails
capybara
coffee-rails (~> 4.2.2)
database_cleaner
datagrid (~> 1.5)
dtu-core!
fakefs!
fakeredis (~> 0.7)
font-awesome-rails (~> 4.7.0.3)
foreman (~> 0.84.0)
git (>= 1.2.2)
guard-rspec
i18n (~> 0.9.5)
jbuilder (~> 2.0)
kaminari
less-rails
listen (= 3.1.1)
lograge (~> 0.4)
logstash-event
micro_magick (~> 1.1)
nokogiri (~> 1.8.5)
pry
quiz!
rack-rewrite (~> 1.5.1)
rails (~> 5.1.4)
rails-controller-testing
redis (~> 3.2)
redis-namespace
redis-rack-cache
redis-rails
responders (~> 2.0)
rest-client (~> 2.0)
rspec-core
rspec-html-matchers
rspec-rails (~> 3.0)
rubocop
rubycas-client (~> 2.3.8)!
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
spring
sprockets (~> 4.0.0.beta8)
sqlite3 (~> 1.3.0)
therubyracer
thin (~> 1.7.2)
uglifier (>= 1.3.0)
web-console (~> 3.5.1)
webpacker (~> 4.x)
RUBY VERSION
ruby 2.5.1p57
BUNDLED WITH
1.16.6
web: bundle exec thin start -p $PORT
# Running the app with Docker
Hard restart/rebuild of the containers:
```
docker-compose -f docker-compose.prod.yml kill
docker-compose -f docker-compose.prod.yml build
docker-compose -f docker-compose.prod.yml kill
docker-compose -f docker-compose.prod.yml up -d
```
## Get the logs
Logs can be found either in the primary location:
```
docker cp coursewebsite_course_1:/dtu-course/app/log/production.log production.log
docker cp coursewebsite_course_1:/dtu-course/app/log/run-server.log run-server.log
```
Or in the shared volume location:
```
docker cp coursewebsite_course_1:/data/log/production.log production.log
docker cp coursewebsite_course_1:/data/log/run-server.log run-server.log
```
Or you can get the container logs:
### Rails app
```
docker logs coursewebsite_course_1 > course_container.log 2>&1
tail course_container.log
```
### Webserver
```
docker logs coursewebsite_nginx_1 > nginx_container.log 2>&1
tail nginx_container.log
```
Access Log:
```
docker cp coursewebsite_nginx_1:/var/log/nginx_access2.log nginx_access2.log
```
Error logs:
```
docker cp coursewebsite_nginx_1:/var/log/nginx_error2.log nginx_error2.log
```
## Simple errors checks:
Check for rake errors:
```
docker logs course_website | grep -A 5 -B 5 aborted!
```
```
docker logs course_website | grep -A 5 -B 5 ERROR
docker logs course_website | grep -A 5 -B 5 FATAL
```
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
Rails.application.load_tasks
---
engines:
csslint:
enabled: true
coffeelint:
enabled: true
duplication:
enabled: true
config:
languages:
ruby:
javascript:
exclude_paths:
- "./assets/javascripts/mathjax.js"
- "./assets/javascripts/edit-page.js"
- "**.js"
eslint:
enabled: true
exclude_paths:
- "assets/javascripts/mathjax.js"
- "assets/javascripts/edit-page.js"
- "**.js"
- "assets/javascripts/"
fixme:
enabled: true
rubocop:
enabled: true
ratings:
paths:
- "**.css"
- "**.coffee"
- "**.inc"
- "**.js"
- "**.jsx"
- "**.module"
- "**.php"
- "**.py"
- "**.rb"
exclude_paths:
- "assets/javascripts/mathjax.js"
- "assets/javascripts/edit-page.js"
- "**.js"
\ No newline at end of file
--exclude-exts=.min.css
--exclude=base.css
--ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment