2021-09-27 17:34:14 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
networks:
|
|
|
|
gateway:
|
|
|
|
external: true
|
|
|
|
name: gateway
|
|
|
|
backend:
|
|
|
|
internal: true
|
|
|
|
|
|
|
|
services:
|
|
|
|
mongo:
|
|
|
|
image: mongo
|
|
|
|
tty: true
|
|
|
|
volumes:
|
|
|
|
- ./data/mongo:/data/db
|
|
|
|
restart: on-failure
|
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
|
2021-11-21 16:05:46 +00:00
|
|
|
portal:
|
|
|
|
image: openbikesensor-portal
|
2021-09-27 17:34:14 +00:00
|
|
|
build:
|
2021-11-21 16:05:46 +00:00
|
|
|
context: ./source
|
2021-09-27 17:34:14 +00:00
|
|
|
volumes:
|
|
|
|
- ./data/api-data:/data
|
2021-11-21 16:05:46 +00:00
|
|
|
- ./config/config.py:/opt/obs/api/config.py
|
|
|
|
- ./data/tiles/:/tiles
|
2021-09-27 17:34:14 +00:00
|
|
|
restart: on-failure
|
|
|
|
labels:
|
2021-11-21 16:05:46 +00:00
|
|
|
- traefik.http.routers.portal.rule=Host(`portal.example.com`)
|
|
|
|
- traefik.http.routers.portal.entrypoints=websecure
|
|
|
|
- traefik.http.routers.portal.tls=true
|
|
|
|
- traefik.http.routers.portal.tls.certresolver=leresolver
|
2021-09-27 17:34:14 +00:00
|
|
|
- traefik.docker.network=gateway
|
|
|
|
networks:
|
|
|
|
- gateway
|
|
|
|
- backend
|
|
|
|
|
|
|
|
traefik:
|
|
|
|
image: traefik:2.4.8
|
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
|
|
|
# The Web UI (enabled by [api] in traefik.toml)
|
|
|
|
# - "8080:8080"
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
- ./config/traefik.toml:/traefik.toml
|
|
|
|
- ./config/usersfile:/usersfile
|
2021-10-20 21:14:55 +00:00
|
|
|
- ./config/acme:/acme
|
2021-09-27 17:34:14 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
- gateway
|
|
|
|
|
|
|
|
labels:
|
|
|
|
# global redirect from http to https
|
|
|
|
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
|
|
|
|
- "traefik.http.routers.http-catchall.entrypoints=web"
|
|
|
|
# Define middlewares to be used
|
|
|
|
- "traefik.http.routers.http-catchall.middlewares=redirect-http-to-https"
|
|
|
|
# Configure middlewares
|
|
|
|
- "traefik.http.middlewares.redirect-http-to-https.redirectscheme.scheme=https"
|
|
|
|
|
|
|
|
# Show Traefik Dashboard. Enable the dashboard in traefik.toml if you use these.
|
|
|
|
# - "traefik.http.routers.traefik.rule=Host(`traefik.example.com`)"
|
|
|
|
# - "traefik.http.routers.traefik.service=api@internal"
|
|
|
|
# - "traefik.http.routers.traefik.tls=true"
|
|
|
|
# - "traefik.http.routers.traefik.entrypoints=websecure"
|
|
|
|
# - "traefik.http.routers.traefik.tls.certresolver=leresolver"
|
|
|
|
# - "traefik.http.routers.traefik.middlewares=basic-auth"
|
|
|
|
# - "traefik.http.middlewares.basic-auth.basicauth.usersfile=/usersfile"
|
2021-11-21 16:05:46 +00:00
|
|
|
|
|
|
|
openmaptiles-tools:
|
|
|
|
image: openmaptiles/openmaptiles-tools:6.0
|
|
|
|
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:
|
|
|
|
- ./source/tile-generator/:/tileset
|
|
|
|
- ./data/tiles:/import
|
|
|
|
- ./data/tiles:/export
|
|
|
|
- ./data/tiles-build/sql:/sql
|
|
|
|
- ./data/tiles-build:/mapping
|
|
|
|
- ./data/tiles-cache:/cache
|
|
|
|
|
|
|
|
|
|
|
|
generate-vectortiles:
|
|
|
|
image: openmaptiles/generate-vectortiles:6.0
|
|
|
|
volumes:
|
|
|
|
- ./data/tiles:/export
|
|
|
|
- ./data/tiles-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
|
|
|
|
|