Skip to content

Whopag/LaravelMySQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Boilerplate with with 👉Docker👈

License Languages Last Commit Followers

Setup a Laravel application
Remove the existing one
    sudo rm -Rf html
Create an empty Laravel application
    composer create-project laravel/laravel html

After create a new project or using yours, configure the environment variables

    DB_CONNECTION=mysql
    DB_HOST=laravelmysql_mysql_1
    DB_PORT=3306
    DB_DATABASE=laravel
    DB_USERNAME=root
    DB_PASSWORD=secret

Now you have to build the image from Docker image

    docker-compose up -d --build

Run Laravel migrations

    docker-compose run --rm artisan migrate:fresh --seed

Create an Laravel application key

    docker-compose run --rm artisan key:generate

Topics

🚀 Docker

If necessary, you can remove all images using docker system prune -a --volumes

Questions

Any questions or suggestions regarding the project, please contact me on 📧 [email protected]

About

Sample Laravel, MySQL app with Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published