Haven't been able to make use of your version of Nginx + PHP via FPM-PHP because my deployment requires a dockerfile, not a docker-compose.
I've been tinkering with how to get the Nginx + PHP working inside a single dockerfile, but having no real luck. I'm usually pretty good at this stuff but not today.
Using the example from docker-compose and fairly common Docker syntax, this is what I have so far.
FROM nginx:1.17-alpine
COPY conf.d/ /etc/nginx/conf.d/
COPY nginx.conf /etc/nginx/nginx.conf
FROM joseluisq/php-fpm
USER root
COPY backend/ /var/www/html
RUN chown -R nobody.nobody /var/www/html
ENV ENV_SUBSTITUTION_ENABLE=true
ENV PHP_MEMORY_LIMIT=512M
ENV PHP_FPM_LISTEN=9090
ENV PHP_SESSION_GC_MAXLIFETIME=7200
ENV NODE_ENV production
USER nobody
EXPOSE 80
CMD ["php-fpm"]
When building, then running I get the following error:
/envsubst.sh: line 14: can't create /usr/local/etc/php-fpm.conf: Permission denied
If I remove "USER nobody", then I can clear this permission denied problem, but now get an Empty Response error from the webserver. I believe the port is 80 for Nginx.
I'm now trying to get "FROM joseluisq/php-fpm:8.1" working instead... but still getting empty responses. Perhaps my /var/www/html is bad location.
Do you know of a better way to accomplish what I am trying to do here?