Skip to content

Latest commit

 

History

History
28 lines (27 loc) · 1.51 KB

README.md

File metadata and controls

28 lines (27 loc) · 1.51 KB

docker-compose-laravel9

Workspace to Laravel 9 projects.
Include container nginx, php, mariadb, phpmyadmin

Edit docker-compose.yml for mariadb service and update: MARIADB_USER, MARIADB_DATABASE, MARIADB_ROOT_PASSWORD.
Create two folders: src and mariadb
Inside folder Mariadb, will store the data generated.
The laravel 9 project, you have to will create inside the src folder.
Inside src folder (terminal), run docker-compose up -d for open the workspace-containers.
Open terminal of php container and execute the command COMPOSER CREATE-PROJECT LARAVEL/LARAVEL . 9.* (note the dot. That indicates that the project will not generate a folder name and version laravel is 9).
Inside container php run: chown -R www-data:www-data storage
Open your host navigator and go to http://localhost:8888 for show laravel welcome blade.

php container include:
Image base php:8.1.15-fpm-alpine3.17
composer 2.53,
node 18.12.1,
npm 9.1.2.


For view php extension run:
docker run -it --rm jesusitodocker/for-laravel9:1.0 php -m

USING VISUAL STUDIO CODE
Open VS Code and install DEV CONTAINER (microsoft) extension.
Attach VS Code to php container.
Open folder /var/www/html
Edit .env file for database configuration DB_HOST=mariadb and other var
All the laravel commands, you can run directly from the PHP container terminal.
Execute migration.
And Ready to code.

Thanks...