Add core Laravel files and Docker config
This commit is contained in:
parent
b74b487b6b
commit
c49987951e
1 changed files with 26 additions and 0 deletions
26
docker-compose.yml
Normal file
26
docker-compose.yml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
- DB_CONNECTION=mysql
|
||||
- DB_HOST=db
|
||||
- DB_PORT=3306
|
||||
- DB_DATABASE=laravel
|
||||
- DB_USERNAME=root
|
||||
- DB_PASSWORD=root
|
||||
depends_on:
|
||||
- db
|
||||
command: >
|
||||
bash -c "sleep 10 && php artisan migrate --force && php artisan serve --host=0.0.0.0 --port=8000"
|
||||
|
||||
db:
|
||||
image: mysql:8.0
|
||||
environment:
|
||||
- MYSQL_DATABASE=laravel
|
||||
- MYSQL_ROOT_PASSWORD=root
|
||||
ports:
|
||||
- "3306:3306"
|
||||
Loading…
Add table
Reference in a new issue