turniere-backend/README.md

2.8 KiB

turniere-backend

Build Status pipeline status Coverage Status Codacy Badge Quality Gate Status Maintainability

Ruby on Rails application serving as backend for turnie.re

Quick install with Docker

turnie.re - Quickstart

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

Registry

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