-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.nodb.yml
113 lines (108 loc) · 4.08 KB
/
docker-compose.nodb.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
105
106
107
108
109
110
111
112
113
services:
# Frontend - React + nginx + Certbot
frontend:
image: buildingsmart/validationsvc-frontend
build:
context: .
dockerfile: ./docker/frontend/Dockerfile
target: run
restart: unless-stopped
container_name: frontend
ports:
- 80:80
- 443:443
environment:
CERTBOT_DOMAIN: ${CERTBOT_DOMAIN}
CERTBOT_EMAIL: ${CERTBOT_EMAIL}
volumes:
- ./docker/frontend/letsencrypt:/etc/letsencrypt
- static_data:/app/backend/django_static
depends_on:
- backend
# Backend - Django
backend:
image: buildingsmart/validationsvc-backend
build:
context: .
dockerfile: ./docker/backend/Dockerfile
target: run
entrypoint: /app/backend/server-entrypoint.sh
restart: unless-stopped
container_name: backend
volumes:
- static_data:/app/backend/django_static
- files_data:/files_storage
ports:
- 8000:8000
environment:
PUBLIC_URL: ${PUBLIC_URL} # for IAM links
ENV: ${ENV}
DEBUG: ${DEBUG}
CELERY_BROKER_URL: ${CELERY_BROKER_URL}
CELERY_RESULT_BACKEND: "django-db"
CELERY_RESULT_BACKEND_DB: "db+postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_NAME}"
DJANGO_DB: ${DJANGO_DB}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
DJANGO_ALLOWED_HOSTS: ${DJANGO_ALLOWED_HOSTS}
DJANGO_TRUSTED_ORIGINS: ${DJANGO_TRUSTED_ORIGINS}
DJANGO_GUNICORN_WORKERS: ${DJANGO_GUNICORN_WORKERS}
DJANGO_GUNICORN_THREADS_PER_WORKER: ${DJANGO_GUNICORN_THREADS_PER_WORKER}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_NAME: ${POSTGRES_NAME}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
B2C_CLIENT_ID: ${B2C_CLIENT_ID}
B2C_CLIENT_SECRET: ${B2C_CLIENT_SECRET}
B2C_AUTHORITY: ${B2C_AUTHORITY}
B2C_USER_FLOW: ${B2C_USER_FLOW}
USE_WHITELIST: ${USE_WHITELIST}
depends_on:
- redis
# Worker - Celery worker + beat
worker:
image: buildingsmart/validationsvc-backend
entrypoint: /app/backend/worker-entrypoint.sh
restart: unless-stopped
container_name: worker
volumes:
- files_data:/files_storage
environment:
PUBLIC_URL: ${PUBLIC_URL} # for email links
ENV: ${ENV}
DEBUG: ${DEBUG}
CELERY_BROKER_URL: ${CELERY_BROKER_URL}
CELERY_RESULT_BACKEND: "django-db"
CELERY_RESULT_BACKEND_DB: "db+postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_NAME}"
CELERY_TASK_SOFT_TIME_LIMIT: ${CELERY_TASK_SOFT_TIME_LIMIT}
CELERY_TASK_TIME_LIMIT: ${CELERY_TASK_TIME_LIMIT}
TASK_TIMEOUT_LIMIT: ${TASK_TIMEOUT_LIMIT}
CELERY_CONCURRENCY: ${CELERY_CONCURRENCY}
DJANGO_DB: ${DJANGO_DB}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_NAME: ${POSTGRES_NAME}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
MAILGUN_API_URL: ${MAILGUN_API_URL}
MAILGUN_API_KEY: ${MAILGUN_API_KEY}
MAILGUN_FROM_NAME: ${MAILGUN_FROM_NAME}
MAILGUN_FROM_EMAIL: ${MAILGUN_FROM_EMAIL}
ADMIN_EMAIL: ${ADMIN_EMAIL}
CONTACT_EMAIL: ${CONTACT_EMAIL}
depends_on:
- redis
# Redis
redis:
image: redis:7.2-alpine
restart: unless-stopped
container_name: redis
expose:
- ${REDIS_PORT}
volumes:
- redis_data:/data
volumes:
static_data:
files_data:
redis_data: