-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yaml
105 lines (99 loc) · 2.72 KB
/
docker-compose.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# 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:7.0"
environment:
POSTGRES_USER: obs
POSTGRES_PASSWORD: obs
POSTGRES_DB: obs
ports:
- '5432:5432'
volumes:
- ./local/postgres/data:/var/lib/postgresql/data
api:
image: openbikesensor-api
tty: true
build:
context: ./api/
dockerfile: Dockerfile
volumes:
- ./api/obs:/opt/obs/api/obs
- ./api/tools:/opt/obs/api/tools
- ./api/config.dev.py:/opt/obs/api/config.py
- ./api/config.overrides.py:/opt/obs/api/config.overrides.py
- ./frontend/build:/opt/obs/frontend/build
- ./tile-generator:/opt/obs/tile-generator
- ./local/api-data:/data
- ./tile-generator/data/:/tiles
- ./api/migrations:/opt/obs/api/migrations
- ./api/alembic.ini:/opt/obs/api/alembic.ini
- ./local/pbf:/pbf
- ./local/obsdata:/obsdata
depends_on:
- postgres
- keycloak
ports:
- '3000:3000'
restart: on-failure
command:
- openbikesensor-api
worker:
image: openbikesensor-api
tty: true
build:
context: ./api/
dockerfile: Dockerfile
volumes:
- ./api/obs:/opt/obs/api/obs
- ./api/tools:/opt/obs/api/tools
- ./api/config.dev.py:/opt/obs/api/config.py
- ./api/config.overrides.py:/opt/obs/api/config.overrides.py
- ./local/api-data:/data
depends_on:
- postgres
- keycloak
restart: on-failure
entrypoint:
- python
- tools/process_track.py
frontend:
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
- ./frontend/webpack.config.js:/opt/obs/frontend/webpack.config.js
depends_on:
- api
environment:
# used for proxy only
- API_URL=http://api:3000/
ports:
- '3001:3001'
restart: on-failure
command:
- npm
- start
keycloak:
image: jboss/keycloak
ports:
- 3003:8080
depends_on:
- 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