obs-portal/docker-compose.yaml

104 lines
2.7 KiB
YAML
Raw Permalink Normal View History

# 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.
version: '3'
services:
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
api:
2021-11-14 22:42:02 +00:00
image: openbikesensor-api
build:
2021-11-04 17:13:24 +00:00
context: ./api/
dockerfile: Dockerfile
volumes:
2021-11-04 17:13:24 +00:00
- ./api/obs:/opt/obs/api/obs
- ./api/scripts/obs:/opt/obs/scripts/obs
- ./api/tools:/opt/obs/api/tools
2021-11-04 17:13:24 +00:00
- ./api/config.dev.py:/opt/obs/api/config.py
- ./api/config.overrides.py:/opt/obs/api/config.overrides.py
2021-11-14 22:42:02 +00:00
- ./frontend/build:/opt/obs/frontend/build
- ./tile-generator:/opt/obs/tile-generator
- ./local/api-data:/data
2021-11-16 20:59:37 +00:00
- ./tile-generator/data/:/tiles
2022-03-16 20:01:20 +00:00
- ./api/migrations:/opt/obs/api/migrations
- ./api/alembic.ini:/opt/obs/api/alembic.ini
2021-12-25 19:32:53 +00:00
depends_on:
2021-11-04 17:13:24 +00:00
- postgres
- keycloak
ports:
- '3000:3000'
restart: on-failure
command:
2021-11-14 22:42:02 +00:00
- openbikesensor-api
worker:
2021-11-14 22:42:02 +00:00
image: openbikesensor-api
build:
2021-11-04 17:13:24 +00:00
context: ./api/
dockerfile: Dockerfile
volumes:
2021-11-04 17:13:24 +00:00
- ./api/obs:/opt/obs/api/obs
- ./api/scripts/obs:/opt/obs/scripts/obs
- ./api/tools:/opt/obs/api/tools
2021-11-04 17:13:24 +00:00
- ./api/config.dev.py:/opt/obs/api/config.py
- ./api/config.overrides.py:/opt/obs/api/config.overrides.py
- ./local/api-data:/data
2021-12-25 19:32:53 +00:00
depends_on:
2021-11-04 17:13:24 +00:00
- postgres
- keycloak
restart: on-failure
entrypoint:
2021-11-04 17:13:24 +00:00
- python
- tools/process_track.py
frontend:
2021-11-14 22:42:02 +00:00
image: openbikesensor-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-11-27 21:44:19 +00:00
- ./frontend/webpack.config.js:/opt/obs/frontend/webpack.config.js
2021-12-25 19:32:53 +00:00
depends_on:
- api
environment:
# used for proxy only
- API_URL=http://api:3000/
ports:
2021-11-27 21:44:19 +00:00
- '3001:3001'
restart: on-failure
command:
- npm
- start
2021-11-04 17:13:24 +00:00
keycloak:
image: jboss/keycloak
ports:
- 3003:8080
2021-12-25 19:32:53 +00:00
depends_on:
2021-11-04 17:13:24 +00:00
- 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