mirror of
https://github.com/nextcloud/docker.git
synced 2025-04-17 17:46:09 +02:00
POC: Introduce Nextcloud based on Nginx web server.
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: https://travis-ci.org/1john2/docker/builds/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:
parent
523802a2e2
commit
e9432801ce
5 changed files with 64 additions and 7 deletions
12
.travis.yml
12
.travis.yml
|
@ -32,14 +32,14 @@ after_script:
|
|||
# ##
|
||||
- echo "1john2_password" | docker login -u "1john2ci" --password-stdin
|
||||
|
||||
- docker tag nextcloud:16.0-apache 1john2ci/nextcloud:apache-ncd-20190509
|
||||
- docker push 1john2ci/nextcloud:apache-ncd-20190509
|
||||
- docker tag nextcloud:16.0-apache 1john2ci/nextcloud:apache-ncd-20190510
|
||||
- docker push 1john2ci/nextcloud:apache-ncd-20190510
|
||||
|
||||
- docker tag nextcloud:16.0-nginx 1john2ci/nextcloud:nginx-ncd-20190509
|
||||
- docker push 1john2ci/nextcloud:nginx-ncd-20190509
|
||||
- docker tag nextcloud:16.0-nginx 1john2ci/nextcloud:nginx-ncd-20190510
|
||||
- docker push 1john2ci/nextcloud:nginx-ncd-20190510
|
||||
|
||||
- docker tag nextcloud:16.0-fpm-full 1john2ci/nextcloud:fpm-ncd-20190509
|
||||
- docker push 1john2ci/nextcloud:fpm-ncd-20190509
|
||||
- docker tag nextcloud:16.0-fpm-full 1john2ci/nextcloud:fpm-ncd-20190510
|
||||
- docker push 1john2ci/nextcloud:fpm-ncd-20190510
|
||||
|
||||
jobs:
|
||||
include:
|
||||
|
|
|
@ -1,6 +1,24 @@
|
|||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||
FROM php:7.3-apache-stretch
|
||||
|
||||
# ##
|
||||
# Install standard troubleshooting utils
|
||||
# We can't remove apache2 - it brokes build for fpm/apache containers
|
||||
# ##
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
vim \
|
||||
net-tools \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
wget \
|
||||
psmisc \
|
||||
procps \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*;
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
RUN set -ex; \
|
||||
\
|
||||
|
|
|
@ -1,6 +1,24 @@
|
|||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||
FROM php:7.3-fpm-stretch
|
||||
|
||||
# ##
|
||||
# Install standard troubleshooting utils
|
||||
# We can't remove apache2 - it brokes build for fpm/apache containers
|
||||
# ##
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
vim \
|
||||
net-tools \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
wget \
|
||||
psmisc \
|
||||
procps \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*;
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
RUN set -ex; \
|
||||
\
|
||||
|
|
|
@ -1,5 +1,23 @@
|
|||
FROM php:%%PHP_VERSION%%-%%VARIANT%%-stretch
|
||||
|
||||
# ##
|
||||
# Install standard troubleshooting utils
|
||||
# We can't remove apache2 - it brokes build for fpm/apache containers
|
||||
# ##
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
vim \
|
||||
net-tools \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
wget \
|
||||
psmisc \
|
||||
procps \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*;
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
RUN set -ex; \
|
||||
\
|
||||
|
|
|
@ -24,7 +24,7 @@ IMAGE="1john2ci/nextcloud:${NAME}-ncd-${TAG}"
|
|||
NAME="${NAME}-ncd"
|
||||
|
||||
declare -A PUBLISH=(
|
||||
[nginx-ncd]=' -p 80:80 '
|
||||
[nginx-ncd]=' -p 127.0.0.1:8060:80 '
|
||||
[fpm-ncd]=''
|
||||
)
|
||||
|
||||
|
@ -57,5 +57,8 @@ eval "CMD='docker run -dit \
|
|||
"${IMAGE}" \
|
||||
"${EXECCMD}" \
|
||||
'"
|
||||
export SQLITE_DATABASE='test'
|
||||
export NEXTCLOUD_ADMIN_USER='admin'
|
||||
export NEXTCLOUD_ADMIN_PASSWORD='admin'
|
||||
|
||||
${CMD}
|
||||
|
|
Loading…
Add table
Reference in a new issue