sudo apt-get install libpq-dev
Use nvm - https://github.com/nvm-sh/nvm
To install npm v2 using brew:
brew install homebrew/versions/node4-lts
This should install node v4.4.3 and npm v2.15.1
If you already have Docker, be sure it's at least v1.11
If you're using [Kitematic] on OSX, use the terminal from there, or in any terminal run:
eval $(docker-machine env default)
From the project's root folder, copy the .env.template
file to .env
and change as necessary.
Please note the build section may be outdated. The following steps work in 2019:
- After creating a
.env
file, addDB_USERNAME=postgres
- From the project's root folder, run
bundle
- Run
docker-compose -f docker-compose-local-test.yml up
- Run
rails db:create db:migrate
- If you get an error about
claim.rb
, openapp/models/claim.rb
- Comment out lines 44-46:
# bitmask :discrimination_claims, as: DISCRIMINATION_COMPLAINTS # bitmask :pay_claims, as: PAY_COMPLAINTS # bitmask :desired_outcomes, as: DESIRED_OUTCOMES
- Run
rails db:create db:migrate
again - Uncomment lines 44-46 to return them to their original state:
bitmask :discrimination_claims, as: DISCRIMINATION_COMPLAINTS bitmask :pay_claims, as: PAY_COMPLAINTS bitmask :desired_outcomes, as: DESIRED_OUTCOMES
- If you get an error about
- Run
npm install
From the project's root folder, build (this will take several minutes - grab a coffee):
docker-compose build
Run the app containers:
docker-compose up -d
Run DB setup:
docker-compose run web bash -c "RAILS_ENV=local bundle exec rake db:setup"
Get the IP of the virtual docker machine with:
docker-machine ip
Visit http://<insert-ip-from-previous-command>:8080
to access the locally running site.
rake
For deployment to all environments, see the documentation at the Employment Tribunals Deployment section of Ops manual
In order to stop people using the system a maintenance page has been added which is controlled using environment variables.
These are :-
MAINTENANCE_ENABLED - Set to 'true' to enable maintenance page to be enabled
Any of the environment variables below can be added if you want to customize from the defaults
MAINTENANCE_ALLOWED_IPS MAINTENANCE_END - If added you will see "You will be able to use the service from " followed by this text.