-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.prod.yml
40 lines (40 loc) · 1.2 KB
/
docker-compose.prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
version: "3.9"
services:
db:
image: postgres
volumes:
- ./tmp/db:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
- POSTGRES_USER=${DATABASE_USER}
- POSTGRES_DB=${DATABASE_NAME}
web:
build:
context: .
dockerfile: Dockerfile.prod
#image: fugu_image:latest
entrypoint: ["sh", "/app/docker-entrypoint.sh"]
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
tty: true
working_dir: /app
ports:
- "3000:3000"
depends_on:
- db
restart: unless-stopped
environment:
- RAILS_ENV=production
- RACK_ENV=production
- RAILS_SERVE_STATIC_FILES=true
- DATABASE_NAME=${DATABASE_NAME}
- DATABASE_URL=postgres://${DATABASE_USER}:${DATABASE_PASSWORD}@db:5432/${DATABASE_NAME}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- RAILS_LOG_TO_STDOUT=${RAILS_LOG_TO_STDOUT}
- SENTRY_DSN=${SENTRY_DSN}
- ALLOW_REGISTRATION=${ALLOW_REGISTRATION}
- INIT_USER_EMAIL=${INIT_USER_EMAIL}
- INIT_USER_PASSWORD=${INIT_USER_PASSWORD}
- FORCE_SSL_PROD=${FORCE_SSL_PROD}