diff --git a/Dockerfile b/Dockerfile index 99ab54a..09ce219 100644 --- a/Dockerfile +++ b/Dockerfile @@ -133,6 +133,8 @@ RUN apk add --no-cache \ COPY --from=builder --chown=nginx:nginx /var/lib/nextcloud /var/lib/nextcloud +RUN rm /etc/nginx/http.d/default.conf + ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 ADD /rootfs / diff --git a/rootfs/bin/nextcloud-config b/rootfs/bin/nextcloud-config index 8d2a21f..6471fa7 100755 --- a/rootfs/bin/nextcloud-config +++ b/rootfs/bin/nextcloud-config @@ -1,11 +1,11 @@ -#!/command/with-contenv sh +#!/bin/sh set -ex cd /var/lib/nextcloud chmod +x ./occ if [ ! -f /var/lib/nextcloud/data/.installed ]; then - /command/s6-setuidgid nginx ./occ maintenance:install \ + s6-setuidgid nginx ./occ maintenance:install \ --database=pgsql \ --database-host="$DB_HOST" \ --database-name="$DB_NAME" \ @@ -20,55 +20,55 @@ if [ ! -f /var/lib/nextcloud/data/.installed ]; then touch /var/lib/nextcloud/data/.installed fi -/command/s6-setuidgid nginx ./occ config:app:set --value cron core backgroundjobs_mode -/command/s6-setuidgid nginx ./occ app:enable files_sharing -/command/s6-setuidgid nginx ./occ app:enable text -/command/s6-setuidgid nginx ./occ app:enable files_pdfviewer -/command/s6-setuidgid nginx ./occ app:enable files_videoplayer -/command/s6-setuidgid nginx ./occ app:enable theming -/command/s6-setuidgid nginx ./occ app:enable photos -/command/s6-setuidgid nginx ./occ app:enable twofactor_totp -/command/s6-setuidgid nginx ./occ app:enable twofactor_backupcodes -/command/s6-setuidgid nginx ./occ app:enable twofactor_u2f -/command/s6-setuidgid nginx ./occ app:enable polls -/command/s6-setuidgid nginx ./occ app:enable calendar -/command/s6-setuidgid nginx ./occ app:enable contacts -/command/s6-setuidgid nginx ./occ app:enable news -/command/s6-setuidgid nginx ./occ app:enable tasks -/command/s6-setuidgid nginx ./occ app:enable notes -/command/s6-setuidgid nginx ./occ app:enable sociallogin -/command/s6-setuidgid nginx ./occ app:enable integration_mastodon -/command/s6-setuidgid nginx ./occ app:enable integration_github -/command/s6-setuidgid nginx ./occ app:enable integration_gitlab -/command/s6-setuidgid nginx ./occ app:disable activity -/command/s6-setuidgid nginx ./occ app:disable comments -/command/s6-setuidgid nginx ./occ app:disable files_trashbin -/command/s6-setuidgid nginx ./occ app:disable firstrunwizard -/command/s6-setuidgid nginx ./occ app:disable logreader -/command/s6-setuidgid nginx ./occ app:disable nextcloud_announcements -/command/s6-setuidgid nginx ./occ app:disable password_policy -/command/s6-setuidgid nginx ./occ app:disable serverinfo -/command/s6-setuidgid nginx ./occ app:disable support -/command/s6-setuidgid nginx ./occ app:disable survey_client -/command/s6-setuidgid nginx ./occ app:disable systemtags -/command/s6-setuidgid nginx ./occ app:disable updatenotification +s6-setuidgid nginx ./occ config:app:set --value cron core backgroundjobs_mode +s6-setuidgid nginx ./occ app:enable files_sharing +s6-setuidgid nginx ./occ app:enable text +s6-setuidgid nginx ./occ app:enable files_pdfviewer +s6-setuidgid nginx ./occ app:enable files_videoplayer +s6-setuidgid nginx ./occ app:enable theming +s6-setuidgid nginx ./occ app:enable photos +s6-setuidgid nginx ./occ app:enable twofactor_totp +s6-setuidgid nginx ./occ app:enable twofactor_backupcodes +s6-setuidgid nginx ./occ app:enable twofactor_u2f +s6-setuidgid nginx ./occ app:enable polls +s6-setuidgid nginx ./occ app:enable calendar +s6-setuidgid nginx ./occ app:enable contacts +s6-setuidgid nginx ./occ app:enable news +s6-setuidgid nginx ./occ app:enable tasks +s6-setuidgid nginx ./occ app:enable notes +s6-setuidgid nginx ./occ app:enable sociallogin +s6-setuidgid nginx ./occ app:enable integration_mastodon +s6-setuidgid nginx ./occ app:enable integration_github +s6-setuidgid nginx ./occ app:enable integration_gitlab +s6-setuidgid nginx ./occ app:disable activity +s6-setuidgid nginx ./occ app:disable comments +s6-setuidgid nginx ./occ app:disable files_trashbin +s6-setuidgid nginx ./occ app:disable firstrunwizard +s6-setuidgid nginx ./occ app:disable logreader +s6-setuidgid nginx ./occ app:disable nextcloud_announcements +s6-setuidgid nginx ./occ app:disable password_policy +s6-setuidgid nginx ./occ app:disable serverinfo +s6-setuidgid nginx ./occ app:disable support +s6-setuidgid nginx ./occ app:disable survey_client +s6-setuidgid nginx ./occ app:disable systemtags +s6-setuidgid nginx ./occ app:disable updatenotification -/command/s6-setuidgid nginx ./occ config:system:set --value '\OC\Memcache\APCu' memcache.local +s6-setuidgid nginx ./occ config:system:set --value '\OC\Memcache\APCu' memcache.local -/command/s6-setuidgid nginx ./occ config:system:set --value "https://$DOMAIN" overwrite.cli.url -/command/s6-setuidgid nginx ./occ config:system:set --value "localhost" trusted_domains 0 -/command/s6-setuidgid nginx ./occ config:system:set --value "$DOMAIN" trusted_domains 1 -/command/s6-setuidgid nginx ./occ config:system:set --value "syslog" log_type -/command/s6-setuidgid nginx ./occ config:system:set --value "" logfile -/command/s6-setuidgid nginx ./occ config:system:set --value "3" loglevel +s6-setuidgid nginx ./occ config:system:set --value "https://$DOMAIN" overwrite.cli.url +s6-setuidgid nginx ./occ config:system:set --value "localhost" trusted_domains 0 +s6-setuidgid nginx ./occ config:system:set --value "$DOMAIN" trusted_domains 1 +s6-setuidgid nginx ./occ config:system:set --value "syslog" log_type +s6-setuidgid nginx ./occ config:system:set --value "" logfile +s6-setuidgid nginx ./occ config:system:set --value "3" loglevel -/command/s6-setuidgid nginx ./occ config:system:set --value "smtp" mail_smtpmode -/command/s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_AUTH_TYPE:-PLAIN}" mail_smtpauthtype -/command/s6-setuidgid nginx ./occ config:system:set --value "$MAIL_FROM" mail_from_address -/command/s6-setuidgid nginx ./occ config:system:set --value "$MAIL_DOMAIN" mail_domain -/command/s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_SECURITY:-tls}" mail_smtpsecure -/command/s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_AUTH:-1}" mail_smtpauth -/command/s6-setuidgid nginx ./occ config:system:set --value "$MAIL_SMTP_HOST" mail_smtphost -/command/s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_PORT:-587}" mail_smtpport -/command/s6-setuidgid nginx ./occ config:system:set --value "$MAIL_SMTP_NAME" mail_smtpname -/command/s6-setuidgid nginx ./occ config:system:set --value "$MAIL_SMTP_PASSWORD" mail_smtppassword +s6-setuidgid nginx ./occ config:system:set --value "smtp" mail_smtpmode +s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_AUTH_TYPE:-PLAIN}" mail_smtpauthtype +s6-setuidgid nginx ./occ config:system:set --value "$MAIL_FROM" mail_from_address +s6-setuidgid nginx ./occ config:system:set --value "$MAIL_DOMAIN" mail_domain +s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_SECURITY:-tls}" mail_smtpsecure +s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_AUTH:-1}" mail_smtpauth +s6-setuidgid nginx ./occ config:system:set --value "$MAIL_SMTP_HOST" mail_smtphost +s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_PORT:-587}" mail_smtpport +s6-setuidgid nginx ./occ config:system:set --value "$MAIL_SMTP_NAME" mail_smtpname +s6-setuidgid nginx ./occ config:system:set --value "$MAIL_SMTP_PASSWORD" mail_smtppassword diff --git a/rootfs/etc/s6-overlay/s6-rc.d/confd/dependencies b/rootfs/etc/s6-overlay/s6-rc.d/confd/dependencies new file mode 100644 index 0000000..84965ff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/confd/dependencies @@ -0,0 +1 @@ +nextcloud-config diff --git a/rootfs/etc/s6-overlay/s6-rc.d/crond/run b/rootfs/etc/s6-overlay/s6-rc.d/crond/run index 7fbaf2e..bd6581d 100644 --- a/rootfs/etc/s6-overlay/s6-rc.d/crond/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/crond/run @@ -1,3 +1,3 @@ -#!/command/with-contenv sh +#!/bin/sh -exec crond -f +crond -f diff --git a/rootfs/etc/s6-overlay/s6-rc.d/nginx/run b/rootfs/etc/s6-overlay/s6-rc.d/nginx/run index 01e2a62..e33de41 100644 --- a/rootfs/etc/s6-overlay/s6-rc.d/nginx/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/nginx/run @@ -1,3 +1,3 @@ -#!/command/with-contenv sh +#!/bin/sh exec nginx -g "daemon off;"