forked from czcorpus/kontext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
134 lines (126 loc) · 3.69 KB
/
docker-compose.dev.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: '3.7'
services:
kontext-dev:
build:
context: .
dockerfile: dockerfiles/Dockerfile.kontext-dev-jammy
environment:
- TZ=Europe/Prague
- DEV_SERVER_HOST=0.0.0.0
- DEV_PUBLIC_PATH=
command: bash -c "./scripts/install/conf/docker/run.dev.sh"
ports:
# kontext debug port
- "5678:5678"
# sanic inspector
- "6457:6457"
# webpack dev server port
- "9000:9000"
volumes:
- ${KONTEXT_CONFIG}:/opt/kontext/conf/config.xml
# we have to bind folders separatelly
# if we bind whole root, container can't access its node_modules
- ./lib:/opt/kontext/lib
- ./locale:/opt/kontext/locale
- ./scripts:/opt/kontext/scripts
- ./templates:/opt/kontext/templates
- ./worker:/opt/kontext/worker
# similar reason for binding folders
# we need to share dist files with nginx
- dist:/opt/kontext/public/files/dist
- ./public/app.py:/opt/kontext/public/app.py
- ./public/files/css:/opt/kontext/public/files/css
- ./public/files/html:/opt/kontext/public/files/html
- ./public/files/img:/opt/kontext/public/files/img
- ./public/files/js:/opt/kontext/public/files/js
- ./public/files/misc:/opt/kontext/public/files/misc
- ./public/files/themes:/opt/kontext/public/files/themes
- corpora-data:/var/lib/manatee
- corpora-cache:/var/local/corpora
- ./webpack.dev.js:/opt/kontext/webpack.dev.js
networks:
- databases
- kontext
depends_on:
redis:
condition: service_healthy
rq-worker:
build:
context: .
dockerfile: dockerfiles/Dockerfile.rqworker-jammy
environment:
- TZ=Europe/Prague
command: bash -c "pip3 install debugpy pyinotify && python3 scripts/dev/reloader.py /opt/kontext py \"python3 -m debugpy --listen 0.0.0.0:5679 /opt/kontext/worker/rqworker.py\""
ports:
# rqworker debug port
- 5679-5689:5679
volumes:
- ${KONTEXT_CONFIG}:/opt/kontext/conf/config.xml
- ./lib:/opt/kontext/lib
- ./worker:/opt/kontext/worker
- ./scripts:/opt/kontext/scripts
- corpora-data:/var/lib/manatee
- corpora-cache:/var/local/corpora
networks:
- databases
depends_on:
redis:
condition: service_healthy
kontext-dev:
condition: service_started
rq-scheduler:
build:
context: .
dockerfile: dockerfiles/Dockerfile.rqscheduler
environment:
- TZ=Europe/Prague
command: rqscheduler --host kontext_redis_1 --db 2 -i 10
networks:
- databases
depends_on:
redis:
condition: service_healthy
kontext-dev:
condition: service_started
redis:
image: redis:latest
environment:
- TZ=Europe/Prague
networks:
- databases
ports:
- "16379:6379"
volumes:
- redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 10s
retries: 5
nginx:
image: nginx:latest
environment:
- TZ=Europe/Prague
ports:
- "8080:80"
volumes:
- ./scripts/install/conf/docker/nginx.dev.conf:/etc/nginx/conf.d/default.conf
- dist:/opt/kontext/public/files/dist
- ./public/files/html:/opt/kontext/public/files/html
- ./public/files/img:/opt/kontext/public/files/img
- ./public/files/js:/opt/kontext/public/files/js
- ./public/files/misc:/opt/kontext/public/files/misc
- ./public/files/themes:/opt/kontext/public/files/themes
networks:
- kontext
depends_on:
kontext-dev:
condition: service_started
volumes:
dist: {}
corpora-data: {}
corpora-cache: {}
redisdata: {}
networks:
databases: {}
kontext: {}