Skip to content

NdlAndrey/laravelDocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Laravel in Docker

With this article you’ll learn how to prepare a Docker image of a Laravel application, push it to the registry, and use Docker in Continuous Delivery.

Requirements

Installation

  1. Create/download Laravel project, go to inside project cd project

  2. Clone repository Laravel in Docker inside project and go to folder docker (your can change name folder)

     git clone https://github.com/NdlAndrey/laravelDocker.git docker cd docker 
  3. Set username, password and database for mysql docker-compose.yml

     mysql: environment: - "MYSQL_DATABASE=db_name" - "MYSQL_USER=homestead" - "MYSQL_PASSWORD=secret" - "MYSQL_ROOT_PASSWORD=root_secret" 
  4. For install or up docker use command

     docker-compose up -d 

    from docker folder (default docker)

Helpers commands

All docker command execute from docker folder (default docker)

Enter the app container, to execute commands like (Artisan, Composer, Gulp, …)

 docker-compose exec app bash 

List current running Containers

docker ps 

Close all running Containers

docker-compose stop 

To stop single container do:

docker-compose stop {container-name} 

Delete all existing Containers

docker-compose down 

Kill all services

docker-compose kill 

Donations

Help keeping the project development going donating a little. Thanks in advance.

Donate directly via Paypal

Donate

License

The Laravel framework is open-sourced software licensed under the MIT license.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •