-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
128 lines (112 loc) · 2.8 KB
/
docker-compose.yml
File metadata and controls
128 lines (112 loc) · 2.8 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# AREF Platform — Docker Compose Orchestration
# Run: docker-compose up --build
# Dashboard: http://localhost:8080
# Prometheus: http://localhost:9090
# Grafana: http://localhost:3000
services:
# ---------- Infrastructure ----------
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: aref
POSTGRES_USER: aref
POSTGRES_PASSWORD: aref_secret
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U aref"]
interval: 5s
timeout: 3s
retries: 5
redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
# ---------- Monitoring ----------
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./config/prometheus.yml:/etc/prometheus/prometheus.yml
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.retention.time=7d"
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_PASSWORD: aref
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
volumes:
- ./config/grafana/provisioning:/etc/grafana/provisioning
# ---------- Microservices ----------
gateway:
build: .
command: uvicorn services.gateway.gateway_app:app --host 0.0.0.0 --port 8000
ports:
- "8000:8000"
environment:
- AREF_ENVIRONMENT=docker
depends_on:
- redis
orders:
build: .
command: uvicorn services.orders.orders_app:app --host 0.0.0.0 --port 8001
ports:
- "8001:8001"
environment:
- AREF_ENVIRONMENT=docker
depends_on:
- postgres
- redis
payments:
build: .
command: uvicorn services.payments.payments_app:app --host 0.0.0.0 --port 8002
ports:
- "8002:8002"
environment:
- AREF_ENVIRONMENT=docker
inventory:
build: .
command: uvicorn services.inventory.inventory_app:app --host 0.0.0.0 --port 8003
ports:
- "8003:8003"
environment:
- AREF_ENVIRONMENT=docker
notifications:
build: .
command: uvicorn services.notifications.notifications_app:app --host 0.0.0.0 --port 8004
ports:
- "8004:8004"
environment:
- AREF_ENVIRONMENT=docker
depends_on:
- redis
# ---------- AREF Control Plane ----------
dashboard:
build: .
command: uvicorn aref.dashboard.app:app --host 0.0.0.0 --port 8080
ports:
- "8080:8080"
environment:
- AREF_ENVIRONMENT=docker
- AREF_DASHBOARD_PORT=8080
depends_on:
- gateway
- orders
- payments
- inventory
- notifications
- prometheus
volumes:
pgdata: