-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (96 loc) · 2.13 KB
/
docker-compose.yml
File metadata and controls
105 lines (96 loc) · 2.13 KB
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
version: "3.9"
services:
production:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: production
restart: always
labels:
logging: ${APP_NAME}
ports:
- "3000:3000"
networks:
- database
database:
container_name: postgres
image: postgres:18.3
env_file:
- .env.common
- .env
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- database:/data/postgres
ports:
- "5332:5432"
networks:
- database
restart: unless-stopped
command:
- postgres
- -c
- shared_preload_libraries=pg_stat_statements
- -c
- pg_stat_statements.max=10000
- -c
- pg_stat_statements.track=all
cache:
image: redis:8.6-alpine
restart: always
ports:
- "6379:6379"
volumes:
- cache:/data
prometheus:
image: prom/prometheus
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
restart: unless-stopped
promtail:
image: grafana/promtail
container_name: promtail
command: -config.file=/etc/promtail/config.yml
ports:
- "9080:9080"
volumes:
- ./promtail-config.yml:/etc/promtail/config.yml
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- loki
grafana:
image: grafana/grafana
container_name: grafana
ports:
- "3001:3000"
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- grafana-data:/var/lib/grafana
- ./grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml
loki:
image: grafana/loki:2.9.3
container_name: loki
ports:
- "3100:3100"
command: -config.file=/etc/loki/config.yml
volumes:
- ./loki/config.yml:/etc/loki/config.yml
- loki-data:/loki
networks:
database:
driver: bridge
volumes:
grafana-data:
loki-data:
database:
cache:
driver: local