-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (50 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
57 lines (50 loc) · 1.11 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
51
52
53
54
55
56
57
version: '3.8'
# docker-compose up --build
services:
# PostgreSQL Database
db:
image: postgres:14-alpine
container_name: postgres-db
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- app-network
# Spring Boot Backend
backend:
build:
context: ./Linux-Labyrinth
dockerfile: Dockerfile
container_name: spring-backend
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${DB_NAME}
SPRING_DATASOURCE_USERNAME: ${DB_USER}
SPRING_DATASOURCE_PASSWORD: ${DB_PASSWORD}
SPRING_JPA_HIBERNATE_DDL_AUTO: update
ports:
- "8080:8080"
depends_on:
- db
- frontend
networks:
- app-network
# React Frontend
frontend:
build:
context: ./react
dockerfile: Dockerfile
container_name: react-frontend
ports:
- "3000:3000"
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
postgres_data: