This is the main (parent) repo. It builds and runs containers for Backend (Rails API), PostgreSQL and Frontend (React) using docker-compose.
-
Install docker and docker-compose
Make sure that daemon is running and available
-
Build Images
Linux:
docker-compose build
or
docker-compose up --build
-
Setup db
docker-compose exec backend rake db:setup
NOTE: you'll have to re-run
docker-compose exec backend rake db:migrate
whenever there are new migrations.
-
Start server or run commands (for example tests)
docker-compose up
docker-compose run backend COMMAND
you can also pass environment through
-e
parameterdocker-compose run -e "RAILS_ENV=production" backend COMMAND