-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (56 loc) · 1.13 KB
/
docker-compose.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
version: '3.8'
services:
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/app
ports:
# This port only needs to be exposed for local development.
# In production, the web container is behind a reverse proxy (Caddy).
- "3000:3000"
depends_on:
- db
env_file:
- .env
sidekiq:
build: .
command: bundle exec sidekiq -C config/sidekiq.yml
volumes:
- .:/app
depends_on:
- db
- redis
env_file:
- .env
db:
image: postgres:13
volumes:
- pg_data:/var/lib/postgresql/data
env_file:
- .env
redis:
image: redis:6.2-alpine
volumes:
- redis_data:/data
caddy:
image: caddy:2-alpine
command: ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
ports:
- "80:80"
- "443:443"
depends_on:
- web
env_file:
- .env
environment:
HOSTNAME: "${HOSTNAME}"
volumes:
- caddy_data:/data
- caddy_config:/config
- ./Caddyfile:/etc/caddy/Caddyfile
volumes:
pg_data:
redis_data:
caddy_data:
caddy_config: