0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-06-17 08:34:48 +02:00

POC: Introduce Nextcloud based on Nginx web server.

UPDATE:
 - stack.yml contains FPM & Mariadb containers, updated names and hostnames for container
TODO:
 - update config.ini for trusted proxies support

This PR introduce POC of Nextcloud based on Nginx web server with php-fpm in separated container.
Basic installation with SQLite and few operations in web gui were tested.

Nginx dockerfile is generated from Dockerfile-nginx.template
  - FROM string has hardcoded variant - apache
  - There is no upstream PHP image with Nginx, due this generate-stackbrew-library is not able to identify parent correctly

New files were introduced in image:
  - Dockerfile-nginx.template
  - nginx-foreground
    + simulates behavior of apache2-foreground cmd
  - 16.0/nginx/Dockerfile
    + generated from template Dockerfile-nginx.template
  - nextcloud.confx
    + Nginx vhost configuration
  - start_net.sh (temporary)
    + Helper script to create user-defined network for Docker
    + '--link' option for docker create is obsolete and we need communication between fpm and nginx container
  - start_container.sh (temporary)
    + Helper script to handle containers
  - Dockerfile
    + /Dockerfile for verification purposes
Updated files:
  - set -x added to all shell scripts for easier troubleshooting (temporary)
  - update.sh
    + New variant introduced
    + Number of builded variant is limited for simplified CI.
  - .travis.yml (temporary)
    + Image push to registry for testing purposes
  - docker-entrypoint.sh
    + Recognizes new argument for entrypoint - nginx-foreground

Be careful during review, github recognizes removed files for 15.0 release as renamed to 16.0/nginx variant

Motivation/Usecase:
  - I have openvz based VPS where only old Docker 1.10 is supported.
  - Apache(in nextcloud container) in combination Nginx as a reverse proxy for multiple vhosts doesn't work correctly

Image pull link:
docker pull 1john2ci/nextcloud:apache-20190509
docker pull 1john2ci/nextcloud:fpm-20190509
Travis CI test: 530329740

Deployment notes:
  - Clone source code
  - Create user-defined network for Docker
  - Start fpm container
  - Start nginx container

Signed-off-by: Malanik Jan <malanik.jan@gmail.com>
This commit is contained in:
Malanik Jan 2019-05-12 12:15:15 +02:00
parent e9432801ce
commit a3366b08c4
7 changed files with 2284 additions and 46 deletions

View file

@ -178,7 +178,8 @@ function create_variant() {
find . -maxdepth 1 -type d -regextype sed -regex '\./[[:digit:]]\+\.[[:digit:]]\+\(-rc\|-beta\|-alpha\)\?' -exec rm -r '{}' \;
fullversions=( $( curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac| \
#fullversions=( $( curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac| \
fullversions=( $( cat releases |tac|tac| \
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}' | \
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}' | \
sort -urV ) )
@ -200,7 +201,8 @@ for version in "${versions[@]}"; do
fi
done
fullversions_rc=( $( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
#fullversions_rc=( $( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
fullversions_rc=( $( cat prereleases |tac|tac| \
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}RC[[:digit:]]+' | \
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}RC[[:digit:]]+' | \
sort -urV ) )
@ -220,7 +222,8 @@ for version in "${versions_rc[@]}"; do
fi
done
fullversions_beta=( $( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
#fullversions_beta=( $( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
fullversions_beta=( $( cat prereleases |tac|tac| \
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}beta[[:digit:]]+' | \
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}beta[[:digit:]]+' | \
sort -urV ) )
@ -240,7 +243,8 @@ for version in "${versions_beta[@]}"; do
fi
done
fullversions_alpha=( $( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
#fullversions_alpha=( $( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
fullversions_alpha=( $( cat prereleases |tac|tac| \
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}alpha[[:digit:]]+' | \
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}alpha[[:digit:]]+' | \
sort -urV ) )