-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (49 loc) · 1.58 KB
/
docker-compose.yml
File metadata and controls
51 lines (49 loc) · 1.58 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
# path: docker-compose.yml
# Spins up PostGIS for ETL build and the ETL runner container.
# The frontend is NOT in compose—run it with `npm run dev` or `make dev`.
services:
postgis:
image: postgis/postgis:16-3.4
container_name: nyrr_postgis
restart: unless-stopped
environment:
POSTGRES_USER: nyrr
POSTGRES_PASSWORD: nyrr_dev
POSTGRES_DB: nyroadreport
ports:
- "5432:5432"
volumes:
- .pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U nyrr -d nyroadreport"]
interval: 5s
retries: 10
etl:
build:
context: ./docker
dockerfile: Dockerfile.etl
container_name: nyrr_etl
depends_on:
postgis:
condition: service_healthy
environment:
DB_HOST: postgis
DB_PORT: 5432
DB_NAME: nyroadreport
DB_USER: nyrr
DB_PASS: nyrr_dev
# Set MARKER_INTERVAL_M to change spacing in meters (default 75)
MARKER_INTERVAL_M: "75"
# Artifact output path inside container (bind-mounted below)
ARTIFACTS_DIR: /artifacts
volumes:
# Mount ETL source code so edits don't require image rebuild during dev
- ./etl:/app/etl
# Artifacts written here end up in frontend/public/data/ on the host
- ./frontend/public/data:/artifacts
# Cache downloaded raw files across runs (speeds up re-runs)
- ./etl/downloads:/app/etl/downloads
working_dir: /app
command: ["bash", "/app/etl/run_all.sh"]
# Override to run a single step, e.g.:
# docker compose run --rm etl python etl/02_load_roads.py