79 lines
1.0 KiB
Markdown
79 lines
1.0 KiB
Markdown
Docker PHP environment
|
|
======================
|
|
|
|
A lightweight and developer-friendly Docker environment for PHP projects.
|
|
|
|
What you get out of the box:
|
|
* PHP 8.4 with popular extensions used in most frameworks.
|
|
* Nginx web server tuned for PHP-FPM.
|
|
* Handy developer tools (Git, Make, cURL).
|
|
* One-line commands to manage the environment.
|
|
* Instant Xdebug setup with VSCode integration.
|
|
|
|
Installed packages
|
|
------------------
|
|
* PHP 8.4
|
|
* nginx
|
|
* curl
|
|
* make
|
|
* git
|
|
|
|
Installed PHP extensions
|
|
------------------------
|
|
* pdo_pgsql
|
|
* bcmath
|
|
* curl
|
|
* exif
|
|
* zip
|
|
* bz2
|
|
* gd
|
|
|
|
Configuration
|
|
-------------
|
|
Set up environment variables in `.env`:
|
|
```shell
|
|
nano ./docker/.env
|
|
```
|
|
|
|
Commands
|
|
--------
|
|
Show available commands:
|
|
```shell
|
|
make help
|
|
```
|
|
|
|
Run environment (available on `APP_PORT`):
|
|
```shell
|
|
make up
|
|
```
|
|
|
|
Stop environment:
|
|
```shell
|
|
make down
|
|
```
|
|
|
|
Restart environment:
|
|
```shell
|
|
make restart
|
|
```
|
|
|
|
Publish VSCode Xdebug config:
|
|
```shell
|
|
make vscode-xdebug
|
|
```
|
|
|
|
Build Docker image:
|
|
```shell
|
|
make build
|
|
```
|
|
|
|
Publish image:
|
|
```shell
|
|
make push
|
|
```
|
|
|
|
Cleanup:
|
|
```shell
|
|
make clear
|
|
```
|