-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
88 lines (85 loc) · 2.73 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
# docker-compose.yml
services:
web:
build: .
command: gunicorn core.wsgi -b 0.0.0.0:8000
environment:
- DJANGO_DEBUG=${DJANGO_DEBUG}
- DJANGO_SECURE_SSL_REDIRECT=${DJANGO_SECURE_SSL_REDIRECT}
- SECURE_PROXY_SSL_HEADER=${SECURE_PROXY_SSL_HEADER}
- DJANGO_SECURE_HSTS_SECONDS=${DJANGO_SECURE_HSTS_SECONDS}
- DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS=${DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS}
- DJANGO_SECURE_HSTS_PRELOAD=${DJANGO_SECURE_HSTS_PRELOAD}
- DJANGO_SESSION_COOKIE_SECURE=${DJANGO_SESSION_COOKIE_SECURE}
- DJANGO_CSRF_COOKIE_SECURE=${DJANGO_CSRF_COOKIE_SECURE}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_HOST=db
- EMAIL_HOST=${EMAIL_HOST}
- EMAIL_PORT=${EMAIL_PORT}
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
- DEFAULT_FROM_EMAIL=${DEFAULT_FROM_EMAIL}
- STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY}
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
- BACKEND_DOMAIN=${BACKEND_DOMAIN}
- PAYMENT_SUCCESS_URL=${PAYMENT_SUCCESS_URL}
- PAYMENT_CANCEL_URL=${PAYMENT_CANCEL_URL}
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
- S3_BUCKET_ENABLED=${S3_BUCKET_ENABLED}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_STORAGE_BUCKET_NAME=${AWS_STORAGE_BUCKET_NAME}
- AWS_S3_REGION_NAME=${AWS_S3_REGION_NAME}
- LOGGING_ENABLED=${LOGGING_ENABLED}
- DJANGO_AXES_ENABLED=${DJANGO_AXES_ENABLED}
volumes:
- .:/code
ports:
- 8000:8000
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
db:
image: postgres:14
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:6
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
celery:
build: .
command: celery -A core worker --loglevel=info
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_HOST=db
- CELERY_BROKER_URL=redis://redis:6379/0
volumes:
- .:/code
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
volumes:
postgres_data: