⚠️ This repository is archived in favour of Rails template
bundle install
to install the gem dependenciesyarn
to install node dependenciesbin/rails db:setup
to set up the database development and test schemas, and seed with test databundle exec rails server
to launch the app on http://localhost:3000./bin/webpack-dev-server
in a separate shell for faster compilation of assetsbundle exec rake
bundle exec rspec
It's best to lint just your app directories and not those belonging to the framework, e.g.
bundle exec rubocop app config db lib spec Gemfile --format clang -a
or
bundle exec scss-lint app/webpacker/styles
make build-local-image
It relies heavily on caching. The first build may be slow and subsequent ones faster.
The docker image doesn't contain a default command. Any command can be appended:
% docker run -p 3001:3000 dfedigital/govuk-rails-boilerplate:latest rails -vT
rails about # List versions of all Rails frameworks and the environment
rails action_mailbox:ingress:exim # Relay an inbound email from Exim to Action Mailbox (URL and INGRESS_PASSWORD required)
...
Docker compose provides a default empty database to run rails in production mode.
docker-compose up
Open: http://localhost:3000
cf login -a api.london.cloud.service.gov.uk -u USERNAME
, USERNAME
is your personal GOV.UK PaaS account email addressbundle package --all
to vendor ruby dependenciesyarn
to vendor node dependenciesbundle exec rails webpacker:compile
to compile assetscf push
to push the app to Cloud Foundry Application RuntimeCheck the file manifest.yml
for customisation of name (you may need to change it as there could be a conflict on that name), buildpacks and eventual services (PostgreSQL needs to be set up).
The app should be available at https://govuk-rails-boilerplate.london.cloudapps.digital