-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (96 loc) · 2.58 KB
/
docker-compose.yml
File metadata and controls
100 lines (96 loc) · 2.58 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
services:
postgis:
image: postgis/postgis:18-3.6
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-geodata}
volumes:
- postgis_data:/var/lib/postgresql
- ./initdb:/docker-entrypoint-initdb.d:ro
ports:
- "5432:5432"
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB:-geodata}",
]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
data-loader:
build:
context: ..
dockerfile: demo/Dockerfile
command: >
uv run python scripts/load_data_postgis.py
environment:
ETTER_DB_URL: >-
postgresql+psycopg2://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgis:5432/${POSTGRES_DB:-geodata}
SWISSNAMES3D_PATH: /data
IGN_BDCARTO_PATH: /data/bdcarto
SWISSNAMES3D_TABLE: ${SWISSNAMES3D_TABLE:-swissnames3d}
IGN_BDCARTO_TABLE: ${IGN_BDCARTO_TABLE:-ign_bdcarto}
IF_EXISTS: ${IF_EXISTS:-replace}
volumes:
- ../data:/data:ro
- ../scripts:/app/scripts:ro
depends_on:
postgis:
condition: service_healthy
restart: "no"
api:
build:
context: ..
dockerfile: demo/Dockerfile
ports:
- "8000:8000"
environment:
OPENAI_API_KEY: ${OPENAI_API_KEY}
# PostGIS mode: set ETTER_DB_URL to use PostGISDataSource
ETTER_DB_URL: >-
postgresql+psycopg2://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgis:5432/${POSTGRES_DB:-geodata}
SWISSNAMES3D_TABLE: ${SWISSNAMES3D_TABLE:-swissnames3d}
IGN_BDCARTO_TABLE: ${IGN_BDCARTO_TABLE:-ign_bdcarto}
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8000/')",
]
interval: 5s
timeout: 10s
retries: 20
start_period: 30s
depends_on:
postgis:
condition: service_healthy
data-loader:
condition: service_completed_successfully
restart: unless-stopped
ts-server:
build:
context: ..
dockerfile: demo/etter-mcp-app/Dockerfile
target: ts-server
ports:
- "3002:3002"
environment:
- PYTHON_API_URL=http://api:8000
- PORT=3002
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:3002/health"]
interval: 5s
timeout: 5s
retries: 10
start_period: 15s
depends_on:
api:
condition: service_healthy
restart: unless-stopped
volumes:
postgis_data: