-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (55 loc) · 1.25 KB
/
docker-compose.yml
File metadata and controls
59 lines (55 loc) · 1.25 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
version: "3.8"
services:
backend:
build:
context: .
dockerfile: docker/Dockerfile.backend
container_name: laravel_backend
restart: unless-stopped
ports:
- "8000:8000"
volumes:
- ./backend:/var/www
- ./docker/.env.docker:/var/www/.env
environment:
- DB_HOST=mysql
- DB_DATABASE=laravel_db
- DB_USERNAME=laravel_user
- DB_PASSWORD=laravel_pass
- APP_ENV=local
- VITE_DEV_SERVER_URL=http://host.docker.internal:5173
depends_on:
- mysql
extra_hosts:
- "host.docker.internal:host-gateway"
mysql:
image: mysql:8.0
container_name: mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: laravel_db
MYSQL_USER: laravel_user
MYSQL_PASSWORD: laravel_pass
volumes:
- mysql_data:/var/lib/mysql
ports:
- "3306:3306"
frontend:
build:
context: .
dockerfile: docker/Dockerfile.frontend
container_name: react_frontend
restart: unless-stopped
environment:
- VITE_LARAVEL=true
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- /app/node_modules
- ./backend:/backend
depends_on:
- backend
volumes:
mysql_data: