Ruby on Rails application serving as backend for turnie.re
# install dependencies
$ bundle install
# run migrations
$ rails db:migrate
Development (without mail confirmation and separate database):
$ RAILS_ENV=development rails server
You can find all our Dockerfiles in the docker directory.
They depend on each other in the following order: production
→ development
→ test
This means, to build the development
image, you have to build the production
image first and tag it with the corresponding tag that is mentioned in the FROM
line in the development
Dockerfile.
To build all images do:
cd turniere-backend
docker build -t registry.gitlab.com/turniere/turniere-backend/production -f docker/production/Dockerfile .
docker build -t registry.gitlab.com/turniere/turniere-backend/development -f docker/development/Dockerfile .
docker build -t registry.gitlab.com/turniere/turniere-backend/test -f docker/test/Dockerfile .
This is done to leave test and development dependencies out of the production container. Also we have a dedicated test container which runs the tests reproducible when you start it, but can also run the normal rails server to somewhat debug problems occuring in the test suite if needed.
While developing, if you want to use the development docker container, it should™ be sufficient to mount the root of this repository into the /app folder within the docker container to avoid building it over and over again.
Only rebuilding the development
container is not sufficient, as the development
Dockerfile does not have a COPY
Statement
$ rails diagram:all_with_engines