-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (42 loc) · 1.18 KB
/
docker-compose.yml
File metadata and controls
44 lines (42 loc) · 1.18 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
# Local-only runner — convenient for quick iteration without kind.
# Starts Postgres + the Spring Boot app; the app waits for Postgres via
# depends_on/healthcheck.
#
# For the demo, prefer ./deploy_kind.sh (matches production topology).
services:
postgres:
image: postgres:16-alpine
container_name: customer360-postgres
environment:
POSTGRES_DB: customer360
POSTGRES_USER: customer360
POSTGRES_PASSWORD: customer360
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "customer360", "-d", "customer360"]
interval: 5s
timeout: 3s
retries: 10
customer360:
build: .
container_name: customer360
image: customer360:local
depends_on:
postgres:
condition: service_healthy
env_file:
- .env
environment:
SPRING_PROFILES_ACTIVE: default
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/customer360
SPRING_DATASOURCE_USERNAME: customer360
SPRING_DATASOURCE_PASSWORD: customer360
ports:
- "8080:8080"
restart: unless-stopped
volumes:
pgdata: