-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (58 loc) · 1.32 KB
/
Copy pathdocker-compose.yml
File metadata and controls
62 lines (58 loc) · 1.32 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
services:
database:
image: mariadb:10.11
container_name: booking_database
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=booking
- MYSQL_USER=booking_user
- MYSQL_PASSWORD=booking_pass
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
networks:
- booking_network
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: booking_backend
ports:
- "8000:80"
volumes:
- ./backend:/var/www/html
environment:
- APP_ENV=dev
- DATABASE_URL=mysql://booking_user:booking_pass@database:3306/booking?serverVersion=10.11.2-MariaDB&charset=utf8mb4
depends_on:
database:
condition: service_healthy
networks:
- booking_network
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: booking_frontend
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- VITE_API_URL=http://localhost:8000
depends_on:
- backend
networks:
- booking_network
volumes:
db_data:
networks:
booking_network:
driver: bridge