-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
50 lines (45 loc) · 1.12 KB
/
compose.yaml
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
version: '3.8'
services:
frontend:
image: react-app
container_name: react-container
build:
context: ./neshkartfe/Dockerfile # Update this path to your React Dockerfile
ports:
- "3000:3000"
networks:
- app-network
environment:
- REACT_APP_API_URL=http://localhost:8080 # Reference the backend service
backend:
image: neshkart-app
container_name: springboot-container
build:
context: ./neshkart/Dockerfile # Update this path to your Spring Boot Dockerfile
ports:
- "8080:8080"
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/neshkart
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=Password123# # Correct format
depends_on:
- db
networks:
- app-network
db:
image: mysql:8
container_name: mysql-container
environment:
MYSQL_ROOT_PASSWORD: Password123# # Correct format
MYSQL_DATABASE: neshkart
ports:
- "3306:3306"
volumes:
- db-data:/var/lib/mysql
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
db-data: