https://github.com/null-none/docker-compose-php-stack
A simple and light docker-compose stack for PHP apps
https://github.com/null-none/docker-compose-php-stack
docker docker-compose nginx php
Last synced: 3 months ago
JSON representation
A simple and light docker-compose stack for PHP apps
- Host: GitHub
- URL: https://github.com/null-none/docker-compose-php-stack
- Owner: null-none
- License: mit
- Created: 2022-04-28T09:09:53.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-28T09:28:03.000Z (almost 4 years ago)
- Last Synced: 2025-05-27T17:05:59.720Z (10 months ago)
- Topics: docker, docker-compose, nginx, php
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple and light docker-compose stack for PHP apps
Stack with three cointainres: Nginx, PHP-fpm and Postgres with the purpose to use with any PHP project.
You can use (almost) the same enviroment to develop, production and testing!
This is a perfect alternative to usual Vagrant images... Forget Virtualbox and VMWare for develop!
Each container is based in Alpine linux, a light distro which has only 5 Mb. This is a very light stack and scalable (this depends of your app)
## Requirements
You only need docker and docker-compose installed.
Install [docker](https://docs.docker.com/engine/installation/) and [docker-compose](https://docs.docker.com/compose/install/)
## Run
```
docker-compose up
```
Now, you only have to visit http://localhost:8888 In http://localhost:8888/example.php you can see a little example querying Postgres
## Structure
```
├── app
│ ├── example.php # Example querying database
│ └── index.php # phpinfo
├── docker-compose.yml
├── log # (Created after run docker-compose)
│ ├── nginx # Nginx logs
│ └── php-fmp # PHP logs
├── .data # (Created after run docker-compose)
│ └── db # Database data
├── nginx
│ └── vhost.conf # VirtualHost conf file for Nginx
└── php-fpm
├── Dockerfile # PHP docker image, modify it to add PHP extensions, for example
├── php-fpm.conf # PHP-fpm conf file
└── php.ini # php.ini file
```