forked from chatwoot/chatwoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.yaml
97 lines (89 loc) · 2.11 KB
/
docker-compose.production.yaml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: '3'
services:
base: &base
image: twerlo/zafy:latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
env_file: .env ## Change this file for customized env variables
volumes:
- app_data:/app/storage
app:
<<: *base
depends_on:
- postgres
- redis
ports:
- '127.0.0.1:3000:3000'
environment:
- NODE_ENV=production
- RAILS_ENV=production
- INSTALLATION_ENV=docker
entrypoint: docker/entrypoints/rails.sh
command: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0']
restart: always
sidekiq:
<<: *base
depends_on:
- postgres
- redis
environment:
- NODE_ENV=production
- RAILS_ENV=production
- INSTALLATION_ENV=docker
command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']
restart: always
postgres:
image: postgres:12
restart: always
ports:
- '127.0.0.1:5432:5432'
volumes:
- db_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=zafy_db
- POSTGRES_USER=postgres
# Please provide your own password.
- POSTGRES_PASSWORD=
redis:
image: redis:alpine
restart: always
command: ["sh", "-c", "redis-server --requirepass \"$REDIS_PASSWORD\""]
env_file: .env
volumes:
- redis_data:/data
ports:
- '127.0.0.1:6379:6379'
caddy:
image: caddy/caddy
container_name: caddy
depends_on:
- "hasura_gql"
restart: always
ports:
- "80:80"
- "443:443"
environment:
- APP_DOMAIN_NAME=${APP_DOMAIN_NAME}
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_certs:/root/.caddy
watchtower:
image: containrrr/watchtower
command:
- "--cleanup"
labels:
- "com.centurylinklabs.watchtower.enable=false"
env_file:
- .env
environment:
- REPO_USER=${DOCKERHUB_USER}
- REPO_PASS=${DOCKERHUB_PASS}
- WATCHTOWER_POLL_INTERVAL=60
volumes:
- /var/run/docker.sock:/var/run/docker.sock
container_name: "watchtower"
volumes:
caddy_certs:
app_data:
db_data:
redis_data: