Skip to content

A simple shell script to run a Laravel application in docker container with nginx,mysql and php service using docker-compose.

Notifications You must be signed in to change notification settings

Naterus/docker-compose-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-compose-laravel

License

The code in this repo runs https://restfulcountries.com open source laravel application in a docker container using a shell script (launch.sh).

The shell script checks for docker and docker-compose installations and installs them if not found.Then creates and runs nginx,mysql and php image using docker-compose.

The installation of docker and docker-compose via launch.sh is only tested for ubuntu machine, if you are on Windows,Mac,Linux or any other distro, ensure to manually install Docker and docker-compose before running the launch script.

Docker Desktop is available for Mac and Windows users and it comes with docker-compose as well.

To check if you have docker installed, open terminal and type

  docker --version

You should see docker the docker version.

Also check for docker-compose installation, you should see the version as well.

  docker-compose --version

Run Script

Clone this repository to get a copy of the project.

  git clone https://github.com/Naterus/docker-compose-laravel.git

verify you have all files and folders matching with the repository.

navigate to the root directory of the cloned project in your terminal and type

  sudo ./launch.sh

Depending on your internet speed,this should take some few minutes.

You should see nginx-service, mysql-service and php-service all started.

open localhost:8088 in your browser, you should see restfulcountries app running.

Todo

  • Add docker and docker-compose installation for windows, Mac and other linux distros to launch.sh.

Contributions

Feel free to fork this repo and shoot me a pull request.

License

Software licensed under the MIT license.

About

A simple shell script to run a Laravel application in docker container with nginx,mysql and php service using docker-compose.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published