-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (35 loc) · 1.06 KB
/
Copy pathdocker-compose.yml
File metadata and controls
38 lines (35 loc) · 1.06 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
services:
db:
image: postgres:18
environment:
POSTGRES_DB: bookstore
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "5435:5432"
volumes:
- postgres_data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d bookstore"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
app:
build: .
ports:
- "8085:8085"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/bookstore
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: ${DB_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
JWT_EXPIRATION_MS: 86400000
SERVER_PORT: 8085
depends_on:
db:
condition: service_healthy
volumes:
postgres_data:
#Postgres and Docker had conflict with the networking and hostname. Hibernate was not able to find the version.
#Tested across different versions, had conflict between old and newer Pg engine versions however, resolved and currently project and containers working as intended.