Replace deprecated nginx docker image with current one
Hi, apparently the used docker image for nginx in docker-compose.fpm-nginx.yml (even though it's not directly clear where these files are intended to be used compared to the docker-compose.yml) is deprecated and should be replaced by https://hub.docker.com/r/dmstr/php-yii2/tags/
https://github.com/yiisoft/yii2-docker/blob/master/docker-compose.fpm-nginx.yml#L4
You need a special config for nginx (FASTCGI_PASS_HOST) to connect both containers.
This is not available in the standard nginx container.
Actually, running nginx and fpm as separate containers creates several issues with eg. assets due to the need of shared volumes.
I'd rather go with https://github.com/yiisoft/yii2-docker/issues/12 (nginx and fpm in one container)
If #12 solves this deprecated usage I'm fine with that. I only suggested the docker image proposed in the depcreation notice but have no preferences how it should be approached.
@kmindi What exactly makes the nginx image deprecated, btw?
At least the one linked in the file https://github.com/yiisoft/yii2-docker/blob/master/docker-compose.fpm-nginx.yml#L4 is deprecated when you visit their github page with their deprecation notice https://github.com/phundament/docker-images and look at the last update 4 years ago on docker hub as well.
Ah yeah :) I thought there was a security issue or announcement from nginx.
I am not completely sure how that dependency is used or not, but if those 4 year old docker images would be used, then I suppose they'll include security issues most certainly
I think I understood now that you only put the file https://github.com/yiisoft/yii2-docker/blob/master/docker-compose.fpm-nginx.yml as example and that is not used in the docker published docker images.
E.g. when I use the FPM variant of the published docker image, I need to make sure to have a reverse proxy (such as nginx) running myself. Still the provided example uses 4 year old code and should either be removed completely or updated.
PRs very welcome, btw :wink:
I've added an nginx flavour (nginx on the image with supervisor), the deprecazed nginx image was removed completely.