generated from MinBZK/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
56 lines (53 loc) · 1.27 KB
/
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
48
49
50
51
52
53
54
55
56
services:
amt:
build:
context: .
dockerfile: Dockerfile
image: ghcr.io/minbzk/amt:latest
restart: unless-stopped
volumes:
- ./amt:/app/amt/:cached
depends_on:
db:
condition: service_healthy
env_file:
- path: prod.env
required: true
environment:
- ENVIRONMENT=local
ports:
- 8070:8000
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health/live || exit 1"]
db:
image: postgres:16
restart: unless-stopped
volumes:
- app-db-data:/var/lib/postgresql/data/pgdata
- ./database/:/docker-entrypoint-initdb.d/:cached
env_file:
- path: prod.env
required: true
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "amt", "-U", "amt"]
ports:
- 5432:5432
db-admin:
image: dpage/pgadmin4:8.6
restart: unless-stopped
ports:
- 8080:8080
environment:
- PGADMIN_LISTEN_PORT=${PGADMIN_LISTEN_PORT:-8080}
env_file:
- path: prod.env
required: true
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-O", "-", "http://localhost:8080/misc/ping"]
volumes:
app-db-data: