-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
109 lines (100 loc) · 2.22 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
version: '3.7'
networks:
intranet:
external: false
volumes:
postgres_data:
redis_data:
services:
web:
image: curium-go-fiber
container_name: curium_go_fiber_api
env_file:
- .env
ports:
- ${SERVER_PORT}:${SERVER_PORT}
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
networks:
- intranet
db:
image: postgres:13.15
container_name: curium_go_fiber_db
restart: on-failure
env_file:
- .env
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASS}
POSTGRES_DB: ${DATABASE_NAME}
ports:
- ${DATABASE_PORT}:5432
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 30s
timeout: 20s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- intranet
redis:
image: redis:7.0.15-alpine
container_name: curium_go_fiber_redis
restart: on-failure
env_file:
- .env
ports:
- ${REDIS_PORT}:6379
volumes:
- redis_data:/data
# deploy:
# resources:
# limits:
# memory: 128M
loki:
image: grafana/loki:3.0.0
container_name: curium_go_fiber_loki
restart: on-failure
ports:
- 3131:3131
volumes:
- ./infras/loki:/mnt/config
# healthcheck:
# test: wget --no-verbose --tries=1 --spider http://localhost:3131/ready || exit 1
# interval: 10s
# timeout: 7s
# retries: 5
# start_period: 30s
command: -config.file=/mnt/config/loki-config.yml
networks:
- intranet
promtail:
image: grafana/promtail:3.0.0
container_name: curium_go_fiber_promtail
depends_on:
- loki
volumes:
- ./infras/loki:/mnt/config
- ./infras/logs:/etc/serverlog
command: -config.file=/mnt/config/promtail-config.yml
networks:
- intranet
# deploy:
# resources:
# limits:
# memory: 64M
grafana:
image: grafana/grafana:11.0.0
container_name: curium_go_fiber_grafana
ports:
- 3030:3000
depends_on:
- loki
volumes:
- ./infras/grafana:/etc/grafana/provisioning
networks:
- intranet