-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nextcloud: Build with new architecture
- Loading branch information
Showing
16 changed files
with
351 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM alpine:3.19 | ||
|
||
ARG APP_VERSION | ||
|
||
RUN set -ex; \ | ||
apk add --no-cache \ | ||
bzip2 \ | ||
curl \ | ||
gnupg \ | ||
nginx \ | ||
shadow | ||
|
||
RUN set -ex; \ | ||
mkdir -p /var/www/nextcloud; \ | ||
groupmod -g 101 -o www-data; \ | ||
adduser -h /var/www/nextcloud -H -s /sbin/nologin -S -u 101 -G www-data www-data | ||
|
||
ENV NEXTCLOUD_VERSION=${APP_VERSION} | ||
|
||
RUN set -ex; \ | ||
curl -fsSL -o nextcloud.tar.bz2 \ | ||
"https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \ | ||
curl -fsSL -o nextcloud.tar.bz2.asc \ | ||
"https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \ | ||
export GNUPGHOME="$(mktemp -d)"; \ | ||
# gpg key from https://nextcloud.com/nextcloud.asc | ||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ | ||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ | ||
tar -xjf nextcloud.tar.bz2 -C /var/www/; \ | ||
gpgconf --kill all; \ | ||
rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ | ||
rm -rf "$GNUPGHOME"; \ | ||
chown -R www-data:www-data /var/www; \ | ||
chmod -R g=u /var/www; | ||
|
||
ADD nginx.conf /etc/nginx/nginx.conf | ||
|
||
WORKDIR /var/www/nextcloud | ||
|
||
VOLUME /var/www/nextcloud/custom_apps | ||
VOLUME /var/www/nextcloud/themes | ||
|
||
USER 101:101 | ||
|
||
CMD ["nginx", "-c", "/etc/nginx/nginx.conf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
$CONFIG = array ( | ||
'memcache.local' => '\OC\Memcache\APCu', | ||
'memcache.local' => '\OC\Memcache\APCu', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<?php | ||
$CONFIG = array ( | ||
'apps_paths' => array ( | ||
0 => array ( | ||
'path' => OC::$SERVERROOT.'/apps', | ||
'url' => '/apps', | ||
'writable' => false, | ||
), | ||
1 => array ( | ||
'path' => OC::$SERVERROOT.'/custom_apps', | ||
'url' => '/custom_apps', | ||
'writable' => true, | ||
), | ||
), | ||
'apps_paths' => array ( | ||
0 => array ( | ||
'path' => OC::$SERVERROOT.'/apps', | ||
'url' => '/apps', | ||
'writable' => false, | ||
), | ||
1 => array ( | ||
'path' => OC::$SERVERROOT.'/custom_apps', | ||
'url' => '/custom_apps', | ||
'writable' => true, | ||
), | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
$CONFIG = array ( | ||
'upgrade.disable-web' => true, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<?php | ||
if (getenv('REDIS_HOST')) { | ||
$CONFIG = array( | ||
'memcache.distributed' => '\OC\Memcache\Redis', | ||
'memcache.locking' => '\OC\Memcache\Redis', | ||
'redis' => array( | ||
'host' => getenv('REDIS_HOST'), | ||
'password' => (string) getenv('REDIS_HOST_PASSWORD'), | ||
), | ||
); | ||
$CONFIG = array( | ||
'memcache.distributed' => '\OC\Memcache\Redis', | ||
'memcache.locking' => '\OC\Memcache\Redis', | ||
'redis' => array( | ||
'host' => getenv('REDIS_HOST'), | ||
'password' => (string) getenv('REDIS_HOST_PASSWORD'), | ||
), | ||
); | ||
|
||
if (getenv('REDIS_HOST_PORT') !== false) { | ||
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); | ||
} elseif (getenv('REDIS_HOST')[0] != '/') { | ||
$CONFIG['redis']['port'] = 6379; | ||
} | ||
if (getenv('REDIS_HOST_PORT') !== false) { | ||
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); | ||
} elseif (getenv('REDIS_HOST')[0] != '/') { | ||
$CONFIG['redis']['port'] = 6379; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<?php | ||
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) { | ||
$CONFIG = array ( | ||
'mail_smtpmode' => 'smtp', | ||
'mail_smtphost' => getenv('SMTP_HOST'), | ||
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), | ||
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', | ||
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'), | ||
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', | ||
'mail_smtpname' => getenv('SMTP_NAME') ?: '', | ||
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), | ||
'mail_domain' => getenv('MAIL_DOMAIN'), | ||
); | ||
$CONFIG = array ( | ||
'mail_smtpmode' => 'smtp', | ||
'mail_smtphost' => getenv('SMTP_HOST'), | ||
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), | ||
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', | ||
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'), | ||
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', | ||
'mail_smtpname' => getenv('SMTP_NAME') ?: '', | ||
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), | ||
'mail_domain' => getenv('MAIL_DOMAIN'), | ||
); | ||
|
||
if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { | ||
$CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); | ||
} elseif (getenv('SMTP_PASSWORD')) { | ||
$CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); | ||
} else { | ||
$CONFIG['mail_smtppassword'] = ''; | ||
} | ||
if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { | ||
$CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); | ||
} elseif (getenv('SMTP_PASSWORD')) { | ||
$CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); | ||
} else { | ||
$CONFIG['mail_smtppassword'] = ''; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ set -eu | |
busybox crond -f -l 0 -L /dev/stdout & | ||
|
||
exec "$@" | ||
|
Oops, something went wrong.