-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
29 lines (27 loc) · 972 Bytes
/
compose.dev.yaml
File metadata and controls
29 lines (27 loc) · 972 Bytes
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
# Development Docker Compose - Database only
# Use this when you want to run the Spring Boot app locally but use a containerized database
# Usage: docker-compose -f compose.dev.yaml up -d
services:
database:
image: 'postgres:18-alpine'
container_name: spring-hello-postgres-dev
restart: unless-stopped
ports:
- '5432:5432'
environment:
- 'POSTGRES_USER=sa'
- 'POSTGRES_DB=product'
- 'POSTGRES_PASSWORD=passu'
volumes:
- postgres_dev_data:/var/lib/postgresql/18/docker
#- ./src/main/resources/db/migration/V1__Create_product_table.sql:/docker-entrypoint-initdb.d/V1__Create_product_table.sql:ro
#- ./src/main/resources/db/migration/V2__Add_product.sql:/docker-entrypoint-initdb.d/V2__Add_product.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sa -d product"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes:
postgres_dev_data:
driver: local