Full-Stack Ruby on Rails application running the Pen&PaperBox
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

166 lines
4.5 KiB

# This is for developer PCs only and should never be used for production deployment.
version: '2.2'
volumes:
mumble_config:
mumble_data:
production_paperclip_data:
development_paperclip_data:
test_paperclip_data:
services:
# Mumble Voice-Over-IP (VoIP) server used for voice and text chat.
# See: https://mumble.info
mumble:
image: docker.mbober.de/mumble:latest
ports:
- "64738:64738"
volumes:
- mumble_config:/config
- mumble_data:/data
# A TCP to Websocket bridge to allow In-Browser Javascript client to connect to Mumble
mumble_websockify:
image: efrecon/websockify
links:
- mumble
ports:
- "64737:80"
command: --ssl-target 80 mumble:64738
# A Mumble dice bot written in C++ used to roll dice and log text message to the session log
# Source: https://git.mbober.de/charxchange/mumble-rtc
dicebot:
image: docker.mbober.de/mumble-rtc-dicebot:0.5.13
ports:
- "8100:8080"
links:
- mumble
environment:
MUMBLE_SERVER: mumble
DICEBOT_SECRET: "FOOBAR"
CHARXCHANGE_PATH: "http://development:3000"
# Service used to catch mails in the development environment
mailcatcher:
image: tophfr/mailcatcher
ports:
- "1080:80"
# Redis database used as backend for Rails Cables
redis:
image: redis
# A service fetching OpenGraph information form URLs with a bit of caching written in C++.
# Source: https://git.mbober.de/charxchange/mumble-rtc
opengraph:
image: docker.mbober.de/opengraph-proxy:1.1
ports:
- "8101:8080"
# MySQL server used for the development environment
development_db:
image: mysql/mysql-server:5.7
ports:
- "3001:3306"
environment:
MYSQL_ROOT_PASSWORD: charxchange
MYSQL_DATABASE: charxchange
MYSQL_ROOT_HOST: '%'
# The Rails development server, locally build from Dockerfile
development:
build: .
ports:
- "3000:3000"
links:
- development_db
- mailcatcher
- redis
- dicebot
- sidekiq_development
- opengraph
- mumble_websockify
environment:
RAILS_ENV: development
RAILS_DB_HOST: development_db
RAILS_DB_NAME: charxchange
RAILS_DB_USER: root
RAILS_DB_PASSWD: charxchange
REDIS_URL: "redis://redis:6379"
RAILS_REDIS_CHANNEL_PREFIX: "charxchange_production"
RAILS_MAILER_METHOD: smtp
RAILS_SMTP_SERVER: mailcatcher
RAILS_SMTP_PORT: 25
DICEBOT_URL: "http://localhost:8100"
DICEBOT_URL_INTERNAL: "http://dicebot:8080"
DICEBOT_SECRET: "FOOBAR"
OPEN_GRAPH_PROXY_URL: "http://localhost:8101"
MUMBLE_ADDRESS: "localhost"
MUMBLE_URL: "ws://localhost:64737"
PPB_NEW_PLAYER_WELCOME_BY: "1"
STUN_URL: "stun.mbober.de"
volumes:
- ".:/usr/src/app"
- development_paperclip_data:/usr/src/app/public/system
# 2nd instance of the locally build Rails server, running Sidekiq which handles background tasks such as sending mail
sidekiq_development:
build: .
links:
- development_db
- mailcatcher
- redis
- dicebot
command: bundle exec sidekiq
environment:
RAILS_ENV: development
RAILS_DB_HOST: development_db
RAILS_DB_NAME: charxchange
RAILS_DB_USER: root
RAILS_DB_PASSWD: charxchange
REDIS_URL: "redis://redis:6379"
RAILS_REDIS_CHANNEL_PREFIX: "charxchange_production"
RAILS_MAILER_METHOD: smtp
RAILS_SMTP_SERVER: mailcatcher
RAILS_SMTP_PORT: 25
DICEBOT_URL: "http://localhost:8100"
DICEBOT_URL_INTERNAL: "http://dicebot:8080"
DICEBOT_SECRET: "FOOBAR"
volumes:
- ".:/usr/src/app"
- development_paperclip_data:/usr/src/app/public/system
# MySQL database for the test environment
test_db:
image: mysql/mysql-server:5.7
ports:
- "2001:3306"
environment:
MYSQL_ROOT_PASSWORD: charxchange
MYSQL_DATABASE: charxchange
MYSQL_ROOT_HOST: '%'
# Locally build Rails server for the test environment
test:
build: .
ports:
- "2000:3000"
links:
- test_db
- redis
environment:
RAILS_ENV: test
RAILS_TEST_DB_HOST: test_db
RAILS_TEST_DB_NAME: charxchange
RAILS_TEST_DB_USER: root
RAILS_TEST_DB_PASSWD: charxchange
REDIS_URL: "redis://redis:6379"
RAILS_REDIS_CHANNEL_PREFIX: "charxchange_test"
DICEBOT_URL: "http://localhost:8100"
DICEBOT_URL_INTERNAL: "http://dicebot:8080"
DICEBOT_SECRET: "FOOBAR"
volumes:
- ".:/usr/src/app"
- test_paperclip_data:/usr/src/app/public/system