This is an evolving basic project template for developing PHP based applications with Docker. It is used for providing a local development environment. This does work fine on Linux, but probably needs adjustments for Windows, macOS or other systems (access rights, port and user mappings).
Please note: This is mostly used internally, but I am happy if anyone finds this useful or provides improvements.
- Web server: Apache httpd
- uses luzat/httpd
- HTTP/2
- SSL
- Mailcatcher
- Mails sent from PHP by default get delivered to mailcatcher, which is accessible by browser on port 1080.
- MySQL
- PHP FPM
- uses luzat/php
- Configurability:
*.conf
taken from{httpd,mysql,php}/conf.d
(samples in*/conf.d
)).env
file (rename and adjust .env.sample)
- Optional SSL support:
- requires
server.crt
andserver.key
inhttpd/
- requires
Code goes into htdocs/. For database initialization, SQL scripts go into mysql/initdb.d/. MySQL data is stored in mysql/data/. A few small basic helper scripts are available from bin/.
Thomas Luzat - luzat.com
This project is licensed under the ISC License.