forked from martin-sicho/genui-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-worker.yml
41 lines (40 loc) · 1.93 KB
/
docker-compose-worker.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
version: '3.7'
services:
celery:
restart: "always"
image: ${GENUI_DOCKER_IMAGE_PREFIX:-sichom}/genui-worker:${GENUI_DOCKER_IMAGE_TAG:-latest}
container_name: ${GENUI_CONTAINER_PREFIX:-genui-docker-}${GENUI_CELERY_NAME:-celery}${GENUI_CELERY_CONTAINER_SUFFIX:-}
user: ${GENUI_USER_ID:-0}:${GENUI_USER_GROUP_ID:-0}
environment:
- GENUI_BACKEND_PROTOCOL=${GENUI_PROTOCOL}
- GENUI_BACKEND_HOST=${GENUI_HOST}
- GENUI_BACKEND_PORT=${GENUI_PORT}
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-genui.settings.prod}
- GENUI_BACKEND_SECRET
- POSTGRES_DB=${POSTGRES_DB:-genui}
- POSTGRES_USER=${POSTGRES_USER:-genui}
- POSTGRES_PASSWORD
- POSTGRES_HOST=${POSTGRES_HOST:-db}
- REDIS_HOST=${REDIS_HOST:-redis}
- REDIS_PASSWORD
- GENUI_USER=${GENUI_USER:-root}
- GENUI_USER_GROUP=${GENUI_USER_GROUP:-root}
- GENUI_CELERY_NAME=${GENUI_CELERY_NAME:-celery}
- GENUI_CELERY_QUEUES=celery
- GENUI_CELERY_CONCURRENCY=${GENUI_CELERY_CONCURRENCY:-0}
- GENUI_CONTAINER_PREFIX=${GENUI_CONTAINER_PREFIX:-genui-docker-}
command: wait-for-it ${GENUI_CONTAINER_PREFIX:-genui-docker-}backend:${GENUI_PORT} -t 3600 -- celery -A genui worker --prefetch-multiplier 1 --concurrency ${GENUI_CELERY_CONCURRENCY:-0} -Q ${GENUI_CELERY_QUEUES:-celery} --loglevel=info -O fair --hostname ${GENUI_CELERY_NAME:-celery}@%h
volumes:
- ${GENUI_DATA_MOUNT:-./genuidata}/media:/genui/data/files/media/
- ${GENUI_DATA_MOUNT:-./genuidata}/home:/home/${GENUI_USER:-root}
- ${DOCKER_USER_CONFIG_MOUNT:-/etc}/group:/etc/group:ro
- ${DOCKER_USER_CONFIG_MOUNT:-/etc}/passwd:/etc/passwd:ro
- ${DOCKER_USER_CONFIG_MOUNT:-/etc}/shadow:/etc/shadow:ro
networks:
- genui_back
networks:
genui_back:
name: ${GENUI_CONTAINER_PREFIX:-genui-docker-}backend
driver: bridge
driver_opts:
com.docker.network.driver.mtu: ${DOCKER_NET_MTU:-1500}