-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·72 lines (72 loc) · 1.7 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
services:
proxy:
build: ./caddy
restart: unless-stopped
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
- ./caddy/config:/config
- ./data/caddydata:/data
- ./data/caddylogs:/var/log/caddy
ports:
- '3333:3333'
db:
image: postgres:13.2-alpine
volumes:
- ./data/db:/var/lib/postgresql/data
- ./scripts/db:/scripts/db/
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
redis:
image: redis:6.2.2-alpine
server:
deploy:
replicas: 3
build:
context: .
args:
- FILE=server
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/postgres
- REDIS=redis:6379
depends_on:
- db
- redis
worker-db:
deploy:
replicas: 3
build:
context: .
args:
- FILE=worker-db
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/postgres
- REDIS=redis:6379
depends_on:
- db
- redis
prometheus:
image: prom/prometheus:v2.27.1
volumes:
- ./prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- '9090:9090'
restart: always
user: root # won't network correctly if not.
grafana:
image: grafana/grafana:7.5.7-ubuntu
container_name: grafana
ports:
- '3000:3000'
volumes:
- grafana-storage:/var/lib/grafana
volumes:
grafana-storage:
prometheus_data: