-
Notifications
You must be signed in to change notification settings - Fork 0
Creating the Laravel Sail app
Clio Brichaut edited this page Jan 14, 2023
·
1 revision
-
Get the prerequisites (Windows): Docker Desktop, Ubuntu 20.04.
-
Create the new LaravelAPI repository on GitHub, then clone it locally.
Use the Ubuntu/WSL terminal for the next commands.
-
Move into the repo with
cd /mnt/c/.../LaravelAPI. -
Install Laravel with
sudo curl -s "https://laravel.build/app?with=mysql" | bash. -
Move into the project with
cd app. -
Launch the containers with
./vendor/bin/sail up -d. -
Open http://localhost/. You can now see the Laravel app running on PHP 8.1, its built-in server, and MySQL 8.
-
Add a phpMyAdmin service in
/app/docker-compose.yml:
phpmyadmin:
image: 'phpmyadmin:latest'
ports:
- 8080:80
networks:
- sail
environment:
PMA_HOST: '${DB_CONNECTION}'
PMA_PORT: '${DB_PORT}'
PMA_USER: '${DB_USERNAME}'
PMA_PASSWORD: '${DB_PASSWORD}'-
Run
./vendor/bin/sail up -dagain. -
Open http://localhost:8080/. You can now access the database in the browser.