-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (60 loc) · 1.42 KB
/
docker-compose.yml
File metadata and controls
63 lines (60 loc) · 1.42 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
services:
mysql:
image: mysql:8.4
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: secretroot
MYSQL_DATABASE: queiroz_prime
MYSQL_USER: queiroz
MYSQL_PASSWORD: secret
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -uroot -p$$MYSQL_ROOT_PASSWORD"]
interval: 5s
timeout: 3s
retries: 10
backend:
build:
context: ./backend
ports:
- "8000:8000"
environment:
APP_ENV: local
APP_DEBUG: "true"
APP_URL: http://localhost:8000
DB_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: queiroz_prime
DB_USERNAME: queiroz
DB_PASSWORD: secret
volumes:
- ./backend:/var/www
- backend_vendor:/var/www/vendor
depends_on:
mysql:
condition: service_healthy
command: >
sh -c "cp -n .env.example .env
&& composer install
&& php artisan key:generate --force
&& php artisan migrate --force --seed
&& php artisan serve --host=0.0.0.0 --port=8000"
frontend:
build:
context: ./frontend
ports:
- "4001:4001"
environment:
NEXT_PUBLIC_API_BASE_URL: http://localhost:8000/api
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
depends_on:
- backend
volumes:
mysql_data:
backend_vendor:
frontend_node_modules: