-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
203 lines (193 loc) · 6.07 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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
---
version: '3.8'
x-logging:
&default-logging
driver: "json-file"
options:
max-size: "1m"
services:
glitchtip-traefik:
image: traefik:2.4
container_name: glitchtip-traefik
restart: unless-stopped
volumes:
- ./traefik/acme.json:/acme.json
- /var/run/docker.sock:/var/run/docker.sock
networks:
- glitchtip
ports:
- 80:80
- 443:443
command:
- '--api'
- '--providers.docker=true'
- '--providers.docker.exposedByDefault=false'
- '--entrypoints.http=true'
- '--entrypoints.http.address=:80'
- '--entrypoints.http.http.redirections.entrypoint.to=https'
- '--entrypoints.http.http.redirections.entrypoint.scheme=https'
- '--entrypoints.https=true'
- '--entrypoints.https.address=:443'
- '--certificatesResolvers.letsencrypt.acme.email=email@example.com'
- '--certificatesResolvers.letsencrypt.acme.storage=acme.json'
- '--certificatesResolvers.letsencrypt.acme.httpChallenge.entryPoint=http'
- '--log=true'
- '--log.level=INFO'
logging:
driver: "json-file"
options:
max-size: "1m"
glitchtip-postgres:
image: postgres:13
container_name: glitchtip-postgres
restart: unless-stopped
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- ./data/postgres:/var/lib/postgresql/data
networks:
- glitchtip
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
retries: 5
logging: *default-logging
glitchtip-redis:
image: redis:6
container_name: glitchtip-redis
restart: unless-stopped
networks:
- glitchtip
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 30s
retries: 50
logging: *default-logging
glitchtip-web:
image: glitchtip/glitchtip:v3.1.0
container_name: glitchtip-web
restart: unless-stopped
depends_on:
glitchtip-traefik:
condition: service_started
glitchtip-postgres:
condition: service_healthy
glitchtip-redis:
condition: service_healthy
environment:
DATABASE_URL: postgres://postgres:postgres@glitchtip-postgres:5432/postgres
REDIS_URL: redis://glitchtip-redis:6379/0
SECRET_KEY: jsdf93892309fhufhr
PORT: 8000
EMAIL_URL: "${EMAIL_URL}"
DEFAULT_FROM_EMAIL: ${EMAIL_FROM_ADDRESS}
GLITCHTIP_DOMAIN: "https://gt.$DOMAIN"
ENABLE_OPEN_USER_REGISTRATION: "False"
GLITCHTIP_MAX_EVENT_LIFE_DAYS: 90
networks:
- glitchtip
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.glitchtip.rule=Host(`gt.$DOMAIN`)'
- 'traefik.http.routers.glitchtip.entrypoints=https'
- 'traefik.http.routers.glitchtip.tls=true'
- 'traefik.http.routers.glitchtip.tls.certresolver=letsencrypt'
- 'traefik.http.routers.glitchtip.service=glitchtip-service'
- 'traefik.http.services.glitchtip-service.loadbalancer.server.port=8000'
logging: *default-logging
glitchtip-worker:
image: glitchtip/glitchtip:v3.1.0
container_name: glitchtip-worker
restart: unless-stopped
command: celery -A glitchtip worker -B -l INFO
depends_on:
glitchtip-postgres:
condition: service_healthy
glitchtip-redis:
condition: service_healthy
environment:
DATABASE_URL: postgres://postgres:postgres@glitchtip-postgres:5432/postgres
REDIS_URL: redis://glitchtip-redis:6379/0
SECRET_KEY: jsdf93892309fhufhr
PORT: 8000
EMAIL_URL: "${EMAIL_URL}"
DEFAULT_FROM_EMAIL: ${EMAIL_FROM_ADDRESS}
GLITCHTIP_DOMAIN: "https://gt.$DOMAIN"
networks:
- glitchtip
logging: *default-logging
glitchtip-migrate:
image: glitchtip/glitchtip:v3.1.0
container_name: glitchtip-migrate
depends_on:
glitchtip-postgres:
condition: service_healthy
glitchtip-redis:
condition: service_healthy
command: "./manage.py migrate"
environment:
DATABASE_URL: postgres://postgres:postgres@glitchtip-postgres:5432/postgres
REDIS_URL: redis://glitchtip-redis:6379/0
SECRET_KEY: jsdf93892309fhufhr
PORT: 8000
EMAIL_URL: "${EMAIL_URL}"
DEFAULT_FROM_EMAIL: ${EMAIL_FROM_ADDRESS}
GLITCHTIP_DOMAIN: "https://gt.$DOMAIN"
networks:
- glitchtip
logging: *default-logging
glitchtip-flask-app:
build:
context: flask-app
dockerfile: Dockerfile
container_name: glitchtip-flask-app
restart: unless-stopped
depends_on:
glitchtip-traefik:
condition: service_started
environment:
DSN: "https://$GLITCHTIP_DSN@gt.$DOMAIN/1"
networks:
- glitchtip
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.app.rule=Host(`flask-app.$DOMAIN`)'
- 'traefik.http.routers.app.entrypoints=https'
- 'traefik.http.routers.app.tls=true'
- 'traefik.http.routers.app.tls.certresolver=letsencrypt'
- 'traefik.http.routers.app.service=app-service'
- 'traefik.http.services.app-service.loadbalancer.server.port=80'
logging: *default-logging
glitchtip-flask-webhook:
build:
context: flask-webhook
dockerfile: Dockerfile
container_name: glitchtip-flask-webhook
restart: unless-stopped
depends_on:
glitchtip-traefik:
condition: service_started
networks:
- glitchtip
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.webhook.rule=Host(`flask-webhook.$DOMAIN`)'
- 'traefik.http.routers.webhook.entrypoints=https'
- 'traefik.http.routers.webhook.tls=true'
- 'traefik.http.routers.webhook.tls.certresolver=letsencrypt'
- 'traefik.http.routers.webhook.service=webhook-service'
- 'traefik.http.services.webhook-service.loadbalancer.server.port=80'
logging: *default-logging
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/health"]
interval: 5s
timeout: 3s
retries: 60
networks:
glitchtip:
name: glitchtip