-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (49 loc) · 1.26 KB
/
docker-compose.yml
File metadata and controls
53 lines (49 loc) · 1.26 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
version: '3.9'
services:
webapp:
build:
args:
- PIP_VERSION=${WEBAPP_BUILD_PIP_VERSION}
- POETRY_VERSION=${WEBAPP_BUILD_POETRY_VERSION}
- PYTHON_VERSION=${WEBAPP_BUILD_PYTHON_VERSION}
context: .
target: production
container_name: example-django-mssql-docker-webapp
depends_on:
db:
condition: service_healthy
entrypoint: [ task, run-server-prod ]
env_file:
- .env
image: example-django-mssql-docker-webapp:latest
init: true
networks:
- example-network
ports:
- "8000:80"
volumes:
- ./.local/docker/webapp/.local/:/app/.local/:rw
db:
container_name: example-django-mssql-docker-db
environment:
POSTGRES_DB: ${DB_DATABASE}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
healthcheck:
interval: 30s
retries: 4
start_period: 12s
test: psql -U ${DB_USERNAME} -d ${DB_DATABASE} -h localhost -c 'select 1;'
timeout: 4s
image: postgres:15.3
init: true
networks:
- example-network
ports:
- "5432:5432"
volumes:
- ./.local/docker/db/data/:/var/lib/postgresql/data/:rw
networks:
example-network:
name: example-django-mssql-docker.local
driver: bridge