diff --git a/dd-apps/docker/nextcloud/Dockerfile b/dd-apps/docker/nextcloud/Dockerfile index 7a5a433..a59070a 100644 --- a/dd-apps/docker/nextcloud/Dockerfile +++ b/dd-apps/docker/nextcloud/Dockerfile @@ -22,6 +22,7 @@ ARG IMG FROM ${IMG} RUN apk update +# We are unifying the nginx+php-fpm containers into one for testing RUN set -ex; \ \ apk add --no-cache \ @@ -29,6 +30,7 @@ RUN set -ex; \ procps \ samba-client \ supervisor \ + nginx \ ; # These are documented DD dependencies for nc-setup.sh @@ -88,6 +90,9 @@ COPY template.docx / # Mail app patches COPY nc_mail/ /nc_mail/ +# Nginx config +COPY nginx.conf /etc/nginx/nginx.conf + # Setup cron as documented in: # https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/cron/fpm-alpine/Dockerfile RUN mkdir -p \ diff --git a/dd-apps/docker/nextcloud/nextcloud.yml b/dd-apps/docker/nextcloud/nextcloud.yml index b4b3d9a..a84188b 100644 --- a/dd-apps/docker/nextcloud/nextcloud.yml +++ b/dd-apps/docker/nextcloud/nextcloud.yml @@ -81,21 +81,6 @@ services: - EXTRA_PLUGINS_DISABLE=${NEXTCLOUD_PLUGINS_DISABLE:-} networks: - dd_net - - dd-apps-nextcloud-nginx: - image: ${NGINX_ALPINE_IMG-nginx:1.22.1-alpine} - container_name: dd-apps-nextcloud-nginx - restart: unless-stopped - links: - - dd-apps-nextcloud-app - volumes: - # Customised nginx config - - ${BUILD_APPS_ROOT_PATH}/docker/nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro - # By mounting these, nginx can serve static files when possible - - ${SRC_FOLDER}/nextcloud:/var/www/html:ro - - ${BUILD_APPS_ROOT_PATH}/docker/nextcloud/src/themes/dd:/var/www/html/themes/dd:ro - # This image does not require access to any environment variables - environment: [] healthcheck: test: | curl -L --max-redirs 1 \ @@ -105,5 +90,3 @@ services: interval: 30s timeout: 10s retries: 5 - networks: - - dd_net diff --git a/dd-apps/docker/nextcloud/nginx.conf b/dd-apps/docker/nextcloud/nginx.conf index e0a4cf6..6fcd68c 100644 --- a/dd-apps/docker/nextcloud/nginx.conf +++ b/dd-apps/docker/nextcloud/nginx.conf @@ -37,7 +37,7 @@ http { upstream php-handler { # Pass request to DD container - server dd-apps-nextcloud-app:9000; + server localhost:9000; } server { diff --git a/dd-apps/docker/nextcloud/supervisord.conf b/dd-apps/docker/nextcloud/supervisord.conf index 9677e64..dbbd7da 100644 --- a/dd-apps/docker/nextcloud/supervisord.conf +++ b/dd-apps/docker/nextcloud/supervisord.conf @@ -34,3 +34,10 @@ user=www-data environment=USER="www-data",HOME="/home/www-data" directory=/var/www/html command=/nc-setup.sh + +[program:nginx] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=nginx -g "daemon off;" diff --git a/dd-sso/docker/haproxy/haproxy.cnf.parts/backends.cnf b/dd-sso/docker/haproxy/haproxy.cnf.parts/backends.cnf index 33e096c..d2bcef2 100644 --- a/dd-sso/docker/haproxy/haproxy.cnf.parts/backends.cnf +++ b/dd-sso/docker/haproxy/haproxy.cnf.parts/backends.cnf @@ -36,7 +36,7 @@ backend be_moodle_long backend be_nextcloud mode http - server nextcloud dd-apps-nextcloud-nginx:80 check port 80 inter 5s rise 2 fall 10 resolvers mydns init-addr none + server nextcloud dd-apps-nextcloud-app:80 check port 80 inter 5s rise 2 fall 10 resolvers mydns init-addr none backend be_etherpad mode http