The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-RUBY-WEBSOCKETEXTENSIONS-570830 |
||
|---|---|---|
| app | ||
| bin | ||
| config | ||
| db | ||
| doc | ||
| docker | ||
| kubernetes | ||
| lib/tasks | ||
| public | ||
| spec | ||
| .dockerignore | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .hound.yml | ||
| .rspec | ||
| .rubocop.yml | ||
| .ruby-version | ||
| .travis.yml | ||
| Gemfile | ||
| Gemfile.lock | ||
| README.md | ||
| Rakefile | ||
| config.ru | ||
| docker-compose.yml | ||
| sonar-project.properties | ||
README.md
turniere-backend
Ruby on Rails application serving as backend for turnie.re
Quick install with Docker
Installation
# install dependencies
$ bundle install
# run migrations
$ rails db:migrate
Running
Development (without mail confirmation and separate database):
$ RAILS_ENV=development rails server
Docker
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
Generate diagrams
$ rails diagram:all_with_engines