-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.celery.yml
93 lines (86 loc) · 3.01 KB
/
docker-compose.celery.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
# Override compose file to enable celery services locally
# Adds containers for beat and worker + minor tweaks for main backend
# Run like:
# sudo docker compose -f docker-compose.yml -f docker-compose.celery.yml up
version: '3'
services:
# The stack backend
backend:
env_file:
- .env
environment:
# Celery tasks run as intended here
CELERY_TASK_ALWAYS_EAGER: 'False'
healthcheck:
test: python manage.py --help || exit 1
interval: 10s
timeout: 10s
retries: 20
start_period: 10s
celery_worker:
command: sh -c "celery -A fragalysis worker -l info"
container_name: celery_worker
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
backend:
condition: service_healthy
hostname: celery_worker
env_file:
- .env
image: ${BE_NAMESPACE:-xchem}/fragalysis-backend:${BE_IMAGE_TAG:-latest}
restart: on-failure
volumes:
- ./data/logs:/code/logs/
- ./data/media:/code/media/
- .:/code/
environment:
AUTHENTICATE_UPLOAD: ${AUTHENTICATE_UPLOAD:-True}
DEPLOYMENT_MODE: 'development'
POSTGRESQL_USER: postgres
# Comma-separated dforced errors (infections?)
INFECTIONS: ''
# Celery tasks need to run synchronously
CELERY_TASK_ALWAYS_EAGER: 'False'
# Error reporting and default/root log-level
FRAGALYSIS_BACKEND_SENTRY_DNS: ${FRAGALYSIS_BACKEND_SENTRY_DNS}
LOGGING_FRAMEWORK_ROOT_LEVEL: ${LOGGING_FRAMEWORK_ROOT_LEVEL:-INFO}
# Keycloak configuration
OIDC_KEYCLOAK_REALM: ${OIDC_KEYCLOAK_REALM}
OIDC_RP_CLIENT_ID: ${OIDC_RP_CLIENT_ID:-fragalysis-local}
OIDC_RP_CLIENT_SECRET: ${OIDC_RP_CLIENT_SECRET}
OIDC_AS_CLIENT_ID: ${OIDC_AS_CLIENT_ID:-account-server-api}
OIDC_DM_CLIENT_ID: ${OIDC_DM_CLIENT_ID:-data-manager-api}
OIDC_RENEW_ID_TOKEN_EXPIRY_MINUTES: '210'
# Public target access strings?
# A comma-separated list of Project titles.
PUBLIC_TAS: ${PUBLIC_TAS:-lb18145-1}
# Squonk configuration
SQUONK2_VERIFY_CERTIFICATES: 'No'
SQUONK2_UNIT_BILLING_DAY: 3
SQUONK2_PRODUCT_FLAVOUR: BRONZE
SQUONK2_SLUG: fs-local
SQUONK2_ORG_OWNER: ${SQUONK2_ORG_OWNER}
SQUONK2_ORG_OWNER_PASSWORD: ${SQUONK2_ORG_OWNER_PASSWORD}
SQUONK2_ORG_UUID: ${SQUONK2_ORG_UUID}
SQUONK2_UI_URL: ${SQUONK2_UI_URL}
SQUONK2_DMAPI_URL: ${SQUONK2_DMAPI_URL}
SQUONK2_ASAPI_URL: ${SQUONK2_ASAPI_URL}
PROXY_FORWARDED_PROTO_HEADER: ${PROXY_FORWARDED_PROTO_HEADER:-http}
celery_beat:
command: sh -c "celery -A fragalysis beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler"
container_name: celery_beat
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
backend:
condition: service_healthy
hostname: celery_beat
env_file:
- .env
image: ${BE_NAMESPACE:-xchem}/fragalysis-backend:${BE_IMAGE_TAG:-latest}
restart: on-failure