2021-09-14 20:02:57 +00:00
|
|
|
# This docker-compose file is intended for development use. You can simply run
|
|
|
|
# `docker-compose up -d` in the repository and it should build and run all
|
|
|
|
# required parts of the application. See README.md for details.
|
|
|
|
#
|
|
|
|
# For a production docker setup, please check the corresponding documentation.
|
|
|
|
|
2021-02-17 21:19:42 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
mongo:
|
|
|
|
image: mongo
|
|
|
|
tty: true
|
|
|
|
volumes:
|
|
|
|
- ./local/mongo:/data/db
|
|
|
|
ports:
|
|
|
|
- '27017:27017'
|
|
|
|
restart: on-failure
|
|
|
|
|
2021-10-10 10:32:28 +00:00
|
|
|
postgres:
|
|
|
|
image: "openmaptiles/postgis:6.0"
|
|
|
|
environment:
|
|
|
|
POSTGRES_USER: obs
|
|
|
|
POSTGRES_PASSWORD: obs
|
|
|
|
POSTGRES_DB: obs
|
|
|
|
ports:
|
|
|
|
- '5432:5432'
|
|
|
|
volumes:
|
|
|
|
- ./local/postgres/data:/var/lib/postgresql/data
|
|
|
|
|
2021-02-17 21:19:42 +00:00
|
|
|
api:
|
|
|
|
image: obs-api
|
|
|
|
build:
|
2021-11-04 17:13:24 +00:00
|
|
|
context: ./api/
|
|
|
|
dockerfile: Dockerfile
|
2021-02-17 21:19:42 +00:00
|
|
|
volumes:
|
2021-11-04 17:13:24 +00:00
|
|
|
- ./api/obs:/opt/obs/api/obs
|
|
|
|
- ./api/scripts/obs:/opt/obs/scripts/obs
|
2021-10-10 10:32:28 +00:00
|
|
|
- ./api/tools:/opt/obs/api/tools
|
2021-11-04 17:13:24 +00:00
|
|
|
- ./api/config.dev.py:/opt/obs/api/config.py
|
2021-02-17 21:19:42 +00:00
|
|
|
- ./local/api-data:/data
|
|
|
|
links:
|
2021-11-04 17:13:24 +00:00
|
|
|
- postgres
|
|
|
|
- keycloak
|
2021-02-17 21:19:42 +00:00
|
|
|
ports:
|
|
|
|
- '3000:3000'
|
|
|
|
restart: on-failure
|
|
|
|
command:
|
2021-11-04 17:13:24 +00:00
|
|
|
- obs-api
|
2021-02-17 21:19:42 +00:00
|
|
|
|
2021-04-19 19:38:51 +00:00
|
|
|
worker:
|
|
|
|
image: obs-api
|
|
|
|
build:
|
2021-11-04 17:13:24 +00:00
|
|
|
context: ./api/
|
|
|
|
dockerfile: Dockerfile
|
2021-04-19 19:38:51 +00:00
|
|
|
volumes:
|
2021-11-04 17:13:24 +00:00
|
|
|
- ./api/obs:/opt/obs/api/obs
|
|
|
|
- ./api/scripts/obs:/opt/obs/scripts/obs
|
2021-10-10 10:32:28 +00:00
|
|
|
- ./api/tools:/opt/obs/api/tools
|
2021-11-04 17:13:24 +00:00
|
|
|
- ./api/config.dev.py:/opt/obs/api/config.py
|
2021-04-19 19:38:51 +00:00
|
|
|
- ./local/api-data:/data
|
|
|
|
links:
|
2021-11-04 17:13:24 +00:00
|
|
|
- postgres
|
|
|
|
- keycloak
|
2021-04-19 19:38:51 +00:00
|
|
|
restart: on-failure
|
2021-11-04 17:13:24 +00:00
|
|
|
command:
|
|
|
|
- python
|
|
|
|
- tools/process_track.py
|
2021-04-19 19:38:51 +00:00
|
|
|
|
2021-02-17 21:19:42 +00:00
|
|
|
frontend:
|
|
|
|
image: obs-frontend
|
|
|
|
build:
|
|
|
|
context: ./frontend
|
|
|
|
volumes:
|
|
|
|
- ./frontend/src:/opt/obs/frontend/src
|
|
|
|
- ./frontend/public:/opt/obs/frontend/public
|
|
|
|
- ./frontend/tsconfig.json:/opt/obs/frontend/tsconfig.json
|
|
|
|
- ./frontend/package.json:/opt/obs/frontend/package.json
|
2021-09-14 20:02:57 +00:00
|
|
|
|
|
|
|
# Overwrite the default config with the development mode configuration
|
|
|
|
- ./frontend/config.dev.json:/opt/obs/frontend/public/config.json
|
2021-02-17 21:19:42 +00:00
|
|
|
environment:
|
|
|
|
- PORT=3000
|
|
|
|
links:
|
|
|
|
- api
|
2021-11-04 17:13:24 +00:00
|
|
|
- tileserver
|
2021-02-17 21:19:42 +00:00
|
|
|
ports:
|
|
|
|
- '3001:3000'
|
|
|
|
restart: on-failure
|
|
|
|
command:
|
|
|
|
- npm
|
|
|
|
- start
|
2021-10-10 10:32:28 +00:00
|
|
|
|
|
|
|
openmaptiles-tools:
|
2021-11-04 17:13:24 +00:00
|
|
|
image: openmaptiles/openmaptiles-tools:6.0
|
2021-10-10 10:32:28 +00:00
|
|
|
environment:
|
|
|
|
# Must match the version of this file (first line)
|
|
|
|
# download-osm will use it when generating a composer file
|
|
|
|
MAKE_DC_VERSION: "3"
|
|
|
|
# Allow DIFF_MODE, MIN_ZOOM, and MAX_ZOOM to be overwritten from shell
|
|
|
|
DIFF_MODE: ${DIFF_MODE}
|
|
|
|
MIN_ZOOM: ${MIN_ZOOM}
|
|
|
|
MAX_ZOOM: ${MAX_ZOOM}
|
|
|
|
#Provide BBOX from *.bbox file if exists, else from .env
|
|
|
|
BBOX: ${BBOX}
|
|
|
|
# Imposm configuration file describes how to load updates when enabled
|
|
|
|
IMPOSM_CONFIG_FILE: ${IMPOSM_CONFIG_FILE}
|
|
|
|
# Control import-sql processes
|
|
|
|
MAX_PARALLEL_PSQL: ${MAX_PARALLEL_PSQL}
|
|
|
|
|
|
|
|
PGDATABASE: obs
|
|
|
|
PGUSER: obs
|
|
|
|
PGPASSWORD: obs
|
|
|
|
PGHOST: postgres
|
|
|
|
PGPORT: 5432
|
|
|
|
volumes:
|
|
|
|
- ./tile-generator/:/tileset
|
|
|
|
- ./tile-generator/data:/import
|
|
|
|
- ./tile-generator/data:/export
|
|
|
|
- ./tile-generator/build/sql:/sql
|
|
|
|
- ./tile-generator/build:/mapping
|
|
|
|
- ./tile-generator/cache:/cache
|
|
|
|
|
|
|
|
generate-vectortiles:
|
2021-11-04 17:13:24 +00:00
|
|
|
image: openmaptiles/generate-vectortiles:6.0
|
2021-10-10 10:32:28 +00:00
|
|
|
volumes:
|
|
|
|
- ./tile-generator/data:/export
|
|
|
|
- ./tile-generator/build/openmaptiles.tm2source:/tm2source
|
|
|
|
environment:
|
|
|
|
MBTILES_NAME: ${MBTILES_FILE}
|
|
|
|
BBOX: ${BBOX}
|
|
|
|
MIN_ZOOM: ${MIN_ZOOM}
|
|
|
|
MAX_ZOOM: ${MAX_ZOOM}
|
|
|
|
# Control tilelive-copy threads
|
|
|
|
COPY_CONCURRENCY: ${COPY_CONCURRENCY}
|
|
|
|
#
|
|
|
|
PGDATABASE: obs
|
|
|
|
PGUSER: obs
|
|
|
|
PGPASSWORD: obs
|
|
|
|
PGHOST: postgres
|
|
|
|
PGPORT: 5432
|
|
|
|
|
|
|
|
tileserver:
|
|
|
|
image: klokantech/tileserver-gl
|
|
|
|
ports:
|
|
|
|
- 3002:80
|
|
|
|
volumes:
|
|
|
|
- ./tile-generator/tileserver-gl-config.json:/config/tileserver.json
|
|
|
|
- ./tile-generator/data/:/data
|
|
|
|
command:
|
|
|
|
- --config
|
|
|
|
- /config/tileserver.json
|
2021-11-04 17:13:24 +00:00
|
|
|
|
|
|
|
keycloak:
|
|
|
|
image: jboss/keycloak
|
|
|
|
ports:
|
|
|
|
- 3003:8080
|
|
|
|
links:
|
|
|
|
- postgres
|
|
|
|
environment:
|
|
|
|
KEYCLOAK_USER: admin
|
|
|
|
KEYCLOAK_PASSWORD: admin
|
|
|
|
KEYCLOAK_FRONTEND_URL: http://localhost:3003/auth/
|
|
|
|
DB_VENDOR: postgres
|
|
|
|
DB_ADDR: postgres
|
|
|
|
DB_DATABASE: obs
|
|
|
|
DB_USER: obs
|
|
|
|
DB_PASSWORD: obs
|
|
|
|
# DB_SCHEMA: keycloak
|