diff options
Diffstat (limited to 'roles/elevate/media/templates')
-rw-r--r-- | roles/elevate/media/templates/nextcloud-Dockerfile.j2 | 8 | ||||
-rw-r--r-- | roles/elevate/media/templates/nextcloud.service.j2 | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/roles/elevate/media/templates/nextcloud-Dockerfile.j2 b/roles/elevate/media/templates/nextcloud-Dockerfile.j2 new file mode 100644 index 00000000..33b817f1 --- /dev/null +++ b/roles/elevate/media/templates/nextcloud-Dockerfile.j2 @@ -0,0 +1,8 @@ +FROM nextcloud:{{ nextcloud_version }}-fpm + +RUN set -x \ + && bash -c 'cd / && find -user www-data -exec chown {{ share_uid }} {} \; || true' \ + && bash -c 'cd / && find -group www-data -exec chown {{ share_gid }} {} \; || true' \ + && sed -e 's/^www-data:\([^:]*\):[0-9]*:[0-9]*:\(.*\)/www-data:\1:{{ share_uid }}:{{ share_gid }}:\2/' -i /etc/passwd \ + && sed -e 's/^www-data:\([^:]*\):[0-9]*:\(.*\)/www-data:\1:800:\2/' -i /etc/group \ + && sed -e 's/^\(exec.*\)$/umask 002\n\1/' -i /entrypoint.sh diff --git a/roles/elevate/media/templates/nextcloud.service.j2 b/roles/elevate/media/templates/nextcloud.service.j2 index 4eacf476..66395fe9 100644 --- a/roles/elevate/media/templates/nextcloud.service.j2 +++ b/roles/elevate/media/templates/nextcloud.service.j2 @@ -4,7 +4,7 @@ After=docker.service Requires=docker.service [Service] -ExecStart=/usr/bin/systemd-docker --cgroups name=systemd run --rm --network host --name %n -v /srv/nextcloud/config/nextcloud-fpm.conf:/usr/local/etc/php-fpm.d/zzzzz.conf -v /srv/nextcloud/config/nextcloud:/var/www/html/config -v /srv/ncdata/nextcloud:/var/www/html/data -v /srv/ncdata/share:/srv/external -v /srv/nextcloud/www:/var/www/html nextcloud:{{ nextcloud_version }}-fpm +ExecStart=/usr/bin/systemd-docker --cgroups name=systemd run --rm --network host --name %n -v /srv/nextcloud/config/nextcloud-fpm.conf:/usr/local/etc/php-fpm.d/zzzzz.conf -v /srv/nextcloud/config/nextcloud:/var/www/html/config -v /srv/ncdata/nextcloud:/var/www/html/data -v /srv/smbdata/share:/srv/external/share -v /srv/nextcloud/www:/var/www/html nextcloud:{{ inventory_hostname }} Restart=always RestartSec=10 Type=notify |