Security Education Companion
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Fix error on /articles Nov 16, 2018
bin
config Add previews Oct 10, 2018
db Add flag for marking materials originating from third parties Oct 22, 2018
lib
log
nginx Store uploads in project root, volumize separately from public/ Nov 15, 2017
public
spec Use active_preview gem Nov 8, 2018
test Autofix linting errors Oct 6, 2017
tmp Init rails site Oct 2, 2017
vendor
.dockerignore
.env.example
.gitignore
.rspec
.rubocop.yml
.sass-lint.yml
.travis.yml Install chromedriver using gem helper Apr 9, 2018
Dockerfile
Gemfile
Gemfile.lock Upgrade rack and loofah Nov 15, 2018
LICENSE.txt
README.md Add local Production testing instructions to README May 4, 2018
Rakefile Autofix linting errors Oct 6, 2017
config.ru Autofix linting errors Oct 6, 2017
docker-compose.yml.example Support pdf generation from persistent chrome process Apr 20, 2018
entrypoint.sh Remove wicked_pdf, render PDFs with chrome headless Apr 10, 2018
package.json Switch to html-pdf-chrome for pdf creation Apr 19, 2018
yarn.lock

README.md

Security Education Companion build Status

Development with Docker

$ cp .env.example .env
$ cp docker-compose.yml.example docker-compose.yml
$ docker-compose up --build -d
$ docker-compose exec app rake db:setup

After running rake db:setup you can navigate to http://localhost:3000/admin and log in using:

Running browser tests from within Docker is not currently supported. See #477 for more information.

Development without Docker

  • Install Ruby, Rails, and other gems the usual way.
  • install Yarn and run yarn install to install Javascript dependencies.
  • If you don't already have it, install or Chrome or Chromium for browser tests, eg sudo apt install chromium-browser.

Local Testing

It is sometimes useful to test the production environment locally. You can do this by setting DISABLE_SSL = true in .env, and then using RAILS_ENV=production:

$ RAILS_ENV=production bundle exec rspec
$ RAILS_ENV=production bundle exec rails c
$ RAILS_ENV=production bundle exec rails s