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...
-
Notifications
You must be signed in to change notification settings - Fork 0
Workspace to Laravel 9 projects. nginx, php, mariadb, phpmyadmin
License
jesustejerina/docker-compose-laravel9
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Workspace to Laravel 9 projects. nginx, php, mariadb, phpmyadmin
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published