This project contains everything you need to quickly get a "Dev" environment up and running with Docker.
- PHP 7.2
- Apache 2.4
- MySQL 5.7
- phpMyAdmin
- Redis
Be sure to replace "project-name" with your project's name.
git clone https://github.com/MohKari/docker-compose-template.git docker-compose-lamp-stack-project-name
Make a copy of the .env.sample
file and call it .env
in your root directory.
cp .env.sample .env
You can then modify any of the default variables to suit your needs.
On windows, press Win+R to open Run and enter the following:
C:\Windows\System32\drivers\etc\hosts
You want to add the following lines to the hosts file, these allow you to talk to the application on those urls.
127.0.0.1 dev.app.com
localhost dev.app.com
To start the application, run the following command.
docker-compose up -d
You should now be able to navigate to http://dev.app.com and https://dev.app.com
You can connect to the web-server using a docker exec
command. Use the command below to login to the web-server container via ssh.
docker exec -it webserver bash
or on windows
winpty docker exec -it webserver bash
You can connect to the redis-server using a docker exec
command. Use the command below to login to the redis-server cli via ssh.
docker exec -it redis redis-cli
or on windows
winpty docker exec -it redis redis-cli
http://dev.app.com:8080 Username: docker Password: docker
Docker Compose code originally forked from https://github.com/sprintcube/docker-compose-lamp/tree/7.2.x