flor0 / nextcloud-docker

Nextcloud but with docker
Apache License 2.0
101 stars 2 forks source link

Add custom nginx container for embedding custom config parameters #1

Closed enpaul closed 6 months ago

enpaul commented 7 months ago

This change adds a locally built Nginx container that uses envsubst to dynamically replace parameters in the nginx.conf on container startup. This lets users put their config in the environment and removes the need to mount the nginx.conf into the container at runtime.

I'm working on testing this setup now, but assuming it works I'd love to merge it. I so appreciate you working out the php-fpm configuration and cannot wait to convert my main NC install away from AIO!

flor0 commented 7 months ago

Update: I figured out what the issue is. The environment variables in nginx/Dockerfile are somehow not used in the build unless I specify them again in a separate .env file. Also I think NEXTCLOUD_PHP_FPM_HOST is unnecessary since it's always php-fpm-nextcloud:9000