Minimalist Docker PHP environment using PHP 8.2 and Symfony 6.4 LTS
- Dockerfile & Docker-compose setup with PHP 8.2, Postgresql
- Default Symfony 6.4 installation with a /healthz endpoint and a test for it. Another framework could be used as long as the entry point is in public/index.php
- After the image is started the app should run on port 9001 on localhost. You can try the existing endpoint: http://localhost:9001/healthz
- The default database is very creatively called
databaseand the username and password aredevbox&devboxrespectively - The Postgresql database can be accessed using port 5431 on localhost
- Debugging can be enabled by uncommenting the contents of the file ./docker/service/xdebug.ini
- When configuring debugging in PHPStorm:
- Choose
PHP Remote Debuggingas CLI interpreter. Make sure local interpreter is removed - Choose
Docker Composeas the configuration type anddevbox-serviceas the service - Lifecycle should be
Connect to existing container
- Choose
make run && make install
make test
The setup was tested using Ubuntu 22.04.