Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
The Docker setup for PHP applications using PHP7-FPM and Nginx described in http://geekyplatypus.com/dockerise-your-php-application-with-nginx-and-php7-fpm
The Docker setup for PHP applications using PHP7-FPM and Nginx described in http://geekyplatypus.com/dockerise-your-php-application-with-nginx-and-php7-fpm... with a couple of tweaks for my sake (@ntdb).

## Instructions
1. Checkout the repository
* ~~Create a record in your `hosts` file to point `php-docker.local` to your Docker environment~~
* Run `docker-compose up`
* ~~Navigate to php-docker.local:8080 in a browser~~
* Navigate to localhost:8080
1. Run `docker-compose up`
1. Navigate to localhost:8080

That's it! You have your local PHP setup using Docker

*Example of activated PHP logging* - https://github.com/mikechernev/dockerised-php/tree/feature/log-to-stdout
31 changes: 12 additions & 19 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
version: '2'

services:
web:
image: nginx:latest
ports:
- "8080:80"
volumes:
- ./code:/code
- ./site.conf:/etc/nginx/conf.d/default.conf
networks:
- code-network
php:
image: php:fpm
volumes:
- ./code:/code
networks:
- code-network

networks:
code-network:
driver: bridge
web:
image: nginx:alpine
ports:
- "8080:80"
volumes:
- ./code:/code
- ./site.conf:/etc/nginx/conf.d/default.conf
php:
image: php:fpm-alpine
volumes:
- ./code:/code
- ./log.conf:/usr/local/etc/php-fpm.d/zz-log.conf
2 changes: 2 additions & 0 deletions log.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
php_admin_flag[log_errors] = on
php_flag[display_errors] = off