2017-04-24 16:12:07 +08:00
|
|
|
version: '2'
|
2017-03-17 17:48:20 +08:00
|
|
|
services:
|
|
|
|
db:
|
2017-03-29 22:00:11 +08:00
|
|
|
container_name: scinote_db_production
|
2020-02-07 20:53:25 +08:00
|
|
|
image: postgres:11
|
2017-03-17 17:48:20 +08:00
|
|
|
volumes:
|
|
|
|
- scinote_production_postgres:/var/lib/postgresql/data
|
2021-04-20 16:29:31 +08:00
|
|
|
ports:
|
|
|
|
- "5432:5432"
|
|
|
|
environment:
|
|
|
|
- "POSTGRES_USER=postgres"
|
|
|
|
- "POSTGRES_PASSWORD=mysecretpassword"
|
2017-03-17 17:48:20 +08:00
|
|
|
|
|
|
|
web:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile.production
|
2017-03-29 22:00:11 +08:00
|
|
|
image: scinote_web_production
|
|
|
|
container_name: scinote_web_production
|
2017-03-17 17:48:20 +08: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 20:09:13 +08:00
|
|
|
- scinote_production_storage:/usr/src/app/storage
|
2017-03-17 17:48:20 +08:00
|
|
|
|
|
|
|
jobs:
|
2017-03-29 22:00:11 +08:00
|
|
|
image: scinote_web_production
|
|
|
|
container_name: scinote_jobs_production
|
2017-03-17 17:48:20 +08: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 16:28:15 +08:00
|
|
|
- scinote_production_storage:/usr/src/app/storage
|
2017-03-17 17:48:20 +08:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
scinote_production_postgres:
|
|
|
|
scinote_production_files:
|
2019-07-09 16:28:15 +08:00
|
|
|
scinote_production_storage:
|