55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
services:
|
|
db:
|
|
image: postgis/postgis:16-3.4
|
|
environment:
|
|
POSTGRES_DB: geointel
|
|
POSTGRES_USER: geointel
|
|
POSTGRES_PASSWORD: geointel
|
|
volumes:
|
|
- geointel_postgis:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U geointel -d geointel"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
environment:
|
|
DATABASE_URL: postgresql+psycopg://geointel:geointel@db:5432/geointel
|
|
STORAGE_ROOT: /app/storage
|
|
CORS_ORIGINS: http://localhost:1202,http://127.0.0.1:1202
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ./storage:/app/storage
|
|
command: sh /app/docker_start.sh
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=5).read()\""]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 12
|
|
start_period: 30s
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
ports:
|
|
- "1202:80"
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q -O - http://127.0.0.1/health | grep -q '\"status\"'"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 12
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
geointel_postgis:
|