-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-local.yml
53 lines (50 loc) · 1.15 KB
/
docker-compose-local.yml
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
version: "3.8"
services:
postgres:
image: postgres:14.10-bullseye
container_name: postgres
# ports:
# - "5432:5432"
expose:
- "5432"
env_file:
- .envs/.local/.postgres
environment:
TZ: Asia/Seoul
PGDATA: /data
volumes:
- local_postgres_data:/data
- ./context-files/postgres/ddl:/docker-entrypoint-initdb.d
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
networks:
- spring-web
spring:
build:
context: .
dockerfile: ./docker/local/spring/Dockerfile
image: keyhong/spring-app:v1.0.0
container_name: spring
depends_on:
- postgres
ports:
- "8080:8080"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 3s
retries: 5
command: ["sh", "start"]
networks:
- spring-web
networks:
spring-web:
driver: bridge
volumes:
local_postgres_data: {}