Name: php-pm-docker
Owner: PPM - PHP Process Manager
Description: Docker files for PHP-PM
Created: 2018-01-07 18:59:17.0
Updated: 2018-05-15 08:52:32.0
Pushed: 2018-03-22 15:24:47.0
Size: 23
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
You can use PHP-PM using Docker. We provide you several images always with PHP-PM and PHP7 pre-installed.
phppm/nginx
: Contains php-pm and uses NGiNX as static file servingphppm/standalone
: Contains php-pm and uses php-pm's ability to serve static files (slower)phppm/ppm
: Just the php-pm binary as entry pointange into your project folder first
our/symfony-project/
e what php-pm binary can do for you.
cker run -v `pwd`:/var/www/ phppm/ppm --help
cker run -v `pwd`:/var/www/ phppm/ppm config --help
th nginx as static file server
cker run -v `pwd`:/var/www -p 8080:80 phppm/nginx
th php-pm as static file server (dev only)
cker run -v `pwd`:/var/www -p 8080:80 phppm/standalone
e `PPM_CONFIG` environment variable to choose a different ppm config file.
cker run -v `pwd`:/var/www -p 80:80 phppm/nginx -c ppm-prod.json
able file tracking, to automatically restart ppm when php source changed
cker run -v `pwd`:/var/www -p 80:80 phppm/nginx --debug=1 --app-env=dev
ange static file directory. PPM_STATIC relative to mounted /var/www/.
cker run -v `pwd`:/var/www -p 80:80 phppm/nginx --static-directory=web/
e 16 threads/workers for PHP-PM.
cker run -v `pwd`:/var/www -p 80:80 phppm/nginx --workers=16
Docker compose
ion: "3.1"
ices:
m:
image: phppm/nginx
command: --debug=1 --app-env=dev --static-directory=web/
volumes:
- ./symfony-app/:/var/www
ports:
- "80:80"
You should configure PPM via the ppm.json in the root directory, which is within the container mounted to
/var/www/
. Alternatively, you can overwrite each option using the regular cli arguments.
ange the ppm.json within current directory
er run -v `pwd`:/var/www phppm/ppm config --help
t persisting config changes
er run -v `pwd`:/var/www -p 80:80 phppm/nginx --help
er run -v `pwd`:/var/www -p 80:80 phppm/nginx --workers=1 --debug 1
er run -v `pwd`:/var/www -p 80:80 phppm/nginx --c prod-ppm.json
If your applications requires additional php modules or other tools and libraries in your container, you can use our image as base. We use lightweight Alpine Linux.
ckerfile
phppm/nginx:1.0
apk --no-cache add git
apk --no-cache add ca-certificates wget
atever you need
er build vendor/my-image -f Dockerfile .
w use vendor/my-image instead of `phppm/nginx`