-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (36 loc) · 843 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (36 loc) · 843 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
35
36
37
38
39
40
version: '3.8'
services:
# MySQL Service
mysql:
image: mysql:5.7
container_name: mysql-container
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: OnlineBanking
volumes:
- mysql-data:/var/lib/mysql
ports:
- "3306:3306"
networks:
- banking-network
# BankingApp Service
bankingapp:
build:
context: .
dockerfile: Dockerfile # Use the appropriate Dockerfile in your project
container_name: bankingapp-container
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/OnlineBanking?useSSL=false
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: root
ports:
- "8080:8080"
depends_on:
- mysql
networks:
- banking-network
networks:
banking-network:
driver: bridge
volumes:
mysql-data: