44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
database:
|
|
container_name: stac-db
|
|
image: ghcr.io/stac-utils/pgstac:v0.9.2
|
|
environment:
|
|
- POSTGRES_USER=username
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_DB=postgis
|
|
- PGUSER=username
|
|
- PGPASSWORD=password
|
|
- PGDATABASE=postgis
|
|
ports:
|
|
- "5439:5432"
|
|
command: postgres -N 500
|
|
volumes:
|
|
- ./pgdata:/var/lib/postgresql/data # ✅ 数据持久化路径
|
|
|
|
app:
|
|
container_name: stac-fastapi-pgstac
|
|
image: stac-utils/stac-fastapi-pgstac
|
|
build: .
|
|
environment:
|
|
- APP_HOST=0.0.0.0
|
|
- APP_PORT=8082
|
|
- RELOAD=true
|
|
- ENVIRONMENT=local
|
|
- PGUSER=username
|
|
- PGPASSWORD=password
|
|
- PGDATABASE=postgis
|
|
- PGHOST=database
|
|
- PGPORT=5432
|
|
- WEB_CONCURRENCY=10
|
|
- ENABLE_TRANSACTIONS_EXTENSIONS=true
|
|
ports:
|
|
- "8082:8082"
|
|
volumes:
|
|
- .:/app
|
|
depends_on:
|
|
- database
|
|
command: bash -c "./scripts/wait-for-it.sh database:5432 && python -m stac_fastapi.pgstac.app"
|
|
|