-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathcompose.yml
47 lines (42 loc) · 990 Bytes
/
compose.yml
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
x-common-settings: &common-settings
build:
context: .
dockerfile: ./Dockerfile
target: release
depends_on:
db:
condition: service_healthy
environment:
- "ALLOWED_HOSTS=*"
- "DATABASE_URL=postgres://postgres@db/postgres"
- "DJANGO_DEBUG=true"
restart: on-failure
volumes:
- .:/src:cache
services:
db:
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "postgres"]
interval: 10s
timeout: 3s
retries: 3
image: "pgautoupgrade/pgautoupgrade:latest"
init: true
volumes:
- .:/src:cache
- postgres-data:/var/lib/postgresql/data/
utility:
<<: *common-settings
tty: true
web:
<<: *common-settings
command: ["python", "-m", "manage", "runserver", "--skip-checks", "0.0.0.0:8000"]
entrypoint: ["/src/compose-entrypoint.sh"]
init: true
ports:
- "8000:8000"
tty: true
volumes:
postgres-data: