mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
version: '2'
|
|
services:
|
|
db:
|
|
container_name: scinote_db_production
|
|
image: postgres:15
|
|
volumes:
|
|
- scinote_production_postgres:/var/lib/postgresql/data
|
|
environment:
|
|
- "POSTGRES_USER=postgres"
|
|
- "POSTGRES_PASSWORD=mysecretpassword"
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.production
|
|
image: scinote_web_production
|
|
container_name: scinote_web_production
|
|
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
|
|
- scinote_production_storage:/usr/src/app/storage
|
|
|
|
jobs:
|
|
image: scinote_web_production
|
|
container_name: scinote_jobs_production
|
|
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
|
|
- scinote_production_storage:/usr/src/app/storage
|
|
|
|
volumes:
|
|
scinote_production_postgres:
|
|
scinote_production_files:
|
|
scinote_production_storage:
|