質問

I am considering architecting our php app's deployment process such that the build's output produces a single phar archive for the necessary code to run the app in production. I am wondering about the performance of deploying a web app in this way versus the traditional model of checking out or copying the source tree itself to the document root for the web-server.

There are benefits to the packaged approach in that the package can be fully prepped by the CI server (removing test code for example) and then a single archive just copied to the server for deployment. The pristine archives can be stored in a repository as well.

I don't want to use this approach if running the app as a phar will cause a bottleneck however. Are there issues with loading the source out of the phar? The app uses autoloading via composer to load source.

役に立ちましたか?

解決

I benchmarked a application back in 2011; speed was not an issue with phar.

There will be minor problems loading source code and template files - depending on how you do it currently. But all in all, this won't be impossible problems.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top