Sign inSign up

ossobv/uwsgi-php

By ossobv

Updated about 18 hours ago

Image
0

10K+

ossobv/uwsgi-php repository overview

Example usage
FROM ossobv/uwsgi-php

RUN buildDeps=' \
# Add some build dependencies here which we can remove later
        ' \
    && apt-get update \
    && apt-get install -y \
        $buildDeps \
        --no-install-recommends \
    && rm -rf /var/lib/apt/lists/* \
    && apt-get purge --auto-remove $buildDeps

WORKDIR /app

EXPOSE 8080

NOTE

The default CMD expects a uwsgi.ini in /etc/uwsgi/uwsgi.ini. Below is an example of one:

[uwsgi]
; load the required plugins, php is loaded as the default (0) modifier
plugins = http,0:php

; bind the http router to port 80
http = :$(LISTEN)
; leave the master running as root (to allows bind on port 80)
master = true
master-as-root = true

; drop privileges
uid = www-data 
gid = www-data

; our working dir
project_dir = /code

; chdir to it (just for fun)
chdir = %(project_dir)
; check for static files in it
check-static = %(project_dir)
; ...but skip .php and .inc extensions
static-skip-ext = .php
static-skip-ext = .inc
; search for index.html when a dir is requested
static-index = index.html

; jail our php environment to project_dir
php-docroot = %(project_dir)
; ... and to the .php and .inc extensions
php-allowed-ext = .php
php-allowed-ext = .inc
; and search for index.php and index.inc if required
php-index = index.php
php-index = index.inc
; set php timezone
php-set = date.timezone=Europe/Amsterdam
php-set = upload_max_filesize = 5M
php-set = post_max_size = 5M

; You can bypass the problem by telling the PHP engine that is running under the apache SAPI
php-sapi-name = apache

; use a max of 17 processes
processes = 17
; ...but start with only 2 and spawn the others on demand
cheaper = 2

Tag summary

Content type

Image

Digest

sha256:3b18e6f69

Size

64.1 MB

Last updated

about 18 hours ago

docker pull ossobv/uwsgi-php