-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·116 lines (114 loc) · 3.45 KB
/
docker-compose.yml
File metadata and controls
executable file
·116 lines (114 loc) · 3.45 KB
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
version: "3"
services:
redis:
image: redis:latest
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 1s
timeout: 3s
retries: 5
restart: unless-stopped
api:
image: wycliffeassociates/dft:${IMAGE_TAG}
env_file:
- .env
environment:
TRANSLATIONS_JSON_LOCATION: ${TRANSLATIONS_JSON_LOCATION}
BACKEND_CORS_ORIGINS: ${BACKEND_CORS_ORIGINS}
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379/0}
CELERY_RESULT_BACKEND: ${CELERY_RESULT_BACKEND:-redis://redis:6379/0}
FROM_EMAIL_ADDRESS: ${FROM_EMAIL_ADDRESS}
SMTP_PASSWORD: ${SMTP_PASSWORD}
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SEND_EMAIL: ${SEND_EMAIL}
ports:
- ${API_HOST_PORT:-5005}:5005
command: gunicorn --name dft:entrypoints:app --worker-class uvicorn.workers.UvicornWorker --pythonpath /app/backend --conf /app/backend/gunicorn.conf.py dft.entrypoints.app:app
volumes:
- shared:/app/document_output
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5005/health/status"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
restart: unless-stopped
worker:
image: wycliffeassociates/dft:${IMAGE_TAG}
command: celery --app=dft.domain.worker.app worker --hostname=worker@%h --loglevel=DEBUG -E
environment:
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379/0}
CELERY_RESULT_BACKEND: ${CELERY_RESULT_BACKEND:-redis://redis:6379/0}
# FROM_EMAIL_ADDRESS: ${FROM_EMAIL_ADDRESS}
# SMTP_PASSWORD: ${SMTP_PASSWORD}
# SMTP_HOST: ${SMTP_HOST}
# SMTP_PORT: ${SMTP_PORT}
# SEND_EMAIL: ${SEND_EMAIL}
volumes:
- shared:/app/document_output
depends_on:
api:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: celery -A dft.domain.worker.app inspect ping
interval: 5s
timeout: 5s
retries: 10
start_period: 15s
restart: unless-stopped
celery-dashboard:
image: mher/flower
environment:
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379/0}
CELERY_RESULT_BACKEND: ${CELERY_RESULT_BACKEND:-redis://redis:6379/0}
FLOWER_PORT: 5555
ports:
- ${CELERY_DASHBOARD_HOST_PORT:-5555}:5555
depends_on:
redis:
condition: service_healthy
worker:
condition: service_healthy
restart: unless-stopped
fileserver:
build: ./web
ports:
- ${FILESERVER_HOST_PORT:-8089}:80
volumes:
- shared:/srv/content
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
interval: 5s
timeout: 5s
retries: 10
frontend:
image: wycliffeassociates/dft-ui:${IMAGE_TAG}
environment:
BACKEND_API_URL: ${BACKEND_API_URL:-http://localhost:5005}
FILE_SERVER_URL: ${FILE_SERVER_URL:-http://localhost:8089}
# TODO Get LogRocket ID for dft project
LOGROCKET_ID: ${LOGROCKET_ID:-ct7zyg/dft}
ports:
- ${FRONTEND_HOST_PORT:-8001}:80
depends_on:
api:
condition: service_healthy
worker:
condition: service_healthy
fileserver:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
interval: 5s
timeout: 5s
retries: 10
volumes:
shared: