A quick and easy way to serve web applications using Docker. It will serve both a web application and MySQL database, including PHPMyAdmin.
- Clone this project;
- Create a new directory
src
in the root folder of this project; - Add a web application (i.e. a Laravel app) in the newley created folder.
- Run
docker-compose up -d
to serve the app and database; The app will be available onhttp://127.0.0.1:8000
. PHPMyAdmin will be available onhttp://127.0.0.1:8080
.
- Run
docker-compose down
to stop all the running containers;
- Run
docker ps
to get the name of the container; - Run
docker exec -it <container name> /bin/bash
to access the container.