feat: GeoScene frontend POC + Docker deploy for remote host
Migrate maps to @geoscene/core, polish monitoring/alerts UX, fix timeline basemap flicker and district alert regions, and ship compose/nginx Docker deploy assets with CBPOA_ROOT data mounts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,83 +1,47 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgis/postgis:15-3.3
|
||||
container_name: wuhan_postgres
|
||||
environment:
|
||||
POSTGRES_DB: wuhan_disease
|
||||
POSTGRES_USER: wuhan_user
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-wuhan_password}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U wuhan_user -d wuhan_disease"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- wuhan_network
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ../backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: wuhan_backend
|
||||
dockerfile: ../deploy/backend/Dockerfile
|
||||
container_name: cbpoa_backend
|
||||
environment:
|
||||
DATABASE_URL: postgresql://wuhan_user:password@postgres:5432/wuhan_disease
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
CBPOA_ROOT: /data
|
||||
CORS_ORIGINS: "*"
|
||||
volumes:
|
||||
- ../outputs:/data/outputs:ro
|
||||
- ../processed:/data/processed:ro
|
||||
- ../Datas:/data/Datas:ro
|
||||
ports:
|
||||
- "8000:8000"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:8000/docs || exit 1"]
|
||||
interval: 10s
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
start_period: 40s
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- wuhan_network
|
||||
- cbpoa_net
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ../frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: wuhan_frontend
|
||||
environment:
|
||||
VITE_API_URL: http://localhost:8000
|
||||
dockerfile: ../deploy/frontend/Dockerfile
|
||||
container_name: cbpoa_frontend
|
||||
depends_on:
|
||||
- backend
|
||||
backend:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "3000:80"
|
||||
- "80:80"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:80 || exit 1"]
|
||||
interval: 10s
|
||||
test: ["CMD-SHELL", "wget -q -O /dev/null http://localhost/ || exit 1"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- wuhan_network
|
||||
|
||||
# jupyter:
|
||||
# image: jupyter/scipy-notebook:latest
|
||||
# container_name: wuhan_jupyter
|
||||
# ports:
|
||||
# - "8888:8888"
|
||||
# volumes:
|
||||
# - ../processed:/home/jovyan/processed
|
||||
# - ../Datas:/home/jovyan/Datas
|
||||
# networks:
|
||||
# - wuhan_network
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
driver: local
|
||||
- cbpoa_net
|
||||
|
||||
networks:
|
||||
wuhan_network:
|
||||
driver: bridge
|
||||
cbpoa_net:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user