forked from sublime247/mobile-money
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (97 loc) · 2.57 KB
/
docker-compose.yml
File metadata and controls
105 lines (97 loc) · 2.57 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.8'
services:
app:
build:
context: .
dockerfile: Dockerfile.dev
container_name: mobilemoney_app
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- .env
environment:
NODE_ENV: development
LOG_LEVEL: ${LOG_LEVEL:-info}
DATABASE_URL: postgresql://user:password@postgres:5432/mobilemoney_stellar
REDIS_URL: redis://redis:6379
# Loki transport — optional, falls back to stdout when unset
LOKI_HOST: ${LOKI_HOST:-http://loki:3100}
SERVICE_NAME: ${SERVICE_NAME:-mobile-money-api}
ports:
- "3000:3000"
networks:
- mobilemoney_net
logging:
driver: "json-file"
options:
tag: "{{.Name}}"
postgres:
image: postgres:16-alpine
container_name: mobilemoney_postgres
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: mobilemoney_stellar
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d mobilemoney_stellar"]
interval: 5s
timeout: 5s
retries: 5
networks:
- mobilemoney_net
redis:
image: redis:7-alpine
container_name: mobilemoney_redis
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf:ro
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
- mobilemoney_net
loki:
image: grafana/loki:latest
container_name: mobilemoney_loki
ports:
- "3100:3100"
volumes:
- ./logging/loki-config.yaml:/etc/loki/local-config.yaml
command: -config.file=/etc/loki/local-config.yaml
networks:
- mobilemoney_net
promtail:
image: grafana/promtail:latest
container_name: mobilemoney_promtail
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./logging/promtail-config.yaml:/etc/promtail/config.yml
command: -config.file=/etc/promtail/config.yml
networks:
- mobilemoney_net
grafana:
image: grafana/grafana:latest
container_name: mobilemoney_grafana
ports:
- "3001:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
volumes:
- grafana_data:/var/lib/grafana
- ./logging/grafana/provisioning:/etc/grafana/provisioning
networks:
- mobilemoney_net
networks:
mobilemoney_net:
driver: bridge
volumes:
grafana_data:
redis_data: