-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (82 loc) · 2.17 KB
/
Copy pathdocker-compose.yml
File metadata and controls
87 lines (82 loc) · 2.17 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
services:
postgres-hmpps-person-match:
container_name: postgres-hpm
image: postgres:16.8-alpine
ports:
- 5432:5432
networks:
- hmpps
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: dev
tmpfs:
- /var/lib/postgresql
healthcheck:
test: pg_isready -U root -d postgres
start_period: 5s
start_interval: 0.2s
interval: 30s
timeout: 3s
retries: 3
hmpps-person-match:
container_name: hmpps-person-match
image: hmpps-person-match:latest
command: |
sh -c "/app/.venv/bin/python -m pip install --no-cache-dir debugpy &&
python -m debugpy --listen 0.0.0.0:5678 -m uvicorn asgi:app --host 0.0.0.0 --port 5000 --reload --log-level debug"
networks:
- hmpps
build:
context: .
dockerfile: Dockerfile
args:
BUILD_NUMBER: local
GIT_REF: ref
GIT_BRANCH: branch
volumes:
- ./hmpps_person_match:/app/hmpps_person_match/
- ./hmpps_cpr_splink:/app/hmpps_cpr_splink/
environment: &database_config
DATABASE_USERNAME: root
DATABASE_PASSWORD: dev
DATABASE_NAME: postgres
DATABASE_PORT: 5432
DATABASE_HOST: postgres-hmpps-person-match
DB_SSL_ENABLED: False
OAUTH_BASE_URL: http://hmpps-auth:9090
OAUTH_ISSUER_URL_KEY: http://localhost:9090
depends_on:
migrations:
condition: service_completed_successfully
hmpps-auth:
condition: service_healthy
ports:
- 5000:5000
- 5678:5678
migrations:
build: .
container_name: db-migrations
command: alembic upgrade head
networks:
- hmpps
volumes:
- ./hmpps_person_match:/app/hmpps_person_match/
environment:
<<: *database_config
depends_on:
postgres-hmpps-person-match:
condition: service_healthy
hmpps-auth:
image: ghcr.io/ministryofjustice/hmpps-auth:latest
container_name: hmpps-auth
networks:
- hmpps
ports:
- "9090:9090"
healthcheck:
test: ["CMD", "bash", "-c", "echo > /dev/tcp/localhost/9090"]
environment:
- SPRING_PROFILES_ACTIVE=dev
- SERVER_PORT=9090
networks:
hmpps: