Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alombarte/nginx-php-fpm

Dockererized Nginx with PHP FPM
https://github.com/alombarte/nginx-php-fpm

Last synced: about 1 month ago
JSON representation

Dockererized Nginx with PHP FPM

Awesome Lists containing this project

README

        

# Dockerized PHP-fpm + Nginx

Build:

docker build -t alombarte/nginx-php-fpm .

Run:

# Pull and run official PHP fpm image:
docker run -d --name php-fpm -v $PWD/example:/var/www/app php:fpm
# Run this image:
docker run -d --name nginx-php -v $PWD/example:/var/www/html --link "php-fpm" -p 8080:80 alombarte/nginx-php-fpm
# Same changing port and host:
docker run -d --name nginx-php -v $PWD/example:/var/www/html --link "php-fpm" -p 8080:80 -e "APP_HOST=php-fpm" -e "APP_PORT=9000" alombarte/nginx-php-fpm

Access your containers:

docker exec -it php-fpm bash
docker exec -it nginx-php bash