Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (106 loc) · 3.92 KB
/
Copy pathdocker-compose.yml
File metadata and controls
111 lines (106 loc) · 3.92 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
101
102
103
104
105
106
107
108
109
110
111
services:
postgis:
image: postgis/postgis:16-3.4
ports:
- "5433:5432"
environment:
POSTGRES_USER: gispulse
POSTGRES_PASSWORD: gispulse
POSTGRES_DB: gispulse
volumes:
- pgdata:/var/lib/postgresql/data
- ./docker/init.sql:/docker-entrypoint-initdb.d/01-init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gispulse"]
interval: 5s
timeout: 5s
retries: 5
gispulse-api:
build:
context: .
dockerfile: Dockerfile
ports:
- "8001:8001"
environment:
GISPULSE_ENGINE: "${GISPULSE_ENGINE:-duckdb}"
GISPULSE_DSN: "${GISPULSE_DSN:-postgresql://gispulse:gispulse@postgis:5432/gispulse}"
GISPULSE_STORAGE: "${GISPULSE_STORAGE:-sqlite}"
GISPULSE_TIER: "${GISPULSE_TIER:-community}"
GISPULSE_LICENSE_KEY: "${GISPULSE_LICENSE_KEY:-}"
GISPULSE_LICENCE_SKIP_VERIFY: "${GISPULSE_LICENCE_SKIP_VERIFY:-false}"
GISPULSE_S3_ENDPOINT: "${GISPULSE_S3_ENDPOINT:-}"
GISPULSE_S3_BUCKET: "${GISPULSE_S3_BUCKET:-gispulse}"
GISPULSE_S3_ACCESS_KEY: "${GISPULSE_S3_ACCESS_KEY:-}"
GISPULSE_S3_SECRET_KEY: "${GISPULSE_S3_SECRET_KEY:-}"
GISPULSE_S3_REGION: "${GISPULSE_S3_REGION:-garage}"
GISPULSE_CORS_ORIGINS: "https://imagodata.github.io,https://demo.gispulse.dev"
depends_on:
postgis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
volumes:
- gispulse_data:/root/.gispulse
- ./core:/app/core
- ./capabilities:/app/capabilities
- ./rules:/app/rules
- ./orchestration:/app/orchestration
- ./persistence:/app/persistence
- ./adapters:/app/adapters
- ./cli.py:/app/cli.py
command:
- uvicorn
- gispulse.adapters.http.app:create_app
- --host=0.0.0.0
- --port=8001
- --factory
- --reload
- --reload-dir=/app/core
- --reload-dir=/app/capabilities
- --reload-dir=/app/rules
- --reload-dir=/app/orchestration
- --reload-dir=/app/persistence
- --reload-dir=/app/adapters
# Object storage (S3-compatible) — opt-in landing zone for raw/derived data
# read in-place by DuckDB (httpfs) and the GeoParquetS3Fetcher (#340).
# Enable with: docker compose --profile garage up -d garage
# Point GISPULSE_S3_* at it from .env (Docker endpoint: http://garage:3900).
# Generate and store Garage daemon secrets in .env first:
# GARAGE_RPC_SECRET=$(openssl rand -hex 32)
# GARAGE_ADMIN_TOKEN=$(openssl rand -base64 32)
# First-run init (once, container running):
# docker compose exec garage /garage status # note the node id
# docker compose exec garage /garage layout assign -z dc1 -c 1G <node-id>
# docker compose exec garage /garage layout apply --version 1
# docker compose exec garage /garage bucket create gispulse
# docker compose exec garage /garage key create gispulse-app
# docker compose exec garage /garage bucket allow --read --write gispulse --key gispulse-app
# then copy the printed Key ID / Secret into your .env (GISPULSE_S3_ACCESS_KEY/SECRET_KEY).
garage:
image: dxflrs/garage:v1.0.1
profiles: ["garage"]
environment:
GARAGE_RPC_SECRET: "${GARAGE_RPC_SECRET:-}"
GARAGE_ADMIN_TOKEN: "${GARAGE_ADMIN_TOKEN:-}"
GARAGE_METRICS_TOKEN: "${GARAGE_METRICS_TOKEN:-}"
ports:
- "3900:3900" # S3 API
- "3903:3903" # admin API
volumes:
- ./docker/garage.toml:/etc/garage.toml:ro
- garage_meta:/var/lib/garage/meta
- garage_data:/var/lib/garage/data
# NB: the portal dev server lives in the sibling repository
# imagodata/gispulse-portal. To run it locally alongside this stack,
# clone that repo and `pnpm dev` against VITE_API_URL=http://localhost:8001.
volumes:
pgdata:
gispulse_data:
garage_meta:
garage_data:
networks:
default: