https://github.com/jgauthi/poc_docker_nginx_php_mysql
Docker compose pack for LAMP development.
https://github.com/jgauthi/poc_docker_nginx_php_mysql
docker-compose maildev mysql-database nginx-docker php82-fpm phpmyadmin traefik-v2
Last synced: 3 months ago
JSON representation
Docker compose pack for LAMP development.
- Host: GitHub
- URL: https://github.com/jgauthi/poc_docker_nginx_php_mysql
- Owner: jgauthi
- License: gpl-3.0
- Created: 2020-08-18T10:11:52.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-25T09:06:49.000Z (11 months ago)
- Last Synced: 2025-01-12T09:42:19.919Z (5 months ago)
- Topics: docker-compose, maildev, mysql-database, nginx-docker, php82-fpm, phpmyadmin, traefik-v2
- Language: Makefile
- Homepage: http://demo.localhost.tv
- Size: 91.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Nginx + PHP + Mysql + Dev Tools
A Docker image based on Ubuntu, serving PHP 8.2 FPM running as Nginx Module. Useful for Web developers in need for a fixed PHP version. In addition, the `error_reporting` setting in php.ini is configurable per container via environment variable.## Prerequisite
* Docker v24+ / Docker-compose v2.21+ / [Manage Docker as a non-root user](https://docs.docker.com/install/linux/linux-postinstall/)
* Make command: Under linux `sudo apt install build-essential` or for [Windows users](https://stackoverflow.com/questions/32127524/how-to-install-and-use-make-in-windows/54086635)
* Git## Installation
Before use the docker version, check that ports 80/8080/443 are available. If an Apache / Nginx local server, another docker container are active, they can block access to these ports.```shell script
# [Optional] Before launch install, you can edit the docker .env
make conf-env-file
# edit .envmake install
# If symfony project is present on project folder
make install composer-install perm
```**Installed packages:**
* nginx
* php
* php-cli
* php-acpu
* php-curl
* php-gd
* php-imagick
* php-intl
* php-mbstring
* php-pdo_mysql
* php-opcache
* php-zip
* composer (php package manager)For test Nginx/php container, you can install Symfony Demo
```shell script
make install-demo
```## Usage
Launch docker containers: `make up`, or stop with `make stop`, you can get command list with `make help`.You can connect on url application:
* [Example Symfony Demo](http://demo.localhost.tv)
* [phpMyAdmin](http://pma.localhost.tv)
* [mailDev](http://maildev.localhost.tv)## Dev environment
If you use dev docker file _(default configuration)_, you have additional tools:* You can access to mysql on localhost:33060 (for PhpStorm / Mysql Workbench).
* You can use mysql command line without indicate user/pass:
* Standard request: `make db-query CMD="show tables;"`
* Dump: `make db-dump`Enjoy