{"id":20113739,"url":"https://github.com/php-pm/php-pm-docker","last_synced_at":"2025-05-06T12:30:37.962Z","repository":{"id":28196545,"uuid":"116591054","full_name":"php-pm/php-pm-docker","owner":"php-pm","description":"Docker files for PHP-PM","archived":false,"fork":false,"pushed_at":"2022-04-18T16:55:48.000Z","size":19,"stargazers_count":119,"open_issues_count":10,"forks_count":26,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-09T12:21:51.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-pm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-07T18:59:17.000Z","updated_at":"2024-10-18T20:56:43.000Z","dependencies_parsed_at":"2022-08-07T13:15:28.897Z","dependency_job_id":null,"html_url":"https://github.com/php-pm/php-pm-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-pm%2Fphp-pm-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-pm%2Fphp-pm-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-pm%2Fphp-pm-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-pm%2Fphp-pm-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-pm","download_url":"https://codeload.github.com/php-pm/php-pm-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252683379,"owners_count":21788028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T18:25:37.254Z","updated_at":"2025-05-06T12:30:37.661Z","avatar_url":"https://github.com/php-pm.png","language":"Shell","readme":"# PHP-PM Docker\n\nYou can use [PHP-PM](https://github.com/php-pm/php-pm) using Docker. We provide you several images always with PHP-PM and PHP7 pre-installed.\n\n## Images\n\n- [`phppm/nginx`](https://hub.docker.com/r/phppm/nginx/): Contains php-pm and uses NGiNX as static file serving \n- [`phppm/standalone`](https://hub.docker.com/r/phppm/standalone/): Contains php-pm and uses php-pm's ability to serve static files (slower)\n- [`phppm/ppm`](https://hub.docker.com/r/phppm/ppm/): Just the php-pm binary as entry point\n\n### Examples\n\n```\n# change into your project folder first\ncd your/symfony-project/\n\n# see what php-pm binary can do for you.\n$ docker run -v `pwd`:/var/www/ phppm/ppm --help\n$ docker run -v `pwd`:/var/www/ phppm/ppm config --help\n\n# with nginx as static file server\n$ docker run -v `pwd`:/var/www -p 8080:80 phppm/nginx\n\n# with php-pm as static file server (dev only)\n$ docker run -v `pwd`:/var/www -p 8080:80 phppm/standalone\n\n# use `PPM_CONFIG` environment variable to choose a different ppm config file.\n$ docker run  -v `pwd`:/var/www -p 80:80 phppm/nginx -c ppm-prod.json\n\n# enable file tracking, to automatically restart ppm when php source changed\n$ docker run -v `pwd`:/var/www -p 80:80 phppm/nginx --debug=1 --app-env=dev\n\n# change static file directory. PPM_STATIC relative to mounted /var/www/.\n$ docker run -v `pwd`:/var/www -p 80:80 phppm/nginx --static-directory=web/\n\n# Use 16 threads/workers for PHP-PM.\n$ docker run -v `pwd`:/var/www -p 80:80 phppm/nginx --workers=16\n```\n\nDocker compose\n\n```\nversion: \"3.1\"\n\nservices:\n  ppm:\n    image: phppm/nginx\n    command: --debug=1 --app-env=dev --static-directory=web/\n    volumes:\n      - ./symfony-app/:/var/www\n    ports:\n      - \"80:80\"\n```\n\n### Configuration\n\nYou should configure PPM via the ppm.json in the root directory, which is within the container mounted to \n`/var/www/`. Alternatively, you can overwrite each option using the regular cli arguments.\n\n```\n# change the ppm.json within current directory\ndocker run -v `pwd`:/var/www phppm/ppm config --help\n\n# not persisting config changes\ndocker run -v `pwd`:/var/www -p 80:80 phppm/nginx --help\ndocker run -v `pwd`:/var/www -p 80:80 phppm/nginx --workers=1 --debug 1\ndocker run -v `pwd`:/var/www -p 80:80 phppm/nginx --c prod-ppm.json\n```\n\n## Build image with own tools/dependencies\n\nIf your applications requires additional php modules or other tools and libraries in your container, you\ncan use our image as base. We use lightweight Alpine Linux.\n\n```\n# Dockerfile\nFROM phppm/nginx:1.0\n\nRUN apk --no-cache add git\nRUN apk --no-cache add ca-certificates wget\n\n# whatever you need \n```\n\n```\ndocker build vendor/my-image -f Dockerfile .\n# now use vendor/my-image instead of `phppm/nginx`\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-pm%2Fphp-pm-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-pm%2Fphp-pm-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-pm%2Fphp-pm-docker/lists"}