-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (52 loc) · 1.22 KB
/
docker-compose.yml
File metadata and controls
56 lines (52 loc) · 1.22 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
services:
db:
image: postgres:16.0-alpine
container_name: c-postgres
volumes:
- postgres_data:/var/lib/postgresql/data
env_file:
- ./.env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 3s
retries: 3
django:
build: ./log_aggregator
container_name: c-django
volumes:
- django_media:/var/www/media
- django_static:/var/www/static
expose:
- "8000"
env_file:
- ./.env
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000 || exit 1"]
interval: 30s
timeout: 10s
retries: 5
nginx:
image: nginx:latest
container_name: c-nginx
volumes:
- ./infra/nginx/conf/nginx.conf:/etc/nginx/nginx.conf:ro
- ./infra/nginx/conf/conf.d:/etc/nginx/conf.d:ro
- django_media:/var/www/media
- django_static:/var/www/static
ports:
- "80:80"
depends_on:
django:
condition: service_healthy
volumes:
postgres_data:
django_media:
django_static: