-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (40 loc) · 1.02 KB
/
docker-compose.yml
File metadata and controls
42 lines (40 loc) · 1.02 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
services:
db:
image: postgres:17
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB} -h localhost || exit 1"]
interval: 10s
timeout: 5s
retries: 5
web:
build: .
environment:
DJANGO_SETTINGS_MODULE: autoservice_book.settings
DJANGO_WSGI_MODULE: autoservice_book.wsgi
GUNICORN_LOGLEVEL: info
FIXTURE_BRANDS: /app/service_book/fixtures/brands.json
command: >
gunicorn ${DJANGO_WSGI_MODULE:-autoservice_book.wsgi}:application
--bind 0.0.0.0:8000
--workers 3
--access-logfile -
--error-logfile -
--log-level ${GUNICORN_LOGLEVEL:-info}
volumes:
- .:/app
ports:
- "8000:8000"
env_file:
- .env
depends_on:
db:
condition: service_healthy
volumes:
db_data: