-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
172 lines (161 loc) · 3.75 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
version: '3.4'
services:
rabbit:
image: rabbitmq:3-management
volumes:
- rabbit_data:/var/lib/rabbit/data
ports:
- 5672:5672/tcp
- 15672:15672/tcp
restart: unless-stopped
networks:
- net1
redis:
restart: unless-stopped
image: redis:latest
volumes:
- redis_data:/data
ports:
- "6379:6379"
networks:
- net1
postgres:
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
#POSTGRES_DB:
POSTGRES_MULTIPLE_DATABASES: sentry,myproject
volumes:
- postgres_data:/var/lib/postgresql/data
- ./compose/postgres/initdb:/docker-entrypoint-initdb.d
restart: unless-stopped
ports:
- "5432:5432"
networks:
- net1
dramatiq_worker:
restart: unless-stopped
build:
context: .
dockerfile: compose/common/Dockerfile
env_file: compose/common/django-dramatiq.env
environment:
dramatiq_prom_host: dramatiq_worker
dramatiq_prom_port: 9191
depends_on:
- rabbit
- redis
- postgres
volumes:
- ./:/code
- ./compose/dramatiq/start.sh:/start.sh
entrypoint: /start.sh
networks:
- net1
dramatiq_tasks_api:
restart: unless-stopped
build:
context: .
dockerfile: compose/common/Dockerfile
env_file: compose/common/django-dramatiq.env
depends_on:
- rabbit
- redis
- postgres
volumes:
- ./:/code
- ./compose/api/start.sh:/start.sh
entrypoint: /start.sh
ports:
- 8000:8000
networks:
- net1
sentry:
image: sentry
links:
- redis
- postgres
ports:
- 9000:9000
environment:
SENTRY_SECRET_KEY: 'sentry'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis
restart: unless-stopped
networks:
- net1
cron:
image: sentry
links:
- redis
- postgres
command: "sentry run cron"
environment:
SENTRY_SECRET_KEY: 'sentry'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis
restart: unless-stopped
networks:
- net1
worker:
image: sentry
links:
- redis
- postgres
command: "sentry run worker"
environment:
SENTRY_SECRET_KEY: 'sentry'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis
restart: unless-stopped
networks:
- net1
prometheus:
image: prom/prometheus:latest
volumes:
- ./compose/prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention=200h'
- '--web.enable-lifecycle'
restart: unless-stopped
ports:
- "9090:9090"
networks:
- net1
grafana:
image: grafana/grafana:latest
volumes:
- grafana_data:/var/lib/grafana
- ./compose/grafana/datasources:/etc/grafana/datasources
- ./compose/grafana/dashboards:/etc/grafana/dashboards
- ./compose/grafana/setup.sh:/setup.sh
entrypoint: /setup.sh
environment:
- GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=false
restart: unless-stopped
ports:
- "3000:3000"
networks:
- net1
volumes:
rabbit_data:
redis_data:
postgres_data:
prometheus_data:
grafana_data:
networks:
net1: