-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (67 loc) · 1.64 KB
/
docker-compose.yml
File metadata and controls
72 lines (67 loc) · 1.64 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: '3.8'
services:
mysql:
image: mysql:8.0
container_name: mediway-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: mediwaydb
MYSQL_USER: mediway
MYSQL_PASSWORD: mediway123
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
- ./scripts/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
networks:
- mediway-network
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: mediway-backend
restart: unless-stopped
environment:
SPRING_PROFILES_ACTIVE: docker
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/mediwaydb
SPRING_DATASOURCE_USERNAME: mediway
SPRING_DATASOURCE_PASSWORD: mediway123
PAYPAL_CLIENT_ID: ${PAYPAL_CLIENT_ID}
PAYPAL_CLIENT_SECRET: ${PAYPAL_CLIENT_SECRET}
ports:
- "8080:8080"
depends_on:
mysql:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/actuator/health"]
interval: 30s
timeout: 10s
retries: 5
networks:
- mediway-network
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: mediway-frontend
restart: unless-stopped
environment:
VITE_API_BASE_URL: http://localhost:8080/api
ports:
- "5173:5173"
depends_on:
- backend
networks:
- mediway-network
volumes:
mysql_data:
driver: local
networks:
mediway-network:
driver: bridge