dmstr / docker-php-yii2

:whale: :cd: Docker PHP image containing extensions and libraries for Yii 2.0 Framework
99 stars 33 forks source link

Why install php in nginx if php runs in a separate container ? #40

Closed chanyshev closed 3 years ago

chanyshev commented 3 years ago

Maybe I don't understand something, but shouldn't nginx be like a reverse proxy for php ?

schmunk42 commented 3 years ago

Actually we install nginx in a php container.

And yes, you can run it in a separate container, but you also have to take care about static files and assets, which can become very cumbersome, that's the reason we're adding nginx in the same container.