-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
34 lines (30 loc) · 743 Bytes
/
compose.yaml
File metadata and controls
34 lines (30 loc) · 743 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
version: '3.8'
services:
postgres:
image: postgres:16
container_name: postgres_db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 1234
POSTGRES_DB: SocialMediaDB
ports:
- "5433:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER}" ]
interval: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
springboot-app:
build: .
container_name: springboot_app
ports:
- "8080:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/SocialMediaDB
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: 1234
depends_on:
- postgres
volumes:
postgres_data: