https://github.com/borderliner/zen-docker-php82
☯ Zen Docker: php (8.2) + mysql (latest) + redis (latest)
https://github.com/borderliner/zen-docker-php82
docker nginx php redis
Last synced: 5 months ago
JSON representation
☯ Zen Docker: php (8.2) + mysql (latest) + redis (latest)
- Host: GitHub
- URL: https://github.com/borderliner/zen-docker-php82
- Owner: Borderliner
- Created: 2024-03-20T19:42:25.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-15T13:45:30.000Z (almost 2 years ago)
- Last Synced: 2024-07-16T14:48:15.406Z (almost 2 years ago)
- Topics: docker, nginx, php, redis
- Language: Dockerfile
- Homepage: https://github.com/Borderliner/zen-docker-php82
- Size: 583 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ☯ Zen Docker "dev-only" PHP-8.2, Nginx, Redis & MySQL stack (inc. Composer, NodeJs, Adminer)
### What is this repo?
This repo provides you a working development setup for your custom PHP docker image. You can tweak it as you like. There are other pre-made solutions you can try:
- [DDEV](https://ddev.com/)
- [Lando](https://docs.lando.dev/plugins/php)
- [Devilbox](http://devilbox.org/) (Outdated)
### Usage
- Use `docker-compose up` inside this directory to setup your docker containers and start the main PHP container. Everything inside `www` folder will be the root of nginx. By default, files will be served from `www/your_app/public`.
- Use `docker-compose build` to rebuild it in case you've made changes especially to `PHP.Dockerfile`
### Config
- Change `etc/nginx/nginx.conf` value of `root` to the root public folder you want. App will be served from here (typically a `public` folder in frameworks like Laravel)
- You may want to relocate `www/.devcontainer` into `www/your_app/.devcontainer` if your project is in `your_app` folder.
- Set Nodejs version in `.env` have the latest node
### Paths
Nginx URL: http://localhost/
Adminer URL: http://localhost:8080/
### Ports Used
- 80 (nginx)
- 8080 (adminer)
- 9000 (php-fpm)
- 5173 (vite)
- 3306 (mysql)
- 6379 (redis)
### Database Info
Creates 3 empty databases:
1. app_dev
2. app_prod
3. app_test
Creates 2 users (both admin):
1. admin:admin
2. root:root
### PHP Modules
- zip
- simplexml
- xml
- mbstring
- intl
- bcmath
- mcrypt
- oauth
- gd
- pdo
- pdo_mysql
- mysqli
- redis
- yaml
- xdebug
- imagick
- memcache-8.2
- xdebug-3.3.1
- ioncube
### Tools
- composer
- nodejs & npm