Skip to content
This repository was archived by the owner on Jun 6, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.2
2.3.8
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ruby:2.3.8

ENV RAILS_ENV=production

RUN apt update && apt install -y nodejs cmake

WORKDIR /app

COPY ./Gemfile ./Gemfile.lock /app/

RUN gem install bundler

COPY . /app

RUN bundle install


CMD bundle exec rails s -b 0.0.0.0
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ gem 'friendly_id'
gem 'jquery-turbolinks'

# Use datenfisch (https://github.com/Iasoon/datenfisch.git)
gem 'datenfisch', git: 'git://github.com/iasoon/datenfisch-sucks.git',
gem 'datenfisch', git: 'https://github.com/iasoon/datenfisch-sucks.git',
ref: '4f39bb3686b5facfb2552fe186d568ce3d259993'

# Use jQuery plugin datatables (https://github.com/DataTables/DataTables)
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'

config.secret_key = '01fc1ab3cb991eb1e4cdb11ee7f99dbdd530da38eda3928627f7ab5c19632d8f47c203b988e29f9c7dc18f619d5bf7da3a682f1dd935d9174f6a2a04d0bae36f'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed or a production secret added in a safer way


# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
Expand Down
32 changes: 32 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '3.3'

services:
db:
image: mariadb:10.8
volumes:
- db_data:/var/lib/mysql
command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
restart: always
environment:
MYSQL_ROOT_PASSWORD: strong-password
MYSQL_DATABASE: gamification
MYSQL_USER: gamification
MYSQL_PASSWORD: password

web:
build: .
depends_on:
- db
ports:
- "3003:3000"
restart: always
environment:
DATABASE_URL: mysql2://gamification:password@db/gamification
RAILS_LOG_TO_STDOUT: 1
SECRET_AUTH_USERNAME: admin
SECRET_AUTH_PASSWORD: admin-password
RAILS_SERVE_STATIC_FILES: 1

volumes:
db_data: {}