-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (33 loc) · 903 Bytes
/
docker-compose.yml
File metadata and controls
34 lines (33 loc) · 903 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
30
31
32
33
34
services:
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: gift_test
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U test -d gift_test"]
interval: 3s
timeout: 3s
retries: 5
app:
build: .
ports:
- "28080:8080"
depends_on:
postgres:
condition: service_healthy
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/gift_test
SPRING_DATASOURCE_USERNAME: test
SPRING_DATASOURCE_PASSWORD: test
SPRING_JPA_HIBERNATE_DDL_AUTO: create
SPRING_JPA_DATABASE_PLATFORM: org.hibernate.dialect.PostgreSQLDialect
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/api/categories || exit 1"]
interval: 5s
timeout: 3s
retries: 10
start_period: 30s