-
Notifications
You must be signed in to change notification settings - Fork 22
/
docker-compose.yml
91 lines (85 loc) · 2.25 KB
/
docker-compose.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
services:
kontext:
build:
context: .
dockerfile: dockerfiles/Dockerfile.kontext-jammy
# since we are using shared volume with nginx
# in case different version of kontext is used
# we need to copy files into the shared volume first
#
# also we add default permissions for use with `default_auth` plugin
command: >
bash -c "cp -r /opt/kontext/public/files/* /opt/kontext/public/share &&
python3 lib/plugins/default_auth/scripts/import_users.py lib/plugins/default_auth/scripts/users.sample.json &&
python3 public/app.py --address 0.0.0.0 --port 8080 --workers 2"
volumes:
- ${KONTEXT_CONFIG}:/opt/kontext/conf/config.xml
- files:/opt/kontext/public/share
- corpora-data:/var/lib/manatee
- corpora-cache:/var/local/corpora
networks:
- databases
- kontext
depends_on:
redis:
condition: service_healthy
rq-scheduler:
build:
context: .
dockerfile: dockerfiles/Dockerfile.rqscheduler
command: rqscheduler --host kontext-redis-1 --db 2 -i 10
networks:
- databases
depends_on:
redis:
condition: service_healthy
kontext:
condition: service_started
rq-worker:
build:
context: .
dockerfile: dockerfiles/Dockerfile.rqworker-jammy
volumes:
- ${KONTEXT_CONFIG}:/opt/kontext/conf/config.xml
- corpora-data:/var/lib/manatee
- corpora-cache:/var/local/corpora
networks:
- databases
depends_on:
redis:
condition: service_healthy
kontext:
condition: service_started
redis:
image: redis:latest
networks:
- databases
ports:
- "16379:6379"
volumes:
- redisdata:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 10s
timeout: 10s
retries: 5
nginx:
image: nginx:latest
ports:
- "8080:80"
volumes:
- ./scripts/install/conf/docker/nginx.conf:/etc/nginx/conf.d/default.conf
- files:/opt/kontext/public/files
networks:
- kontext
depends_on:
kontext:
condition: service_started
volumes:
files: {}
corpora-data: {}
corpora-cache: {}
redisdata: {}
networks:
databases: {}
kontext: {}