-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (66 loc) · 1.45 KB
/
docker-compose.yml
File metadata and controls
68 lines (66 loc) · 1.45 KB
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
68
services:
proxy:
build:
context: proxy
ports:
- 80:80
- 443:443
volumes:
- caddy_data:/data
- caddy_config:/config
networks:
- app
environment:
- HOSTNAME=app.fourth-strike.com
restart: always
app:
# build: .
image: rabidaudio/fourth-strike:latest
ports:
- 3000:3000
volumes:
- storage:/rails/storage
- cache:/rails/tmp/cache
# This works around a well-known quirk:
# https://ieftimov.com/posts/docker-compose-stray-pids-rails-beyond/
- type: tmpfs
target: /rails/tmp/pids
tmpfs:
size: "524288" # 512kb
mode: 01777 # make sure it's rw by the rails user
networks:
- app
restart: always
environment: &appenv
- RAILS_ENV=production
- RAILS_SERVE_STATIC_FILES=true
- RAILS_LOG_LEVEL=info
- RAILS_LOG_TO_STDOUT=true
- HOSTNAME=app.fourth-strike.com
- RAILS_MIN_THREADS=1
- DISCORD_CLIENT_ID
- DISCORD_CLIENT_SECRET
- RAILS_MASTER_KEY
worker:
# build: .
image: rabidaudio/fourth-strike:latest
volumes:
- storage:/rails/storage
- cache:/rails/tmp/cache
networks:
- app
restart: always
command: bundle exec rake jobs:work
environment: *appenv
volumes:
storage:
external: true
caddy_data:
external: false
caddy_config:
external: false
cache:
external: true
networks:
app:
driver: bridge