forked from golang-delta-team4/gholi-fly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-infra.yaml
90 lines (81 loc) · 2.16 KB
/
docker-compose-infra.yaml
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
services:
gholi-db:
image: postgres:14.8
container_name: gholi-db-dev
restart: always
environment:
POSTGRES_USER: ${PG_USERNAME}
POSTGRES_PASSWORD: ${PG_PASSWORD}
POSTGRES_MULTIPLE_DATABASES: ${PG_MULTIPLE_DATABASES}
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PG_USERNAME}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- gholi-db-volume:/var/lib/postgresql/data:rw
- ./scripts/create-multiple-postgresql-databases.sh:/docker-entrypoint-initdb.d/create-multiple-postgresql-databases.sh:ro
gholi-redis:
image: redis/redis-stack:7.2.0-v3
container_name: gholi-redis-dev
volumes:
- gholi-redis-volume:/data
ports:
- "6380:6379"
- "8020:8001"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
restart: always
gholi-nats:
image: nats:2.9-alpine
container_name: gholi-nats-server
command: [
"-js",
"--store_dir",
"/data"
]
ports:
- "4222:4222"
volumes:
- gholi-nats_data:/data
gholi-promtail:
image: grafana/promtail:latest
container_name: gholi-promtail-dev
restart: always
volumes:
- ./Logs:/var/log/my-service
- ./promtail-config.yaml:/etc/promtail/promtail-config.yaml
command: -config.file=/etc/promtail/promtail-config.yaml
depends_on:
- gholi-loki
gholi-loki:
image: grafana/loki:latest
container_name: gholi-loki-dev
restart: always
ports:
- "3100:3100"
volumes:
- ./loki-config.yaml:/etc/loki/local-config.yaml
- gholi-loki-data:/data
command: -config.file=/etc/loki/local-config.yaml
gholi-grafana:
image: grafana/grafana:latest
container_name: gholi-grafana-dev
restart: always
ports:
- "3500:3000"
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
depends_on:
- gholi-loki
volumes:
gholi-db-volume:
gholi-redis-volume:
gholi-nats_data:
gholi-loki-data: