2017-04-24 10:12:07 +02:00
|
|
|
version: '2'
|
2017-03-17 10:48:20 +01:00
|
|
|
services:
|
|
|
|
db:
|
2017-03-29 16:00:11 +02:00
|
|
|
container_name: scinote_db_production
|
2020-02-07 13:53:25 +01:00
|
|
|
image: postgres:11
|
2017-03-17 10:48:20 +01:00
|
|
|
volumes:
|
|
|
|
- scinote_production_postgres:/var/lib/postgresql/data
|
2021-04-20 10:29:31 +02:00
|
|
|
environment:
|
|
|
|
- "POSTGRES_USER=postgres"
|
|
|
|
- "POSTGRES_PASSWORD=mysecretpassword"
|
2017-03-17 10:48:20 +01:00
|
|
|
|
|
|
|
web:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile.production
|
2017-03-29 16:00:11 +02:00
|
|
|
image: scinote_web_production
|
|
|
|
container_name: scinote_web_production
|
2017-03-17 10:48:20 +01:00
|
|
|
stdin_open: true
|
|
|
|
env_file: ./production.env
|
|
|
|
tty: true
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
|
|
|
command: bash -c "rm -f /usr/src/app/tmp/pids/server.pid && rails s -b 0.0.0.0"
|
|
|
|
environment:
|
|
|
|
- RAILS_ENV=production
|
|
|
|
volumes:
|
|
|
|
- scinote_production_files:/usr/src/app/public/system
|
2019-10-24 14:09:13 +02:00
|
|
|
- scinote_production_storage:/usr/src/app/storage
|
2017-03-17 10:48:20 +01:00
|
|
|
|
|
|
|
jobs:
|
2017-03-29 16:00:11 +02:00
|
|
|
image: scinote_web_production
|
|
|
|
container_name: scinote_jobs_production
|
2017-03-17 10:48:20 +01:00
|
|
|
tty: true
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
command: rake jobs:work
|
|
|
|
env_file: ./production.env
|
|
|
|
environment:
|
|
|
|
- RAILS_ENV=production
|
|
|
|
volumes:
|
|
|
|
- scinote_production_files:/usr/src/app/public/system
|
2019-07-09 10:28:15 +02:00
|
|
|
- scinote_production_storage:/usr/src/app/storage
|
2017-03-17 10:48:20 +01:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
scinote_production_postgres:
|
|
|
|
scinote_production_files:
|
2019-07-09 10:28:15 +02:00
|
|
|
scinote_production_storage:
|