https://github.com/ipunkt/nginx
docker image with nginx + php fastcgi
https://github.com/ipunkt/nginx
docker-image nginx-php-fpm
Last synced: about 1 year ago
JSON representation
docker image with nginx + php fastcgi
- Host: GitHub
- URL: https://github.com/ipunkt/nginx
- Owner: ipunkt
- License: mit
- Created: 2016-09-13T08:03:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-02-07T14:57:32.000Z (over 8 years ago)
- Last Synced: 2025-02-07T05:27:39.485Z (over 1 year ago)
- Topics: docker-image, nginx-php-fpm
- Language: Smarty
- Homepage: https://hub.docker.com/r/ipunktbs/nginx/
- Size: 53.7 KB
- Stars: 0
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nginx
docker image with nginx
## Legacy Support
PHP7.0 was removed from this image because maintaining different versions in ipunktbs/php and a single nginx version is
easier than creating different versions of this image.
The following Feautures have been removed because of this:
- artisan migrate & artisan db:seed: Required PHP
- initscript & startscript: Used to prepare for php
- Reown Storage: Used to prepare for php
- wait for database: only done to prepare for artisan migrate & artisan db:seed
### Replacing those functions
To use these functions in the future create a start-once / restart:never container running the given command.
Waiting for the database is not required. A healthcheck should be used instead where the application can decide itself
what conditions to check.
## Parameters
### PHP\_PASS
Defaults to: `backend`
Set the `fastcgi_pass` for php files
### BACKEND\_HOST
Defaults to: `phpfpm:9000`
This host is added as `upstream backend`. Can be used, for example, for `PHP_PASS`
### BACKEND\_MAX\_FAILS
Defaults to: `0`
Set the maximum fails before the backend host is marked as failed
### DNS\_RESOLVER
Defaults to: `cat /etc/resolv.conf | grep nameserver | awk '{ print $2; }'` - first `nameserver` entry in /etc/resolv.conf
Set the dns server which is used to resolve the hostname
### DNS\_VALID
Defaults to: `10s`
Sets the amount of time a dns resolution for a host is cached.
### PHP\_REMOVE
Defaults to `FALSE`
If set to `TRUE` it removes the php configuration from the laravel.conf nginx config. Allows to start
the server without a php-fpm to connect to
### PING\_ENDPOINT
Defaults to `FALSE`
If set to `TRUE` it adds `/ping` as endpoint to the php-fpm ping function
### CACHE\_DIRECTORY
The CACHE\_DIRECTORY parameter will create the given directory and set it's
permissions to 770 for www-data. This is ment to be used as cache path in your
nginx configuration file.
### USER\_ID + GROUP\_ID
Makes the nginx and php-fpm run under these ids. Useful when using the image
for local development
## Available includes
### /etc/nginx/include/harden-http-poxy.conf
Prevent the httpoxy vulnerability
### /etc/nginx/include/cors-options.conf
Set up answering an option request with a 204 CORS Header
### /etc/nginx/include/cors-php.conf
Add CORS Header for php scripts
### /etc/nginx/include/proxy-https.conf
Notify fastcgi of https usage despite ssl/tls termination at a loadbalancer.
Uses the X-FORWARDED-PROTO http header for detection.
### /etc/nginx/include/proxy-ip-rancher.conf
Sets up nginx to extract the real client ip from the X-Forwarded-For header. The
configured internal network address is 10.42.0.0/16 which is used by the rancher
managed network