Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.
/ turniere-backend Public archive

Turniere Backend

Notifications You must be signed in to change notification settings

turniere/turniere-backend

Repository files navigation

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 install
# run migrations
$ rails db:migrate

Running

Development (without mail confirmation and separate database):

$ RAILS_ENV=development rails server

Docker

Registry

You can find all our Dockerfiles in the docker directory. They depend on each other in the following order: productiondevelopmenttest 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

Generate diagrams

$ rails diagram:all_with_engines