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
There is a warning issued in Nextcloud 15 about 'imagick' php extension not
being present. They highly recommend that it be installed.
Fixes#574, fixes#263
Signed-off-by: Robert Dailey <rcdailey@gmail.com>
In 18db7e679f the Dockerfile write
permissions were removed to help remind the new contributor that they
should not be modified. However git does not keep that information (it
only keeps the executable bit in the file permissions), therefore
someone with a fresh clone will not have a file that is read-only.
Removing the write permission will however be a problem for anyone
running the update.sh script twice: it will fail to remove the files
because it uses rm -r instead of rm -fr.
Instead of fixing the removale to use the force flag, we revert the
modification that remove the write permission since it does not
actually help anyone.
The `*/*/Dockerfile` are created from `Docker*template` by the
update.sh script. We add a comment at the beginning of the file with
information to find their origin. We also make them readonly to remind
people who would like to improve these files that they are not meant
to be modified.