-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (47 loc) · 1.07 KB
/
docker-compose.yml
File metadata and controls
51 lines (47 loc) · 1.07 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
version: '3.8'
services:
web:
build: .
restart: always
volumes:
- static_volume:/app/staticfiles
- media_volume:/app/mediafiles
ports:
- "8000:8000"
depends_on:
- redis
environment:
- DJANGO_SETTINGS_MODULE=faqmaster.settings_prod
- REDIS_URL=redis://redis:6379/1
- SECRET_KEY=${DJANGO_SECRET_KEY}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health/"]
interval: 30s
timeout: 10s
retries: 3
nginx:
image: nginx:alpine
restart: always
volumes:
- static_volume:/usr/share/nginx/html/static
- media_volume:/usr/share/nginx/html/media
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "80:80"
depends_on:
- web
redis:
image: redis:7.2.3-alpine
restart: always
volumes:
- redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
volumes:
static_volume:
media_volume:
redis_data: