-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (47 loc) · 1.07 KB
/
docker-compose.yml
File metadata and controls
50 lines (47 loc) · 1.07 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
version: "3"
services:
sample-api:
image: sample-api:TEST
container_name: sample-api
build:
context: ./sample-api
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
postgresql:
condition: service_healthy
networks:
- my-nw
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgresql:5432/mydb
SPRING_DATASOURCE_USERNAME: appuser
SPRING_DATASOURCE_PASSWORD: password123
healthcheck:
test: "curl http://localhost:8080/actuator/health/readiness || exit 1"
interval: 10s
timeout: 10s
retries: 3
start_period: 30s
postgresql:
image: postgres:12.7-alpine
restart: always
environment:
POSTGRES_USER: appuser
POSTGRES_PASSWORD: password123
PGPASSWORD: password123
POSTGRES_DB: mydb
TZ: "Asia/Tokyo"
ports:
- 5432:5432
networks:
- my-nw
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 10s
retries: 3
start_period: 30s
networks:
my-nw:
driver: bridge