-
Notifications
You must be signed in to change notification settings - Fork 8
Merge docker compose setup into comprehensive workshop environment #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
c116a6f
250a8c1
8892d52
9714034
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "dockerComposeFile": [ | ||
| "../dc-simple.yml" | ||
| "../docker-compose.yml" | ||
| ], | ||
| "service": "devenv" | ||
| } |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| services: | ||
| # Frontend proxy to serve the web interface and route requests | ||
| frontend: | ||
| image: nginx:alpine | ||
| restart: unless-stopped | ||
| ports: | ||
| # These two ports must be identical, and must match the one in nginx.conf | ||
| - "8080:8080" | ||
| volumes: | ||
| - ./nginx.conf:/etc/nginx/nginx.conf | ||
| - ./html:/usr/share/nginx/html | ||
| depends_on: | ||
| - martin | ||
| - maputnik | ||
| networks: | ||
| - workshop | ||
|
|
||
| # Maputnik map style editor | ||
| maputnik: | ||
| image: ghcr.io/maplibre/maputnik:main | ||
| restart: unless-stopped | ||
| expose: | ||
| - "80" | ||
| networks: | ||
| - workshop | ||
|
|
||
| # Martin tile server | ||
| martin: | ||
| image: ghcr.io/maplibre/martin:latest | ||
| restart: unless-stopped | ||
| expose: | ||
| - "3000" | ||
| volumes: | ||
| - ./data:/data | ||
| command: | ||
| - /data/output.mbtiles | ||
| - /data/benches.mbtiles | ||
| - postgresql://postgres:password@db/estonia | ||
| depends_on: | ||
| - db | ||
| networks: | ||
| - workshop | ||
|
|
||
| # Development environment with planetiler and martin CLI tools | ||
| devenv: | ||
| image: ghcr.io/maplibre/workshop:boston | ||
| restart: unless-stopped | ||
| command: sleep infinity | ||
| volumes: | ||
| - ./data:/data | ||
| - ./scripts:/scripts | ||
| networks: | ||
| - workshop | ||
|
|
||
| # Planetiler service to generate MBTiles from OSM data | ||
| planetiler: | ||
| image: ghcr.io/maplibre/workshop:boston | ||
| restart: 'no' | ||
| profiles: ["setup"] | ||
| volumes: | ||
| - ./data:/output | ||
| - ./scripts:/scripts | ||
| working_dir: / | ||
| command: > | ||
| sh -c " | ||
| echo 'Generating base map tiles...' && | ||
| java -jar /planetiler.jar --download_dir=/data/sources --minzoom=0 --maxzoom=14 --osm_path=/data/sources/boston.osm.pbf --output=/output/output.mbtiles && | ||
| echo 'Generating bench overlay tiles...' && | ||
| java -jar /planetiler.jar /scripts/benches.yaml --download_dir=/data/sources --minzoom=0 --maxzoom=14 --osm_path=/data/sources/boston.osm.pbf --output=/output/benches.mbtiles && | ||
| echo 'Tile generation complete!' | ||
| " | ||
| networks: | ||
| - workshop | ||
|
|
||
| # PostgreSQL database with PostGIS extension | ||
| db: | ||
| image: postgis/postgis:16-3.4-alpine | ||
| restart: unless-stopped | ||
| environment: | ||
| - POSTGRES_DB=estonia | ||
| - POSTGRES_USER=postgres | ||
| - POSTGRES_PASSWORD=password | ||
| ports: | ||
| - "5432:5432" | ||
| networks: | ||
| - workshop | ||
| # Uncomment to persist data across container restarts | ||
| # volumes: | ||
| # - ./pg_data:/var/lib/postgresql/data | ||
|
|
||
| # osm2pgsql service to import OSM data into PostgreSQL | ||
| osm2pgsql: | ||
| profiles: ["import"] | ||
| image: ghcr.io/maplibre/workshop:boston | ||
| restart: 'no' | ||
| command: > | ||
| sh -c " | ||
| echo 'Installing osm2pgsql...' && | ||
| apt-get update && apt-get install -y osm2pgsql && | ||
| echo 'Importing OSM data...' && | ||
| osm2pgsql -d postgresql://postgres:password@db/estonia -O flex -S /scripts/bicycle_parking.lua /data/sources/boston.osm.pbf && | ||
| echo 'OSM data import complete!' | ||
| " | ||
| environment: | ||
| - DATABASE_URL=postgresql://postgres:password@db/estonia | ||
| volumes: | ||
| - ./scripts:/scripts | ||
| depends_on: | ||
| - db | ||
| networks: | ||
| - workshop | ||
|
|
||
| networks: | ||
| workshop: | ||
| driver: bridge | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove all network configurations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed all network configurations from docker-compose.yml. Services now use Docker's default bridge network. 9714034