[NC] Test nginx+php-fpm

nc-nginx-test
Evilham 2023-03-02 13:15:17 +01:00
parent fd5ccdb4df
commit 0fc30e79de
No known key found for this signature in database
GPG Key ID: AE3EE30D970886BF
5 changed files with 14 additions and 19 deletions

View File

@ -22,6 +22,7 @@ ARG IMG
FROM ${IMG} FROM ${IMG}
RUN apk update RUN apk update
# We are unifying the nginx+php-fpm containers into one for testing
RUN set -ex; \ RUN set -ex; \
\ \
apk add --no-cache \ apk add --no-cache \
@ -29,6 +30,7 @@ RUN set -ex; \
procps \ procps \
samba-client \ samba-client \
supervisor \ supervisor \
nginx \
; ;
# These are documented DD dependencies for nc-setup.sh # These are documented DD dependencies for nc-setup.sh
@ -88,6 +90,9 @@ COPY template.docx /
# Mail app patches # Mail app patches
COPY nc_mail/ /nc_mail/ COPY nc_mail/ /nc_mail/
# Nginx config
COPY nginx.conf /etc/nginx/nginx.conf
# Setup cron as documented in: # Setup cron as documented in:
# https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/cron/fpm-alpine/Dockerfile # https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/cron/fpm-alpine/Dockerfile
RUN mkdir -p \ RUN mkdir -p \

View File

@ -81,21 +81,6 @@ services:
- EXTRA_PLUGINS_DISABLE=${NEXTCLOUD_PLUGINS_DISABLE:-} - EXTRA_PLUGINS_DISABLE=${NEXTCLOUD_PLUGINS_DISABLE:-}
networks: networks:
- dd_net - 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: healthcheck:
test: | test: |
curl -L --max-redirs 1 \ curl -L --max-redirs 1 \
@ -105,5 +90,3 @@ services:
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 5 retries: 5
networks:
- dd_net

View File

@ -37,7 +37,7 @@ http {
upstream php-handler { upstream php-handler {
# Pass request to DD container # Pass request to DD container
server dd-apps-nextcloud-app:9000; server localhost:9000;
} }
server { server {

View File

@ -34,3 +34,10 @@ user=www-data
environment=USER="www-data",HOME="/home/www-data" environment=USER="www-data",HOME="/home/www-data"
directory=/var/www/html directory=/var/www/html
command=/nc-setup.sh 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;"

View File

@ -36,7 +36,7 @@ backend be_moodle_long
backend be_nextcloud backend be_nextcloud
mode http 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 backend be_etherpad
mode http mode http