-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.demo.yml
117 lines (111 loc) · 3.47 KB
/
docker-compose.demo.yml
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
106
107
108
109
110
111
112
113
114
115
116
117
version: '3.3'
services:
layman:
container_name: layman
build:
context: .
dockerfile: docker/Dockerfile.production
args:
- UID_GID
image: layman:latest
user: ${UID_GID}
command: bash -c "python3 src/layman_flush_redis.py && python3 src/wait_for_deps.py && cd src && gunicorn --timeout 300 -w 2 -b 0.0.0.0:8000 layman:app"
env_file:
- .env
extra_hosts:
- "host.docker.internal:host-gateway"
- ${EXTRA_HOST1}
- ${EXTRA_HOST2}
volumes:
- ./layman_data:/layman_data
- ./src/layman_settings.py:/code/src/layman_settings.py
- ./version.txt:/code/version.txt
- ./deps/geoserver/data:/geoserver/data_dir
- ./deps/geoserver/sample/geoserver_data:/geoserver/initial_data_dir
- ./deps/qgis/data:/qgis/data
depends_on:
- timgen
- layman_client
- redis
- postgresql
- qgis
- geoserver
celery_worker:
image: layman:latest
user: ${UID_GID}
command: bash -c "cd src && python3 wait_for_layman.py && python3 -m celery -A layman.celery_app worker -Q $${LAYMAN_CELERY_QUEUE} --loglevel=info"
env_file: .env
environment:
- C_FORCE_ROOT=true
- LAYMAN_SKIP_REDIS_LOADING=true
extra_hosts:
- "host.docker.internal:host-gateway"
- ${EXTRA_HOST1}
- ${EXTRA_HOST2}
volumes:
- ./layman_data:/layman_data
- ./src/layman_settings.py:/code/src/layman_settings.py
- ./deps/qgis/data:/qgis/data
- ./deps/geoserver/data:/geoserver/data_dir
depends_on:
- layman
flower:
container_name: flower
image: layman:latest
user: ${UID_GID}
command: bash -c "cd src && python3 wait_for_layman.py && celery -A layman.celery_app flower --port=5555 --url_prefix=flower"
env_file: .env
environment:
- LAYMAN_SKIP_REDIS_LOADING=true
extra_hosts:
- "host.docker.internal:host-gateway"
- ${EXTRA_HOST1}
- ${EXTRA_HOST2}
volumes:
- ./layman_data:/layman_data
- ./src/layman_settings.py:/code/src/layman_settings.py
- ./deps/qgis/data:/qgis/data
depends_on:
- celery_worker
timgen:
container_name: timgen
build:
context: timgen
dockerfile: Dockerfile.production
image: timgen:latest
user: ${UID_GID}
command: node server.js
extra_hosts:
- ${EXTRA_HOST1}
- ${EXTRA_HOST2}
layman_client:
container_name: layman_client
build:
context: client
dockerfile: docker/Dockerfile.production
args:
- LAYMAN_CLIENT_VERSION=${LAYMAN_CLIENT_VERSION}
- LTC_BASEPATH=${LTC_BASEPATH}
image: layman_client:latest
command: sh -c "npm start"
env_file:
- .env
extra_hosts:
- ${EXTRA_HOST1}
- ${EXTRA_HOST2}
depends_on:
- redis
nginx:
image: nginx:1.16-alpine
command: sh -c "envsubst '$$LAYMAN_AUTHN_HTTP_HEADER_NAME' < /etc/nginx/conf.d/nginx-template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
environment:
- LAYMAN_AUTHN_HTTP_HEADER_NAME=${LAYMAN_AUTHN_HTTP_HEADER_NAME}
volumes:
- ./deps/nginx/sample/nginx-template:/etc/nginx/conf.d/nginx-template
ports:
- 80:80
depends_on:
- layman
- layman_client
- flower
- geoserver