-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.postgresql.yml
57 lines (53 loc) · 1.29 KB
/
docker-compose.postgresql.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
54
55
56
57
version: '3.8'
services:
postgresql:
container_name: goraebab_postgresql
image: postgres:latest
ports:
- "5432:5432"
volumes:
- ./db/postgresql:/docker-entrypoint-initdb.d
environment:
POSTGRES_PASSWORD: root
command:
- "postgres"
- "-c"
- "shared_buffers=256MB"
- "-c"
- "max_connections=200"
networks:
goraebab_network:
ipv4_address: 172.18.0.20
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
retries: 5
backend:
container_name: goraebab_spring
image: spring:latest
build:
context: ./
ports:
- "2387:2387"
- "5005:5005"
environment:
spring.profiles.active: postgresql
spring.datasource.url: jdbc:postgresql://172.18.0.20:5432/goraebab
spring.datasource.username: postgres
spring.datasource.password: root
spring.datasource.driver-class-name: org.postgresql.Driver
depends_on:
postgresql:
condition: service_healthy
networks:
goraebab_network:
ipv4_address: 172.18.0.10
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
goraebab_network:
name: goraebab_network
ipam:
driver: default
config:
- subnet: 172.18.0.0/16