Skip to content

jkaninda/nginx-fpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Docker Image Size (latest by date) Docker Pulls

Nginx Web server for PHP FPM

🐳 Nginx Web server for PHP FPM.

Simple docker-compose usage:

version: '3'
services:
    nginx-server:
     image: jkaninda/nginx-fpm:alpine
     container_name: nginx-server
     restart: unless-stopped
     ports:
      - 80:80
     volumes:
      - ./:/var/www/html
     environment:
       - DOCUMENT_ROOT=/var/www/html
       - CLIENT_MAX_BODY_SIZE=20M
       - PHP_FPM_HOST=php-fpm-host:9000 
     networks:
      - default

Advanced Nginx-fpm with PHP FPM:

docker-compose.yml

version: '3'
services:
    php-fpm:
        image: jkaninda/laravel-php-fpm 
        container_name: php-fpm
        restart: unless-stopped 
        pull_policy: if_not_present
        volumes:
        #Project root
            - ./:/var/www/html
        ports:
            - 9000
        networks:
            - default #if you're using networks between containers
    #Nginx server
    nginx-server:
     image: jkaninda/nginx-fpm:stable
     container_name: nginx-server
     restart: unless-stopped
     depends_on:
      -  php-fpm
     ports:
      - 80:80
     volumes:
      - ./:/var/www/html
     environment:
       - DOCUMENT_ROOT=/var/www/html/public
       - CLIENT_MAX_BODY_SIZE=20M
       - PHP_FPM_HOST=php-fpm:9000 
     networks:
      - default

P.S. please give a star if you like it 😉

About

Nginx Web server for PHP FPM

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published