A project that easily provides a php developer's standard environment using Docker with the most important features:
- PHP 7.1
- XDebug
- NGinx
- Memcached
- MariaDB
- Redis
- ElasticSearch
- RabbitMQ
- Download the project to somewhere in your computer, for example: /dockerphp
- Access the project folder, for example: cd /dockerphp
Download Docker for MacOS here:
https://docs.docker.com/docker-for-mac/#/download-docker-for-mac
- Download and install Docker for Mac
- Start it as the documentation shows!
bin/build.sh
Configure your local etc/hosts by adding:
127.0.0.1 dockerphp
Sync your nginx files located in nginx/sites-available folder
bin/nginx-sync.sh
Access in your browser:
http://dockerphp
docker-compose kill
bin/container-list.sh
bin/container-stop-all.sh
bin/container-start-all.sh
bin/container-list-images.sh
bin/container-remove-all.sh
bin/container-remove-all-images.sh
docker-compose logs
bin/container-bash-execute.sh dockerphp 'curl localhost:8080'
bin/container-bash.sh
bin/container-ip.sh dockerphp-mariadb
dockerphp-mariadb:3306
dockerphp-redis:6380
dockerphp-memcached:11211
dockerphp-elasticsearch1:9200
This will update any vhost configuration, etc to your Nginx. Add new files to nginx directory to sync.
bin/nginx-sync.sh
bin/mariadb-connect.sh
bin/redis-connect.sh
bin/elasticsearch-status.sh
To avoid lose image content you can backup/load it by:
bin/image-save.sh dockerphp_web
bin/image-load.sh dockerphp_web
If you are getting any container startup issues, for example if your container keep restarting, you can use the command bellow to start the container with debug mode.
bin/container-restart.sh dockerphp-mariadb