-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-deploy.yml
More file actions
122 lines (118 loc) · 3.12 KB
/
Copy pathdocker-compose-deploy.yml
File metadata and controls
122 lines (118 loc) · 3.12 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
117
118
119
120
121
122
services:
app_opensesa:
build:
context: .
restart: always
volumes:
- static-data:/vol/web
env_file:
- .env
environment:
- DB_HOST=db_opensesa
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- SECRET_KEY=${DJANGO_SECRET_KEY}
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS}
- EMAIL_HOST=${EMAIL_HOST}
- EMAIL_PORT=${EMAIL_PORT}
- EMAIL_USE_TLS=${EMAIL_USE_TLS}
- EMAIL_USE_SSL=${EMAIL_USE_SSL}
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
- DEFAULT_FROM_EMAIL=${DEFAULT_FROM_EMAIL}
- CELERY_BROKER_URL=redis://redis_opensesa:6379/0
- CELERY_RESULT_BACKEND=redis://redis_opensesa:6379/1
- STATIC_ROOT=/vol/web/static
- MEDIA_ROOT=/vol/web/media
depends_on:
db_opensesa:
condition: service_healthy
redis_opensesa:
condition: service_healthy
networks:
- internal_net
db_opensesa:
image: postgres:18.3-alpine
restart: always
volumes:
- postgres-data:/var/lib/postgresql
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "${DB_NAME}", "-U", "${DB_USER}"]
networks:
- internal_net
redis_opensesa:
image: redis:7.4.0-alpine
restart: always
command: ["redis-server", "--save", "60", "1", "--loglevel", "warning"]
volumes:
- redis-data-opensesa:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- internal_net
celery_opensesa:
build:
context: .
restart: always
command: >
sh -c "python manage.py wait_for_db &&
celery -A app worker -l info"
volumes:
- static-data:/vol/web
env_file:
- .env
environment:
- DB_HOST=db_opensesa
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- SECRET_KEY=${DJANGO_SECRET_KEY}
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS}
- EMAIL_HOST=${EMAIL_HOST}
- EMAIL_PORT=${EMAIL_PORT}
- EMAIL_USE_TLS=${EMAIL_USE_TLS}
- EMAIL_USE_SSL=${EMAIL_USE_SSL}
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
- DEFAULT_FROM_EMAIL=${DEFAULT_FROM_EMAIL}
- CELERY_BROKER_URL=redis://redis_opensesa:6379/0
- CELERY_RESULT_BACKEND=redis://redis_opensesa:6379/1
- STATIC_ROOT=/vol/web/static
- MEDIA_ROOT=/vol/web/media
depends_on:
db_opensesa:
condition: service_healthy
redis_opensesa:
condition: service_healthy
networks:
- internal_net
proxy_opensesa:
build:
context: ./proxy
restart: always
depends_on:
- app_opensesa
ports:
- 8008:8008
volumes:
- static-data:/vol/static
networks:
- nginx_proxy_net
- internal_net
volumes:
postgres-data:
static-data:
redis-data-opensesa:
networks:
nginx_proxy_net:
external: true
internal_net:
driver: bridge