PHP framework for creating HTTP APIs
git clone https://github.com/aminnairi/docker-php-nginx-mariadb-template my-project
cd my-project
cp .env.example .env
Note: edit the
.env
file to setup your environment.
make start
Note: you can change the port listened by the server with the
SERVER_PORT
environment variable by editing it in the.env
file.
make database
Note: this will login to your database using a command line interface using your environment setup.
make migration
Note: this migrate the datamodel into the SQL database.
make stop
make restart
Note: this is equivalent to running
make stop start
.
docker compose exec php php --version
Note: replace
--version
with the PHP argument of your choice.
docker compose exec mariadb mariadb --version
Note: replace
--version
with the MariaDB argument of your choice.