-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
104 lines (89 loc) · 2.57 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
92
93
94
95
96
97
98
99
100
101
102
103
104
version: "3.3"
x-app:
&app
image: registry.gitlab.com/scripta/escriptorium:latest
build:
context: .
env_file: variables.env
volumes:
# - ./app/:/usr/src/app/
- static:/usr/src/app/static
- media:/usr/src/app/media
command: /bin/true
services:
web:
<<: *app
command: uwsgi --ini /usr/src/app/uwsgi.ini
expose:
- 8000
channelserver:
<<: *app
command: daphne --bind 0.0.0.0 --port 5000 -v 1 escriptorium.asgi:application
expose:
- 5000
db:
image: docker.io/library/postgres:15
volumes:
- postgres:/var/lib/postgresql/data/
env_file: variables.env
redis:
image: "docker.io/redis:alpine"
nginx:
image: registry.gitlab.com/scripta/escriptorium/nginx
build: ./nginx
environment:
- SERVERNAME=${DOMAIN:-localhost}
volumes:
- type: bind
source: $PWD/nginx/nginx.conf
target: /etc/nginx/conf.d/nginx.conf
- static:/usr/src/app/static
- media:/usr/src/app/media
ports:
- 8080:80
celery-main:
<<: *app
environment:
- OMP_NUM_THREADS=1
command: "celery -A escriptorium worker -l INFO -E -Ofair --prefetch-multiplier 1 -Q default -c ${CELERY_MAIN_CONC:-10} --max-tasks-per-child=10"
celery-live:
<<: *app
command: "celery -A escriptorium worker -l INFO -E -Ofair --prefetch-multiplier 1 -Q live -c ${CELERY_LIVE_CONC:-10} --max-tasks-per-child=10"
celery-low-priority:
<<: *app
command: "celery -A escriptorium worker -l INFO -E -Ofair --prefetch-multiplier 1 -Q low-priority -c ${CELERY_LOW_CONC:-10} --max-tasks-per-child=10"
celery-gpu: &celery-gpu
<<: *app
environment:
- KRAKEN_TRAINING_DEVICE=cpu
command: "celery -A escriptorium worker -l INFO -E -Ofair --prefetch-multiplier 1 -Q gpu -c 1 --max-tasks-per-child=1"
shm_size: '3gb'
flower:
image: docker.io/mher/flower
command: ["celery", "--broker=redis://redis:6379/0", "flower", "--port=5555"]
ports:
- 5555:5555
# No need while we don't have regular tasks
# celerybeat:
# build:
# context: ./app
# env_file: variables.env
# volumes:
# - ./static/:/usr/src/app/static
# - ./media/:/usr/src/app/media
# - static:./static/
# - media:./media/
# command: celery -E -A escriptorium beat -l INFO
mail:
build: ./exim
image: registry.gitlab.com/scripta/escriptorium/mail
expose:
- 25
environment:
- PRIMARY_HOST=${DOMAIN:-localhost}
- ALLOWED_HOSTS=web ; celery-main ; celery-low-priority; docker0
volumes:
static:
media:
postgres:
esdata: