TUR-112: Version endpoint See merge request turniere/turniere-backend!58 |
||
|---|---|---|
| app | ||
| bin | ||
| chart | ||
| config | ||
| db | ||
| doc | ||
| e2e/lib | ||
| lib/local | ||
| public | ||
| script | ||
| spec | ||
| .dockerignore | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .rspec | ||
| .rubocop.yml | ||
| .ruby-version | ||
| AGENTS.md | ||
| Dockerfile | ||
| Gemfile | ||
| Gemfile.lock | ||
| README.md | ||
| Rakefile | ||
| config.ru | ||
| docker-compose.blackbox-follow.yml | ||
| docker-compose.blackbox.yml | ||
| docker-compose.yml | ||
| tasks.py | ||
README.md
turniere-backend
Ruby on Rails application serving as backend for turnie.re
Quick install with Docker
Installation
# install dependencies
$ bundle config set with "development test"
$ bundle install
# run migrations
$ rails db:migrate
Running
Development (without mail confirmation and separate database):
$ RAILS_ENV=development rails server
Testing
Running tests works as follows:
bundle exec rspec
Leader/follower tournament sync docs:
Docker
You can find all our Dockerfiles in the docker directory.
They depend on each other in the following order: production → test
This means, to build test image, you have to build production image first and tag it with corresponding tag that is mentioned in FROM line in test 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/test -f docker/test/Dockerfile .
This is done to leave test and development dependencies out of production container. Also we have dedicated test container which runs tests reproducible when you start it, but can also run normal rails server to debug problems occuring in test suite if needed.
While developing, use test image as base container and mount root of this repository into /app to avoid rebuilding it over and over again.
Generate diagrams
$ rails diagram:all_with_engines