forked from Bonizozo/stellar-tipjar-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
115 lines (109 loc) · 3.17 KB
/
Copy pathcompose.yml
File metadata and controls
115 lines (109 loc) · 3.17 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
services:
db:
# postgis/postgis bundles the PostGIS extension required by migration
# 0056 (creator_locations); plain postgres:15-alpine lacks it.
image: postgis/postgis:15-3.4-alpine
container_name: tipjar-db
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: tipjar
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d tipjar"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: Dockerfile.dev
container_name: tipjar-backend
ports:
- "8000:8000"
volumes:
- .:/app
- /app/target # Prevents local target folder from overwriting container target
environment:
- DATABASE_URL=postgres://user:password@db:5432/tipjar
- STELLAR_NETWORK=testnet
- RUST_LOG=stellar_tipjar_backend=debug
- RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/%2f
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
prometheus:
image: prom/prometheus:v2.51.0
container_name: tipjar-prometheus
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./monitoring/prometheus/alerts.yml:/etc/prometheus/alerts.yml:ro
- ./monitoring/prometheus/recording_rules.yml:/etc/prometheus/recording_rules.yml:ro
- prometheus_data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.enable-lifecycle"
depends_on:
- backend
grafana:
image: grafana/grafana:10.4.0
container_name: tipjar-grafana
ports:
- "3000:3000"
volumes:
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning:ro
- ./monitoring/grafana/dashboards:/etc/grafana/dashboards:ro
- grafana_data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
depends_on:
- prometheus
rabbitmq:
image: rabbitmq:3.13-management
container_name: tipjar-rabbitmq
ports:
- "5672:5672" # AMQP
- "15672:15672" # Management UI → http://localhost:15672 (guest/guest)
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
volumes:
- rabbitmq_data:/var/lib/rabbitmq
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "ping"]
interval: 10s
timeout: 5s
retries: 5
kong:
image: kong:3.7-ubuntu
container_name: tipjar-kong
environment:
KONG_DATABASE: "off"
KONG_DECLARATIVE_CONFIG: /etc/kong/kong.yml
KONG_PROXY_LISTEN: "0.0.0.0:8080"
KONG_ADMIN_LISTEN: "0.0.0.0:8001"
KONG_LOG_LEVEL: info
KONG_PLUGINS: bundled
ports:
- "8080:8080" # Proxy (public entry point)
- "8001:8001" # Admin API (internal only)
volumes:
- ./kong/kong.yml:/etc/kong/kong.yml:ro
healthcheck:
test: ["CMD", "kong", "health"]
interval: 10s
timeout: 5s
retries: 5
depends_on:
backend:
condition: service_started
volumes:
prometheus_data:
grafana_data: