-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.coolify.yml
More file actions
92 lines (86 loc) · 3.25 KB
/
docker-compose.coolify.yml
File metadata and controls
92 lines (86 loc) · 3.25 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
# CORINE (and other data sources): set DATA_SOURCES_DIR to an absolute in-container path
# and mount the host directory that contains a "corine" subfolder (e.g. corine_DEU.gpkg).
# Example host layout: /opt/aethera/data_sources/corine/corine_DEU.gpkg
# Uncomment the volumes and DATA_SOURCES_DIR below for backend and celery-worker when ready.
version: "3.9"
services:
backend:
build:
context: .
dockerfile: backend/Dockerfile
environment:
- DATABASE_URL=postgresql://postgres:${SERVICE_PASSWORD_POSTGRES}@db:5432/aethera_db
- POSTGRES_DSN=postgresql://postgres:${SERVICE_PASSWORD_POSTGRES}@db:5432/aethera_db
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/1
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_ENDPOINT_URL=${AWS_ENDPOINT_URL}
- R2_BUCKET_NAME=aethera-files
- SECRET_KEY=${SECRET_KEY}
- ENVIRONMENT=production
# Shared run output: backend and worker must see the same runs (manifest + processed files)
- DATA_DIR=/data
# CORINE: set to absolute path where data sources are mounted (see volumes)
# - DATA_SOURCES_DIR=/data/sources
depends_on:
- db
- redis
expose:
- "8000"
volumes:
# Shared run output so GET /runs/{id} and /runs/{id}/results see Celery-written data
- run_data:/data
# Mount data sources (CORINE, etc.) so backend can serve layers and pipeline can use them
# - ${DATA_SOURCES_HOST_PATH:-./data_sources}:/data/sources:ro
celery-worker:
build:
context: .
dockerfile: backend/Dockerfile
command: >
celery -A src.workers.celery_app:celery_app worker
--loglevel=info
--concurrency=2
environment:
- DATABASE_URL=postgresql://postgres:${SERVICE_PASSWORD_POSTGRES}@db:5432/aethera_db
- POSTGRES_DSN=postgresql://postgres:${SERVICE_PASSWORD_POSTGRES}@db:5432/aethera_db
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/1
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_ENDPOINT_URL=${AWS_ENDPOINT_URL}
- R2_BUCKET_NAME=aethera-files
- SECRET_KEY=${SECRET_KEY}
- ENVIRONMENT=production
# Same as backend so pipeline output is visible to API (manifest + processed files)
- DATA_DIR=/data
# CORINE: same as backend so analysis pipeline finds CORINE
# - DATA_SOURCES_DIR=/data/sources
depends_on:
- db
- redis
volumes:
# Same volume as backend so run dirs and manifest.json written here are visible to API
- run_data:/data
# Same data sources mount as backend (required for CORINE in analysis)
# - ${DATA_SOURCES_HOST_PATH:-./data_sources}:/data/sources:ro
db:
build:
context: ./docker/postgres
dockerfile: Dockerfile
image: aethera-db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
- POSTGRES_DB=aethera_db
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: redis:7-alpine
command: redis-server --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redisdata:/data
volumes:
pgdata:
redisdata:
run_data: