-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
54 lines (50 loc) · 1.26 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
54 lines (50 loc) · 1.26 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
services:
postgis:
image: postgis/postgis:latest
container_name: postgis_db
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
POSTGRES_DB: gisdb
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
pgadmin4:
image: dpage/pgadmin4
container_name: pgadmin4-gis
ports:
- '5050:80'
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.de
PGADMIN_DEFAULT_PASSWORD: admin
links:
- postgis
app:
build: .
container_name: my_app
depends_on:
- postgis
environment:
DATABASE_URL: postgresql://admin:admin@postgis:5432/gisdb
JAVA_TOOL_OPTIONS: >
-Xmx8g
-XX:ActiveProcessorCount=4
ports:
- "8000:8000"
mem_reservation: 5g
mem_limit: 12g
cpus: "4.0"
command: >
sh -c "
echo 'Waiting for database...' &&
until pg_isready -h postgis -U admin -d gisdb; do sleep 1; done &&
echo 'Running schema creation...' &&
uv run python scripts/create_schema.py &&
echo 'Running POI download...' &&
uv run python scripts/poi_download.py &&
echo 'Starting FastAPI...' &&
uv run fastapi run app.py --port 8000 --host 0.0.0.0
"
volumes:
db_data: