-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
88 lines (78 loc) · 2.18 KB
/
docker-compose.yml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<<<<<<< HEAD
version: '3.8'
services:
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: g@utam11 # Root password for MySQL
MYSQL_DATABASE: event-management # Default database to create
MYSQL_USER: root # MySQL user
MYSQL_PASSWORD: g@utam11 # MySQL user's password
ports:
- "3307:3306" # Expose MySQL on port 3306
volumes:
- mysql_data:/var/lib/mysql # Persist MySQL data
server:
build:
context: .
dockerfile: Dockerfile
environment:
- MYSQL_HOST=localhost # Hostname of the MySQL service
- MYSQL_USER=root # MySQL user
- MYSQL_PASSWORD=g@utam11 # MySQL password
- MYSQL_DATABASE=event-management # MySQL database name
ports:
- "3000:3000"
depends_on:
- mysql # Ensure MySQL starts before the server
client:
build:
context: ./client
dockerfile: Dockerfile
ports:
- "5173:5173"
volumes:
- ./client:/Task-3 Event Management
depends_on:
- server # Ensure the server starts before the client
volumes:
mysql_data:
=======
version: '3.8'
services:
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: "Java#123" # Root password for MySQL
MYSQL_DATABASE: eventify # Default database to create
MYSQL_USER: root # MySQL user
MYSQL_PASSWORD: "Java#123" # MySQL user's password
network_mode: host
# ports:
# - "3306:3307" # Expose MySQL on port 3306
server:
build:
context: .
dockerfile: Dockerfile
environment:
- MYSQL_HOST=localhost # Hostname of the MySQL service
- MYSQL_USER=root # MySQL user
- MYSQL_PASSWORD="Java#123" # MySQL password
- MYSQL_DATABASE=eventify # MySQL database name
# ports:
# - "9099:9099"
depends_on:
- mysql # Ensure MySQL starts before the server
client:
build:
context: ./client
dockerfile: Dockerfile
ports:
- "5188:5188"
volumes:
- ./client:/Eventify
depends_on:
- server # Ensure the server starts before the client
volumes:
mysql_data:
>>>>>>> 1b49fffa14635dee7ce366e02760a1574df4ed98