Last active
August 14, 2018 18:56
-
-
Save jjsaunier/64ffa00a8753b2ddc4a93c34368ccf34 to your computer and use it in GitHub Desktop.
PPM under PHAR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"directories": ["src", "vendor"], | |
"files": ["ppm.json"], | |
"exclude-composer-files": true, | |
"chmod": "0755", | |
"dump-autoload": false, | |
"finder": [ | |
{ | |
"notName": "/LICENSE|.*\\.md|.*\\.dist|Makefile|composer\\.json|composer\\.lock/", | |
"exclude": [ | |
"doc", | |
"test", | |
"Test", | |
"test_old", | |
"tests", | |
"Tests", | |
"vendor-bin" | |
], | |
"in": "vendor" | |
} | |
], | |
"main": "vendor/php-pm/php-pm/bin/ppm", | |
"output": "app.phar", | |
"stub": true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php-cgi #custom | |
COPY api.phar /api.phar | |
EXPOSE 8888 | |
CMD ["/api.phar", "start", "-c", "ppm.json"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
box compile -c box.json | |
docker build -t api . | |
docker run --rm api -p 8888:8888 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bridge": "MyApp\\PPM\\ApiWorker", | |
"host": "0.0.0.0", | |
"port": 8888, | |
"workers": 4, | |
"app-env": "prod", | |
"debug": false, | |
"logging": true, | |
"static-directory": "public", | |
"bootstrap": "MyApp\\PPM\\ApiWorker", | |
"max-requests": 500, | |
"populate-server-var": true, | |
"socket-path": "\/tmp\/.ppm\/run\/api\/", | |
"pidfile": "\/tmp\/.ppm\/api-ppm.pid", | |
"cgi-path": "\/usr\/local\/bin\/php-cgi" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment