-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
183 lines (175 loc) · 5.02 KB
/
docker-compose.yml
File metadata and controls
183 lines (175 loc) · 5.02 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# ---- docker-compose.yml ----
# AIDRA - Artificial Intelligence In-orbit Data pRocessing Assessment
# All 6 services: app, db, grafana, prometheus, loki, promtail
services:
# ====== APP PRINCIPAL ======
aidra-app:
build:
context: .
args:
AIDRA_COMMIT_SHA: ${AIDRA_COMMIT_SHA:-unknown}
container_name: aidra-app
restart: unless-stopped
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql+asyncpg://aidra:${DB_PASSWORD}@aidra-db:5432/aidra
- COPERNICUS_USER=${COPERNICUS_USER}
- COPERNICUS_PASSWORD=${COPERNICUS_PASSWORD}
- MODELS_DIR=/app/models
- IMAGES_DIR=/data/images
- DEFAULT_MODEL=${DEFAULT_MODEL:-vesseltracker-sar-yolov8}
- DEFAULT_MODEL_VERSION=${DEFAULT_MODEL_VERSION:-v1.0}
- LOG_LEVEL=INFO
- PROMETHEUS_ENABLED=true
- LOKI_URL=http://aidra-loki:3100
- AIDRA_COMMIT_SHA=${AIDRA_COMMIT_SHA:-unknown}
volumes:
- ./models:/app/models
- aidra-images:/data/images
- aidra-thumbnails:/data/thumbnails
- aidra-interpretability:/data/interpretability
depends_on:
aidra-db:
condition: service_healthy
networks:
- aidra-net
deploy:
resources:
limits:
memory: 12G
reservations:
memory: 4G
# ====== BASE DE DATOS ======
aidra-db:
image: postgis/postgis:16-3.4-alpine
container_name: aidra-db
restart: unless-stopped
ports:
- "127.0.0.1:5432:5432"
environment:
- POSTGRES_DB=aidra
- POSTGRES_USER=aidra
- POSTGRES_PASSWORD=${DB_PASSWORD}
volumes:
- aidra-db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U aidra -d aidra"]
interval: 10s
timeout: 5s
retries: 5
networks:
- aidra-net
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 512M
# ====== GRAFANA ======
aidra-grafana:
image: grafana/grafana-oss:11.0.0
container_name: aidra-grafana
restart: unless-stopped
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
- GF_AUTH_ANONYMOUS_ENABLED=${GRAFANA_ANONYMOUS_ENABLED:-false}
- GF_AUTH_ANONYMOUS_ORG_NAME=${GRAFANA_ANONYMOUS_ORG_NAME:-Main Org.}
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
- GF_AUTH_ANONYMOUS_HIDE_VERSION=true
- GF_USERS_ALLOW_SIGN_UP=false
- GF_EXPLORE_ENABLED=false
- GF_PANELS_DISABLE_SANITIZE_HTML=true
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/dashboards/00-home.json
- DB_PASSWORD=${DB_PASSWORD}
volumes:
- aidra-grafana-data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/etc/grafana/dashboards
depends_on:
- aidra-db
- aidra-prom
networks:
- aidra-net
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
# ====== PROMETHEUS ======
aidra-prom:
image: prom/prometheus:v2.53.0
container_name: aidra-prom
restart: unless-stopped
ports:
- "127.0.0.1:9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- aidra-prom-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.retention.time=30d'
- '--storage.tsdb.retention.size=5GB'
networks:
- aidra-net
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
# ====== LOKI ======
aidra-loki:
image: grafana/loki:3.1.0
container_name: aidra-loki
restart: unless-stopped
ports:
- "127.0.0.1:3100:3100"
volumes:
- ./loki/loki-config.yml:/etc/loki/local-config.yaml
- aidra-loki-data:/loki
command: -config.file=/etc/loki/local-config.yaml
networks:
- aidra-net
deploy:
resources:
limits:
memory: 300M
reservations:
memory: 128M
# ====== PROMTAIL ======
aidra-promtail:
image: grafana/promtail:3.1.0
container_name: aidra-promtail
restart: unless-stopped
volumes:
- ./promtail/promtail-config.yml:/etc/promtail/config.yml
- /var/log:/var/log:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
command: -config.file=/etc/promtail/config.yml
networks:
- aidra-net
deploy:
resources:
limits:
memory: 128M
reservations:
memory: 64M
volumes:
aidra-db-data: # Persistencia PostgreSQL
aidra-grafana-data: # Dashboards y configuracion Grafana
aidra-prom-data: # Datos historicos Prometheus
aidra-loki-data: # Logs historicos
aidra-images: # Cache temporal de imagenes satelitales
aidra-thumbnails: # SAR detection thumbnails (wow #1)
aidra-interpretability: # Grad-CAM + CFAR heatmaps (D4 annex, I-AIA-2)
networks:
aidra-net:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16