Template for running PHP and MariaDB behind NGINX using Docker, Docker Compose & GNU/Make for orchestration.
git clone https://github.com/aminnairi/docker-php-nginx-mariadb-template my-project
cd my-projectcp .env.example .envNote: edit the
.envfile to setup your environment.
make startNote: you can change the port listened by the server with the
SERVER_PORTenvironment variable by editing it in the.envfile.
make databaseNote: this will login to your database using a command line interface using your environment setup.
make stopmake restartNote: this is equivalent to running
make stop start.
docker compose exec php php --versionNote: replace
--versionwith the PHP argument of your choice.
docker compose exec mariadb mariadb --versionNote: replace
--versionwith the MariaDB argument of your choice.
INIT