-
Notifications
You must be signed in to change notification settings - Fork 187
/
docker-compose.prod.yml
67 lines (60 loc) · 1.21 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: '3.5'
x-rack: &rack
command: bash -c "bundle exec rake prod_up && bundle exec unicorn -c config/unicorn.rb"
image: 18xx_rack:prod
environment:
RACK_ENV: production
DATABASE_URL: $DATABASE_URL
ELASTIC_KEY: $ELASTIC_KEY
NEW_RELIC_LICENSE_KEY: $NEW_RELIC_LICENSE_KEY
NEW_RELIC_DISABLE_MIDDLEWARE_INSTRUMENTATION: 1
SLACK_WEBHOOK_URL: $SLACK_WEBHOOK_URL
RUBYOPTS: --yjit
PORT: 9292
OPAL_PREFORK_DISABLE: "true"
restart: always
build:
args:
RACK_ENV: production
context: .
volumes:
- ./public:/18xx/public
depends_on:
- db
- redis
logging:
options:
max-size: "50m"
services:
rack:
<<: *rack
rack_backup:
<<: *rack
queue:
<<: *rack
command: bundle exec ruby queue.rb
redis:
restart: always
db:
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
restart: always
nginx:
restart: always
build:
context: ./nginx/
ports:
- 80:80
- 443:443
- 127.0.0.1:8080:8080
volumes:
- ./public:/public
- /etc/letsencrypt:/etc/letsencrypt
depends_on:
- rack
- rack_backup
logging:
options:
max-size: "300m"