mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-21 19:00:33 +00:00
Compare commits
172 Commits
helm-chart
...
v5.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac7bf05f54 | ||
|
|
1dedc5f282 | ||
|
|
08ff51c482 | ||
|
|
14a77ea88d | ||
|
|
9388ec5798 | ||
|
|
1b878a4a8d | ||
|
|
1ceb963fae | ||
|
|
48e70e2b00 | ||
|
|
4adb748970 | ||
|
|
10cfce7bdd | ||
|
|
6cbab733be | ||
|
|
9f19026885 | ||
|
|
1513d69a8d | ||
|
|
364be594a2 | ||
|
|
4f30044d54 | ||
|
|
9f1b0e361d | ||
|
|
fc352b84be | ||
|
|
c780f28c51 | ||
|
|
f917f12932 | ||
|
|
3b4d741c8e | ||
|
|
a0cf31ad1b | ||
|
|
8c11f78940 | ||
|
|
012d9a9392 | ||
|
|
9584ef5346 | ||
|
|
502f32f207 | ||
|
|
cf9220c6b7 | ||
|
|
7df7ee738c | ||
|
|
d95058ae21 | ||
|
|
3973943acd | ||
|
|
692fd7e487 | ||
|
|
6ad9e9eda6 | ||
|
|
f2e4d8284c | ||
|
|
b9709aa400 | ||
|
|
d100bf985e | ||
|
|
fafc456065 | ||
|
|
bbeb7e2db2 | ||
|
|
285407e176 | ||
|
|
f15b890b28 | ||
|
|
2f2398c704 | ||
|
|
189728f765 | ||
|
|
c25587bcc3 | ||
|
|
fa93f207eb | ||
|
|
d5b5a1eae6 | ||
|
|
53f7fa70a0 | ||
|
|
fceeb4be10 | ||
|
|
c6f49ee45c | ||
|
|
8aa4c8a13e | ||
|
|
cd0b4cf1cc | ||
|
|
72909bde64 | ||
|
|
1f6ab346a3 | ||
|
|
1f7f675454 | ||
|
|
bd4afa7cff | ||
|
|
d1e781617c | ||
|
|
40c3a24b8b | ||
|
|
9035f47611 | ||
|
|
a9960c8d6a | ||
|
|
616159c1b8 | ||
|
|
45ec758e54 | ||
|
|
6a300d03a6 | ||
|
|
ef93976ba5 | ||
|
|
49e9c74a77 | ||
|
|
9ba7962320 | ||
|
|
b08b59b39b | ||
|
|
8750bd343c | ||
|
|
93cec3ca5b | ||
|
|
1a54b583c5 | ||
|
|
e30b0f878b | ||
|
|
dcf83fafcc | ||
|
|
5667b989b9 | ||
|
|
d87ae9d51b | ||
|
|
a63ff97f43 | ||
|
|
944e09237c | ||
|
|
e0b0066f8a | ||
|
|
a69f6a3d39 | ||
|
|
a8bd3e8b97 | ||
|
|
beffb879dc | ||
|
|
a5d03e495e | ||
|
|
17701ce256 | ||
|
|
dad3477a9f | ||
|
|
0d942935d8 | ||
|
|
cffcf86fc9 | ||
|
|
6b15a2838a | ||
|
|
897f05ee0f | ||
|
|
0fdcba047d | ||
|
|
355381df1d | ||
|
|
e3cacb7811 | ||
|
|
ee3bc7b609 | ||
|
|
396fb671fe | ||
|
|
73286c558c | ||
|
|
669555289c | ||
|
|
ff624fbfad | ||
|
|
93748f9644 | ||
|
|
bddca890c5 | ||
|
|
06d802fd43 | ||
|
|
9e92f2b5fd | ||
|
|
bc7d2a1337 | ||
|
|
5f126583d3 | ||
|
|
7c11a8a278 | ||
|
|
412da74702 | ||
|
|
3e1ae33e95 | ||
|
|
9b8a547f71 | ||
|
|
12d351aa19 | ||
|
|
741d99d401 | ||
|
|
fb45fa4073 | ||
|
|
55bc84d3f2 | ||
|
|
a4e894092c | ||
|
|
3fc1487cd9 | ||
|
|
c9e406f76c | ||
|
|
234590f8ee | ||
|
|
85ac995907 | ||
|
|
079b86d840 | ||
|
|
132444cbb9 | ||
|
|
e4648ab03e | ||
|
|
1841733879 | ||
|
|
8bbdbd6fa7 | ||
|
|
f82818cbc6 | ||
|
|
ca9b0cccf3 | ||
|
|
fbc4b9cabb | ||
|
|
c056879df4 | ||
|
|
4a50fcf5a6 | ||
|
|
0e09bb0d12 | ||
|
|
09e299181a | ||
|
|
844382d220 | ||
|
|
3c3c8fd8d5 | ||
|
|
3b28885ee2 | ||
|
|
b9ac7851b2 | ||
|
|
b2fa058f33 | ||
|
|
04f84bb9b1 | ||
|
|
14fd25c837 | ||
|
|
3ff0b2e987 | ||
|
|
418e7898b7 | ||
|
|
490e9571d1 | ||
|
|
b194450875 | ||
|
|
1982e069b7 | ||
|
|
26e3b14854 | ||
|
|
347618f6a8 | ||
|
|
ad8d6ab659 | ||
|
|
681f4ac73e | ||
|
|
9f4b712f02 | ||
|
|
9a27686ede | ||
|
|
c5b26ffb4f | ||
|
|
c6492ef05c | ||
|
|
bf5b7f0f56 | ||
|
|
c153253c7f | ||
|
|
126db40a72 | ||
|
|
d58bb56dfa | ||
|
|
e362ea8665 | ||
|
|
0dc630b5a9 | ||
|
|
bc03d030c9 | ||
|
|
1304734d3e | ||
|
|
8356e1aba1 | ||
|
|
900d470174 | ||
|
|
3d780a5a4d | ||
|
|
e6d9099114 | ||
|
|
cad77f8287 | ||
|
|
4ef65b24ae | ||
|
|
348d6acde7 | ||
|
|
68e346047d | ||
|
|
77dee8caec | ||
|
|
f861c66ade | ||
|
|
046496c5fc | ||
|
|
72d55cdbbf | ||
|
|
9728a84e75 | ||
|
|
27faed79d2 | ||
|
|
78419fa0a1 | ||
|
|
e44ef2d126 | ||
|
|
b2f5deebd2 | ||
|
|
861d717480 | ||
|
|
eeeeb2f37b | ||
|
|
cc2c8998ba | ||
|
|
18f6aff016 | ||
|
|
3bff5f2851 |
2
.github/workflows/create-psalm-container.yml
vendored
2
.github/workflows/create-psalm-container.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: Modify the Dockerfile
|
||||
run: |
|
||||
set -x
|
||||
sed -i 's|FROM php:7.4-alpine|FROM php:8.1-alpine|' "psalm-github-actions/Dockerfile"
|
||||
sed -i 's|FROM php:7.4-alpine|FROM php:8.2-alpine|' "psalm-github-actions/Dockerfile"
|
||||
cat << APCU >> "psalm-github-actions/Dockerfile"
|
||||
RUN mkdir -p /usr/src/php/ext/apcu && \
|
||||
curl -fsSL https://pecl.php.net/get/apcu | tar xvz -C "/usr/src/php/ext/apcu" --strip 1 && \
|
||||
|
||||
2
.github/workflows/dependency-updates.yml
vendored
2
.github/workflows/dependency-updates.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.1
|
||||
php-version: 8.2
|
||||
extensions: apcu
|
||||
- name: Run dependency update script
|
||||
run: |
|
||||
|
||||
2
.github/workflows/imaginary-update.yml
vendored
2
.github/workflows/imaginary-update.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
| cut -f1 \
|
||||
| tail -1
|
||||
)"
|
||||
sed -i "s|go install github.com/h2non/imaginary.*|go install github.com/h2non/imaginary@$imaginary_version|" ./Containers/imaginary/Dockerfile
|
||||
sed -i "s|go install github.com/h2non/imaginary.*;|go install github.com/h2non/imaginary@$imaginary_version;|" ./Containers/imaginary/Dockerfile
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
|
||||
2
.github/workflows/json-validator.yml
vendored
2
.github/workflows/json-validator.yml
vendored
@@ -15,6 +15,6 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Validate Json
|
||||
run: |
|
||||
sudo apt install python3-pip --no-install-recommends
|
||||
sudo apt-get install python3-pip --no-install-recommends
|
||||
sudo pip3 install json-spec
|
||||
json validate --schema-file=php/containers-schema.json --document-file=php/containers.json
|
||||
|
||||
2
.github/workflows/lint-php.yml
vendored
2
.github/workflows/lint-php.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ["8.1"]
|
||||
php-versions: ["8.2"]
|
||||
|
||||
name: php-lint
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up php8.1
|
||||
- name: Set up php8.2
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.1
|
||||
php-version: 8.2
|
||||
extensions: apcu
|
||||
coverage: none
|
||||
|
||||
|
||||
4
.github/workflows/psalm-analysis.yml
vendored
4
.github/workflows/psalm-analysis.yml
vendored
@@ -12,10 +12,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up php8.1
|
||||
- name: Set up php8.2
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.1
|
||||
php-version: 8.2
|
||||
extensions: apcu
|
||||
coverage: none
|
||||
|
||||
|
||||
4
.github/workflows/psalm-update-baseline.yml
vendored
4
.github/workflows/psalm-update-baseline.yml
vendored
@@ -12,10 +12,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up php8.1
|
||||
- name: Set up php8.2
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.1
|
||||
php-version: 8.2
|
||||
extensions: apcu
|
||||
coverage: none
|
||||
|
||||
|
||||
2
.github/workflows/twig-lint.yml
vendored
2
.github/workflows/twig-lint.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ["8.1"]
|
||||
php-versions: ["8.2"]
|
||||
|
||||
name: twig-lint
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
root /mnt/data/caddy
|
||||
}
|
||||
|
||||
servers {
|
||||
# trusted_proxies placeholder
|
||||
}
|
||||
|
||||
log {
|
||||
level ERROR
|
||||
}
|
||||
@@ -12,59 +16,11 @@
|
||||
|
||||
{$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} {
|
||||
|
||||
# Notify Push
|
||||
route /push/* {
|
||||
uri strip_prefix /push
|
||||
reverse_proxy {$NEXTCLOUD_HOST}:7867 {
|
||||
# trusted_proxies placeholder
|
||||
}
|
||||
}
|
||||
# Bundled
|
||||
import /caddy-imports/*
|
||||
|
||||
# Talk
|
||||
route /standalone-signaling/* {
|
||||
uri strip_prefix /standalone-signaling
|
||||
reverse_proxy {$TALK_HOST}:8081 {
|
||||
# trusted_proxies placeholder
|
||||
}
|
||||
}
|
||||
|
||||
# Collabora
|
||||
route /browser/* {
|
||||
reverse_proxy {$COLLABORA_HOST}:9980 {
|
||||
# trusted_proxies placeholder
|
||||
}
|
||||
}
|
||||
route /hosting/* {
|
||||
reverse_proxy {$COLLABORA_HOST}:9980 {
|
||||
# trusted_proxies placeholder
|
||||
}
|
||||
}
|
||||
route /cool/* {
|
||||
reverse_proxy {$COLLABORA_HOST}:9980 {
|
||||
# trusted_proxies placeholder
|
||||
}
|
||||
}
|
||||
|
||||
# Onlyoffice
|
||||
route /onlyoffice/* {
|
||||
uri strip_prefix /onlyoffice
|
||||
reverse_proxy {$ONLYOFFICE_HOST}:80 {
|
||||
header_up X-Forwarded-Host {http.request.host}/onlyoffice
|
||||
header_up X-Forwarded-Proto https
|
||||
# trusted_proxies placeholder
|
||||
}
|
||||
}
|
||||
|
||||
# Nextcloud
|
||||
route {
|
||||
rewrite /.well-known/carddav /remote.php/dav
|
||||
rewrite /.well-known/caldav /remote.php/dav
|
||||
header Strict-Transport-Security max-age=31536000;
|
||||
reverse_proxy localhost:8000 {
|
||||
# See https://github.com/nextcloud/all-in-one/issues/828
|
||||
# trusted_proxies placeholder
|
||||
}
|
||||
}
|
||||
# Others
|
||||
import /mnt/data/caddy-imports/*
|
||||
|
||||
# TLS options
|
||||
tls {
|
||||
|
||||
@@ -3,83 +3,74 @@ FROM caddy:2.6.4-alpine as caddy
|
||||
|
||||
FROM httpd:2.4.57-alpine3.17
|
||||
|
||||
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
COPY --chown=33:33 Caddyfile /Caddyfile
|
||||
COPY --chmod=664 nextcloud.conf /usr/local/apache2/conf/nextcloud.conf
|
||||
COPY --chmod=664 nextcloud /nextcloud
|
||||
COPY --chmod=664 caddy-imports/* /caddy-imports/
|
||||
COPY --chmod=664 supervisord.conf /supervisord.conf
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||
|
||||
VOLUME /mnt/data
|
||||
|
||||
RUN set -ex; \
|
||||
apk add --no-cache shadow; \
|
||||
groupmod -g 333 xfs; \
|
||||
usermod -u 333 -g 333 xfs; \
|
||||
groupmod -g 33 www-data; \
|
||||
usermod -u 33 -g 33 www-data; \
|
||||
apk del --no-cache shadow
|
||||
|
||||
RUN mkdir -p /mnt/data; \
|
||||
chown www-data:www-data /mnt/data;
|
||||
|
||||
VOLUME /mnt/data
|
||||
|
||||
RUN set -ex; \
|
||||
apk del --no-cache shadow; \
|
||||
\
|
||||
mkdir -p /mnt/data; \
|
||||
chown -R www-data:www-data /mnt/data; \
|
||||
\
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
supervisor \
|
||||
wget \
|
||||
tzdata \
|
||||
ca-certificates \
|
||||
openssl \
|
||||
netcat-openbsd
|
||||
|
||||
COPY --from=caddy /usr/bin/caddy /usr/bin/
|
||||
RUN chmod +x /usr/bin/caddy
|
||||
|
||||
RUN sed -i \
|
||||
-e '/^Listen /d' \
|
||||
-e 's/^#\(LoadModule .*mod_rewrite.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_headers.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_proxy.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_proxy_fcgi.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_setenvif.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_env.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_mime.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_dir.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_authz_core.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_alias.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_mpm_event.so\)/\1/' \
|
||||
-e 's/\(LoadModule .*mod_mpm_worker.so\)/#\1/' \
|
||||
-e 's/\(LoadModule .*mod_mpm_prefork.so\)/#\1/' \
|
||||
conf/httpd.conf; \
|
||||
echo "Include conf/nextcloud.conf" | tee -a conf/httpd.conf; \
|
||||
echo "ServerName localhost" | tee -a conf/httpd.conf
|
||||
|
||||
COPY nextcloud.conf conf
|
||||
|
||||
RUN set -ex; \
|
||||
rm -rf conf/original conf/original && \
|
||||
rm -rf /var/www/html/* && \
|
||||
mkdir /var/www && \
|
||||
chown -R www-data:www-data /var/www;
|
||||
|
||||
RUN mkdir /var/log/supervisord; \
|
||||
netcat-openbsd; \
|
||||
\
|
||||
sed -i \
|
||||
-e '/^Listen /d' \
|
||||
-e 's/^#\(LoadModule .*mod_rewrite.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_headers.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_proxy.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_proxy_fcgi.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_setenvif.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_env.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_mime.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_dir.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_authz_core.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_alias.so\)/\1/' \
|
||||
-e 's/^#\(LoadModule .*mod_mpm_event.so\)/\1/' \
|
||||
-e 's/\(LoadModule .*mod_mpm_worker.so\)/#\1/' \
|
||||
-e 's/\(LoadModule .*mod_mpm_prefork.so\)/#\1/' \
|
||||
/usr/local/apache2/conf/httpd.conf; \
|
||||
echo "Include conf/nextcloud.conf" | tee -a /usr/local/apache2/conf/httpd.conf; \
|
||||
echo "ServerName localhost" | tee -a /usr/local/apache2/conf/httpd.conf; \
|
||||
\
|
||||
rm -rf /usr/local/apache2/conf/original /var/www; \
|
||||
mkdir -p /var/www; \
|
||||
chown -R www-data:www-data /var/www; \
|
||||
\
|
||||
mkdir /var/log/supervisord; \
|
||||
mkdir /var/run/supervisord; \
|
||||
chown www-data:www-data /var/run/supervisord; \
|
||||
chown www-data:www-data /var/log/supervisord;
|
||||
|
||||
COPY Caddyfile /
|
||||
|
||||
COPY start.sh /usr/bin/
|
||||
COPY healthcheck.sh /usr/bin/
|
||||
COPY supervisord.conf /
|
||||
RUN chmod +x /usr/bin/start.sh; \
|
||||
chmod +x /usr/bin/healthcheck.sh; \
|
||||
chmod +r /supervisord.conf; \
|
||||
chown www-data:www-data /Caddyfile; \
|
||||
chown www-data:www-data /var/log/supervisord; \
|
||||
\
|
||||
chown -R www-data:www-data /usr/local/apache2; \
|
||||
chmod +r -R /usr/local/apache2
|
||||
|
||||
# Give root a random password
|
||||
RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||
chmod +r -R /usr/local/apache2; \
|
||||
\
|
||||
echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||
|
||||
USER www-data
|
||||
|
||||
ENTRYPOINT ["start.sh"]
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
||||
|
||||
HEALTHCHECK CMD healthcheck.sh
|
||||
HEALTHCHECK CMD /healthcheck.sh
|
||||
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|
||||
|
||||
10
Containers/apache/caddy-imports/collabora
Normal file
10
Containers/apache/caddy-imports/collabora
Normal file
@@ -0,0 +1,10 @@
|
||||
# Collabora
|
||||
route /browser/* {
|
||||
reverse_proxy {$COLLABORA_HOST}:9980
|
||||
}
|
||||
route /hosting/* {
|
||||
reverse_proxy {$COLLABORA_HOST}:9980
|
||||
}
|
||||
route /cool/* {
|
||||
reverse_proxy {$COLLABORA_HOST}:9980
|
||||
}
|
||||
5
Containers/apache/caddy-imports/notify-push
Normal file
5
Containers/apache/caddy-imports/notify-push
Normal file
@@ -0,0 +1,5 @@
|
||||
# Notify Push
|
||||
route /push/* {
|
||||
uri strip_prefix /push
|
||||
reverse_proxy {$NEXTCLOUD_HOST}:7867
|
||||
}
|
||||
8
Containers/apache/caddy-imports/onlyoffice
Normal file
8
Containers/apache/caddy-imports/onlyoffice
Normal file
@@ -0,0 +1,8 @@
|
||||
# Onlyoffice
|
||||
route /onlyoffice/* {
|
||||
uri strip_prefix /onlyoffice
|
||||
reverse_proxy {$ONLYOFFICE_HOST}:80 {
|
||||
header_up X-Forwarded-Host {http.request.host}/onlyoffice
|
||||
header_up X-Forwarded-Proto https
|
||||
}
|
||||
}
|
||||
5
Containers/apache/caddy-imports/talk
Normal file
5
Containers/apache/caddy-imports/talk
Normal file
@@ -0,0 +1,5 @@
|
||||
# Talk
|
||||
route /standalone-signaling/* {
|
||||
uri strip_prefix /standalone-signaling
|
||||
reverse_proxy {$TALK_HOST}:8081
|
||||
}
|
||||
7
Containers/apache/nextcloud
Normal file
7
Containers/apache/nextcloud
Normal file
@@ -0,0 +1,7 @@
|
||||
# Nextcloud
|
||||
route /* {
|
||||
rewrite /.well-known/carddav /remote.php/dav
|
||||
rewrite /.well-known/caldav /remote.php/dav
|
||||
header Strict-Transport-Security max-age=31536000;
|
||||
reverse_proxy localhost:8000
|
||||
}
|
||||
@@ -45,12 +45,18 @@ else
|
||||
fi
|
||||
echo "$CADDYFILE" > /Caddyfile
|
||||
|
||||
# Overwrite nextcloud conf
|
||||
cat /nextcloud > /mnt/data/caddy-imports/nextcloud
|
||||
|
||||
# Fix the Caddyfile format
|
||||
caddy fmt --overwrite /Caddyfile
|
||||
|
||||
# Add caddy path
|
||||
mkdir -p /mnt/data/caddy/
|
||||
|
||||
# Add caddy import path
|
||||
mkdir -p /mnt/data/caddy-imports
|
||||
|
||||
# Fix apache startup
|
||||
rm -f /usr/local/apache2/logs/httpd.pid
|
||||
|
||||
|
||||
@@ -13,11 +13,8 @@ RUN set -ex; \
|
||||
|
||||
VOLUME /root
|
||||
|
||||
COPY start.sh /usr/bin/
|
||||
COPY backupscript.sh /
|
||||
RUN chmod +x /usr/bin/start.sh; \
|
||||
chmod +x /backupscript.sh
|
||||
COPY --chmod=770 *.sh /
|
||||
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
|
||||
USER root
|
||||
ENTRYPOINT ["start.sh"]
|
||||
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|
||||
|
||||
@@ -24,6 +24,14 @@ for directory in "${VOLUME_DIRS[@]}"; do
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
# Test if default volumes are there
|
||||
DEFAULT_VOLUMES=(nextcloud_aio_apache nextcloud_aio_nextcloud nextcloud_aio_database nextcloud_aio_database_dump nextcloud_aio_elasticsearch nextcloud_aio_nextcloud_data nextcloud_aio_mastercontainer)
|
||||
for volume in "${DEFAULT_VOLUMES[@]}"; do
|
||||
if ! mountpoint -q "/nextcloud_aio_volumes/$volume"; then
|
||||
echo "$volume is missing which is not intended."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Check if target is mountpoint
|
||||
if ! mountpoint -q /mnt/borgbackup; then
|
||||
@@ -86,8 +94,9 @@ if [ "$BORG_MODE" = backup ]; then
|
||||
if ! [ -f "$BORG_BACKUP_DIRECTORY/config" ]; then
|
||||
# Don't initialize if already initialized
|
||||
if [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" ]; then
|
||||
echo "Cannot initialize a new repository as that was already done at least one time."
|
||||
echo "If you still want to do so, you may delete the 'borg.config' file that is stored in the mastercontainer volume manually, which will allow you to initialize a new borg repository in the chosen directory:"
|
||||
echo "No borg config file was found in the targeted directory."
|
||||
echo "This might happen if the targeted directory is located on an external drive and the drive not connected anymore. You should check this."
|
||||
echo "If you instead want to initialize a new backup repository, you may delete the 'borg.config' file that is stored in the mastercontainer volume manually, which will allow you to initialize a new borg repository in the chosen directory:"
|
||||
echo "sudo docker exec nextcloud-aio-mastercontainer rm /mnt/docker-aio-config/data/borg.config"
|
||||
exit 1
|
||||
fi
|
||||
@@ -132,6 +141,13 @@ if [ "$BORG_MODE" = backup ]; then
|
||||
# Exclude the nextcloud log and audit log for GDPR reasons
|
||||
BORG_EXCLUDE=(--exclude "/nextcloud_aio_volumes/nextcloud_aio_nextcloud/data/nextcloud.log*" --exclude "/nextcloud_aio_volumes/nextcloud_aio_nextcloud/data/audit.log")
|
||||
|
||||
# Make sure that there is always a borg.config file before creating a new backup
|
||||
if ! [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" ]; then
|
||||
echo "Did not find borg.config file in the mastercontainer volume."
|
||||
echo "Cannot create a backup as this is wrong."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create the backup
|
||||
echo "Starting the backup..."
|
||||
get_start_time
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
# Probably from this file: https://github.com/Cisco-Talos/clamav-docker/blob/main/clamav/0.105/alpine/Dockerfile
|
||||
FROM clamav/clamav:1.0.1-2
|
||||
# Probably from this file: https://github.com/Cisco-Talos/clamav-docker/blob/main/clamav/1.1/alpine/Dockerfile
|
||||
FROM clamav/clamav:1.1.0-1
|
||||
|
||||
RUN apk add --no-cache tzdata
|
||||
COPY clamav.conf /tmp/
|
||||
RUN cat /tmp/clamav.conf >> /etc/clamav/clamd.conf
|
||||
COPY clamav.conf /tmp/clamav.conf
|
||||
|
||||
RUN set -ex; \
|
||||
apk add --no-cache tzdata; \
|
||||
cat /tmp/clamav.conf | tee -a /etc/clamav/clamd.conf; \
|
||||
rm /tmp/clamav.conf
|
||||
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# From a file located probably somewhere here: https://github.com/CollaboraOnline/online/tree/master/docker
|
||||
FROM collabora/code:22.05.13.1.1
|
||||
FROM collabora/code:22.05.14.3.1
|
||||
|
||||
USER root
|
||||
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
FROM alpine:3.17.3
|
||||
RUN apk add --no-cache lighttpd bash netcat-openbsd
|
||||
RUN set -ex; \
|
||||
apk add --no-cache bash lighttpd netcat-openbsd; \
|
||||
adduser -S www-data -G www-data; \
|
||||
rm -rf /etc/lighttpd/lighttpd.conf; \
|
||||
chmod +r -R /etc/lighttpd; \
|
||||
mkdir -p /var/www/domaincheck; \
|
||||
chown www-data:www-data -R /var/www
|
||||
COPY --chown=www-data:www-data lighttpd.conf /etc/lighttpd/lighttpd.conf
|
||||
|
||||
RUN adduser -S www-data -G www-data
|
||||
RUN rm -rf /etc/lighttpd/lighttpd.conf
|
||||
COPY lighttpd.conf /etc/lighttpd/lighttpd.conf
|
||||
RUN chmod +r -R /etc/lighttpd && \
|
||||
chown www-data:www-data -R /var/www && \
|
||||
chown www-data:www-data /etc/lighttpd/lighttpd.conf
|
||||
|
||||
COPY start.sh /
|
||||
RUN chmod +x /start.sh
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
|
||||
USER www-data
|
||||
RUN mkdir -p /var/www/domaincheck/
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
|
||||
HEALTHCHECK CMD nc -z localhost $APACHE_PORT || exit 1
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# Probably from here https://github.com/elastic/elasticsearch/blob/main/distribution/docker/src/docker/Dockerfile
|
||||
FROM elasticsearch:7.17.9
|
||||
|
||||
RUN elasticsearch-plugin install --batch ingest-attachment
|
||||
FROM elasticsearch:7.17.10
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
export DEBIAN_FRONTEND=noninteractive; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
tzdata \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
elasticsearch-plugin install --batch ingest-attachment
|
||||
|
||||
HEALTHCHECK CMD nc -z localhost 9200 || exit 1
|
||||
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.20.3-alpine3.17 as go
|
||||
FROM golang:1.20.4-alpine3.17 as go
|
||||
RUN set -ex; \
|
||||
apk add --no-cache \
|
||||
vips-dev \
|
||||
@@ -7,7 +7,7 @@ RUN set -ex; \
|
||||
vips-jxl \
|
||||
vips-poppler \
|
||||
build-base; \
|
||||
go install github.com/h2non/imaginary@b632dae8cc321452c3f85bcae79c580b1ae1ed84
|
||||
go install github.com/h2non/imaginary@b632dae8cc321452c3f85bcae79c580b1ae1ed84;
|
||||
|
||||
FROM alpine:3.17.3
|
||||
RUN set -ex; \
|
||||
@@ -23,11 +23,13 @@ RUN set -ex; \
|
||||
|
||||
COPY --from=go /go/bin/imaginary /usr/local/bin/imaginary
|
||||
|
||||
ENV PORT 9000
|
||||
|
||||
USER nobody
|
||||
|
||||
# https://github.com/h2non/imaginary#memory-issues
|
||||
ENV MALLOC_ARENA_MAX=2
|
||||
ENTRYPOINT ["imaginary", "-p", "9000", "-return-size", "-max-allowed-resolution", "222.2"]
|
||||
ENTRYPOINT ["imaginary", "-return-size", "-max-allowed-resolution", "222.2"]
|
||||
|
||||
HEALTHCHECK CMD nc -z localhost 9000 || exit 1
|
||||
HEALTHCHECK CMD nc -z localhost "$PORT" || exit 1
|
||||
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
# Docker CLI is a requirement
|
||||
FROM docker:23.0.5-cli as docker
|
||||
FROM docker:23.0.6-cli as docker
|
||||
|
||||
# Caddy is a requirement
|
||||
FROM caddy:2.6.4-alpine as caddy
|
||||
|
||||
# From https://github.com/docker-library/php/blob/master/8.1/alpine3.17/fpm/Dockerfile
|
||||
FROM php:8.1.18-fpm-alpine3.17
|
||||
# From https://github.com/docker-library/php/blob/master/8.2/alpine3.17/fpm/Dockerfile
|
||||
FROM php:8.2.6-fpm-alpine3.17
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 8080
|
||||
EXPOSE 8443
|
||||
|
||||
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
|
||||
COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker
|
||||
|
||||
WORKDIR /var/www/docker-aio
|
||||
|
||||
RUN set -ex; \
|
||||
apk add --no-cache shadow; \
|
||||
groupmod -g 333 xfs; \
|
||||
usermod -u 333 -g 333 xfs; \
|
||||
groupmod -g 33 www-data; \
|
||||
usermod -u 33 -g 33 www-data
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 8080
|
||||
EXPOSE 8443
|
||||
|
||||
RUN mkdir -p /var/www/docker-aio;
|
||||
|
||||
WORKDIR /var/www/docker-aio
|
||||
|
||||
RUN set -ex; \
|
||||
usermod -u 33 -g 33 www-data; \
|
||||
\
|
||||
apk add --no-cache \
|
||||
util-linux-misc \
|
||||
ca-certificates \
|
||||
@@ -36,16 +36,14 @@ RUN set -ex; \
|
||||
sudo \
|
||||
netcat-openbsd \
|
||||
curl \
|
||||
grep
|
||||
|
||||
RUN set -ex; \
|
||||
grep; \
|
||||
\
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
autoconf \
|
||||
build-base; \
|
||||
pecl install APCu-5.1.22; \
|
||||
docker-php-ext-enable apcu; \
|
||||
rm -r /tmp/pear; \
|
||||
\
|
||||
runDeps="$( \
|
||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
||||
| tr ',' '\n' \
|
||||
@@ -57,38 +55,30 @@ RUN set -ex; \
|
||||
grep -q '^pm = dynamic' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
sed -i 's/^pm = dynamic/pm = ondemand/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
sed -i 's/^pm.max_children =.*/pm.max_children = 80/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
sed -i 's|access.log = /proc/self/fd/2|access.log = /proc/self/fd/1|' /usr/local/etc/php-fpm.d/docker.conf
|
||||
|
||||
COPY --from=caddy /usr/bin/caddy /usr/bin/
|
||||
RUN chmod +x /usr/bin/caddy
|
||||
|
||||
COPY --from=docker /usr/local/bin/docker /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker
|
||||
|
||||
RUN set -e && \
|
||||
sed -i 's|access.log = /proc/self/fd/2|access.log = /proc/self/fd/1|' /usr/local/etc/php-fpm.d/docker.conf; \
|
||||
\
|
||||
apk add --no-cache git; \
|
||||
wget https://getcomposer.org/installer -O - | php -- --install-dir=/usr/local/bin --filename=composer; \
|
||||
chmod +x /usr/local/bin/composer; \
|
||||
cd /var/www/docker-aio; \
|
||||
git clone https://github.com/nextcloud-releases/all-in-one.git --depth 1 .; \
|
||||
find ./ -not -path ./php -maxdepth 1 -mindepth 1 -delete; \
|
||||
chown www-data:www-data -R /var/www/docker-aio; \
|
||||
cd php; \
|
||||
composer install --no-dev; \
|
||||
composer clearcache; \
|
||||
sudo -u www-data composer install --no-dev; \
|
||||
sudo -u www-data composer clear-cache; \
|
||||
cd ..; \
|
||||
rm -f /usr/local/bin/composer; \
|
||||
chmod 770 -R ./; \
|
||||
chown www-data:www-data -R /var/www; \
|
||||
rm -r ./php/data; \
|
||||
rm -r ./php/session; \
|
||||
apk del --no-cache git
|
||||
|
||||
RUN mkdir -p /etc/apache2/certs && \
|
||||
cd /etc/apache2/certs && \
|
||||
openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -subj "/C=DE/ST=BE/L=Local/O=Dev/CN=nextcloud.local" -keyout ./ssl.key -out ./ssl.crt;
|
||||
|
||||
COPY mastercontainer.conf /etc/apache2/sites-available/
|
||||
|
||||
RUN sed -i \
|
||||
chmod -R 770 /var/www/docker-aio; \
|
||||
chown -R www-data:www-data /var/www; \
|
||||
rm -r php/data; \
|
||||
rm -r php/session; \
|
||||
\
|
||||
mkdir -p /etc/apache2/certs; \
|
||||
cd /etc/apache2/certs; \
|
||||
openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -subj "/C=DE/ST=BE/L=Local/O=Dev/CN=nextcloud.local" -keyout /etc/apache2/certs/ssl.key -out /etc/apache2/certs/ssl.crt; \
|
||||
\
|
||||
sed -i \
|
||||
-e '/^Listen /d' \
|
||||
-e 's/User apache/User www-data/g' \
|
||||
-e 's/Group apache/Group www-data/g' \
|
||||
@@ -107,35 +97,23 @@ RUN sed -i \
|
||||
echo "ServerName localhost" | tee -a /etc/apache2/httpd.conf; \
|
||||
echo "LoadModule ssl_module modules/mod_ssl.so" | tee -a /etc/apache2/httpd.conf; \
|
||||
echo "LoadModule socache_shmcb_module modules/mod_socache_shmcb.so" | tee -a /etc/apache2/httpd.conf; \
|
||||
echo "Include /etc/apache2/sites-available/mastercontainer.conf" | tee -a /etc/apache2/httpd.conf
|
||||
|
||||
RUN set -ex; \
|
||||
echo "Include /etc/apache2/sites-available/mastercontainer.conf" | tee -a /etc/apache2/httpd.conf; \
|
||||
\
|
||||
rm -f /etc/apache2/conf.d/default.conf \
|
||||
/etc/apache2/conf.d/userdir.conf \
|
||||
/etc/apache2/conf.d/info.conf
|
||||
|
||||
RUN mkdir /var/log/supervisord; \
|
||||
/etc/apache2/conf.d/info.conf; \
|
||||
\
|
||||
mkdir /var/log/supervisord; \
|
||||
mkdir /var/run/supervisord;
|
||||
|
||||
COPY Caddyfile /
|
||||
COPY start.sh /usr/bin/
|
||||
COPY backup-time-file-watcher.sh /
|
||||
COPY session-deduplicator.sh /
|
||||
COPY cron.sh /
|
||||
COPY daily-backup.sh /
|
||||
COPY supervisord.conf /
|
||||
COPY healthcheck.sh /
|
||||
RUN chmod +x /usr/bin/start.sh; \
|
||||
chmod +x /cron.sh; \
|
||||
chmod +x /session-deduplicator.sh; \
|
||||
chmod +x /backup-time-file-watcher.sh; \
|
||||
chmod +x /daily-backup.sh; \
|
||||
chmod a+r /Caddyfile; \
|
||||
chmod +x /healthcheck.sh
|
||||
COPY --chmod=775 *.sh /
|
||||
COPY --chmod=664 Caddyfile /Caddyfile
|
||||
COPY --chmod=664 supervisord.conf /supervisord.conf
|
||||
COPY mastercontainer.conf /etc/apache2/sites-available/mastercontainer.conf
|
||||
|
||||
USER root
|
||||
|
||||
ENTRYPOINT ["start.sh"]
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
||||
|
||||
HEALTHCHECK CMD /healthcheck.sh
|
||||
|
||||
@@ -20,6 +20,12 @@ case "${1}" in
|
||||
esac
|
||||
}
|
||||
|
||||
# Check if running as root user
|
||||
if [ "$EUID" != "0" ]; then
|
||||
print_red "Container does not run as root user. This is not supported."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if socket is available and readable
|
||||
if ! [ -a "/var/run/docker.sock" ]; then
|
||||
print_red "Docker socket is not available. Cannot continue."
|
||||
|
||||
@@ -305,6 +305,7 @@ DATADIR_PERMISSION_CONF
|
||||
php /var/www/html/occ config:system:set enabledPreviewProviders 4 --value="OC\\Preview\\TXT"
|
||||
php /var/www/html/occ config:system:set enabledPreviewProviders 5 --value="OC\\Preview\\OpenDocument"
|
||||
php /var/www/html/occ config:system:set enabledPreviewProviders 6 --value="OC\\Preview\\Movie"
|
||||
php /var/www/html/occ config:system:set enabledPreviewProviders 7 --value="OC\\Preview\\Krita"
|
||||
php /var/www/html/occ config:system:set enable_previews --value=true --type=boolean
|
||||
|
||||
# Apply other settings
|
||||
@@ -630,12 +631,6 @@ if version_greater "$installed_version" "24.0.0.0"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Migration to ES8 is pending, thus disabling FTS for now.
|
||||
if [ "$INSTALL_LATEST_MAJOR" = yes ] || version_greater "$installed_version" "26.0.0.0"; then
|
||||
export FULLTEXTSEARCH_ENABLED=no
|
||||
echo "Fulltextsearch is not compatible with Nextcloud 26 and is getting disabled."
|
||||
fi
|
||||
|
||||
# Fulltextsearch
|
||||
if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then
|
||||
while ! nc -z "$FULLTEXTSEARCH_HOST" 9200; do
|
||||
|
||||
@@ -1,39 +1,35 @@
|
||||
# From https://github.com/docker-library/postgres/blob/master/15/alpine/Dockerfile
|
||||
FROM postgres:15.2-alpine
|
||||
FROM postgres:15.3-alpine
|
||||
|
||||
RUN apk add --no-cache bash openssl shadow grep mawk
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||
COPY --chmod=775 init-user-db.sh /docker-entrypoint-initdb.d/init-user-db.sh
|
||||
|
||||
# We need to use the same gid and uid as on old installations
|
||||
RUN set -ex; \
|
||||
apk add --no-cache bash openssl shadow grep mawk; \
|
||||
\
|
||||
# We need to use the same gid and uid as on old installations
|
||||
deluser postgres; \
|
||||
groupmod -g 9999 ping; \
|
||||
addgroup -g 999 -S postgres; \
|
||||
adduser -u 999 -S -D -G postgres -H -h /var/lib/postgresql -s /bin/sh postgres
|
||||
|
||||
adduser -u 999 -S -D -G postgres -H -h /var/lib/postgresql -s /bin/sh postgres; \
|
||||
apk del --no-cache shadow; \
|
||||
\
|
||||
# Fix default permissions
|
||||
RUN set -ex; \
|
||||
chown -R postgres:postgres /var/lib/postgresql; \
|
||||
chown -R postgres:postgres /var/run/postgresql; \
|
||||
chown -R postgres:postgres "$PGDATA"
|
||||
|
||||
COPY start.sh /usr/bin/
|
||||
COPY healthcheck.sh /usr/bin/
|
||||
COPY init-user-db.sh /docker-entrypoint-initdb.d/
|
||||
RUN set -ex; \
|
||||
chmod +x /usr/bin/start.sh; \
|
||||
chmod +xr /docker-entrypoint-initdb.d/init-user-db.sh; \
|
||||
chmod +x /usr/bin/healthcheck.sh
|
||||
|
||||
RUN mkdir /mnt/data; \
|
||||
chown postgres:postgres /mnt/data;
|
||||
chown -R postgres:postgres "$PGDATA"; \
|
||||
\
|
||||
mkdir /mnt/data; \
|
||||
chown postgres:postgres /mnt/data; \
|
||||
\
|
||||
# Give root a random password
|
||||
echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||
|
||||
VOLUME /mnt/data
|
||||
|
||||
# Give root a random password
|
||||
RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||
|
||||
USER postgres
|
||||
ENTRYPOINT ["start.sh"]
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
|
||||
HEALTHCHECK CMD healthcheck.sh
|
||||
HEALTHCHECK CMD /healthcheck.sh
|
||||
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# From https://github.com/docker-library/redis/blob/master/7.0/alpine/Dockerfile
|
||||
FROM redis:7.0.11-alpine
|
||||
|
||||
RUN apk add --no-cache openssl bash
|
||||
|
||||
COPY start.sh /usr/bin/
|
||||
RUN chmod +x /usr/bin/start.sh
|
||||
COPY --chmod=775 start.sh /usr/bin/start.sh
|
||||
|
||||
RUN set -ex; \
|
||||
apk add --no-cache openssl bash; \
|
||||
\
|
||||
# Give root a random password
|
||||
RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||
echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||
|
||||
USER redis
|
||||
ENTRYPOINT ["start.sh"]
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
FROM nats:2.9.16-scratch as nats
|
||||
FROM strukturag/nextcloud-spreed-signaling:1.1.2 as signaling
|
||||
FROM coturn/coturn:4.6.2-alpine
|
||||
FROM coturn/coturn:4.6.2-r0-alpine
|
||||
USER root
|
||||
|
||||
COPY --from=nats /nats-server /usr/local/bin/nats-server
|
||||
COPY --from=signaling /usr/bin/nextcloud-spreed-signaling /usr/local/bin/nextcloud-spreed-signaling
|
||||
|
||||
COPY --chmod=775 start.sh /usr/bin/start.sh
|
||||
COPY --chmod=664 supervisord.conf /supervisord.conf
|
||||
|
||||
RUN set -ex; \
|
||||
apk add --no-cache \
|
||||
ca-certificates \
|
||||
@@ -30,15 +33,11 @@ RUN set -ex; \
|
||||
util-linux \
|
||||
build-base \
|
||||
lua5.3-dev \
|
||||
luarocks5.3;
|
||||
|
||||
luarocks5.3; \
|
||||
\
|
||||
# Give root a random password
|
||||
RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||
|
||||
COPY --chmod=775 start.sh /usr/bin/start.sh
|
||||
COPY --chmod=664 supervisord.conf /supervisord.conf
|
||||
|
||||
RUN set -ex; \
|
||||
echo "root:$(openssl rand -base64 12)" | chpasswd; \
|
||||
\
|
||||
touch \
|
||||
/etc/nats.conf \
|
||||
/etc/signaling.conf \
|
||||
|
||||
@@ -20,7 +20,6 @@ set +x
|
||||
cat << TURN_CONF > "/etc/turnserver.conf"
|
||||
listening-port=$TALK_PORT
|
||||
fingerprint
|
||||
lt-cred-mech
|
||||
use-auth-secret
|
||||
static-auth-secret=$TURN_SECRET
|
||||
realm=$NC_DOMAIN
|
||||
|
||||
@@ -4,11 +4,9 @@ FROM containrrr/watchtower:1.5.3 as watchtower
|
||||
FROM alpine:3.17.3
|
||||
|
||||
RUN apk add --no-cache bash
|
||||
COPY --from=watchtower /watchtower /
|
||||
COPY --from=watchtower /watchtower /watchtower
|
||||
|
||||
COPY start.sh /
|
||||
RUN chmod +x /start.sh
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
|
||||
USER root
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|
||||
|
||||
@@ -2,15 +2,15 @@ version: "3.8"
|
||||
|
||||
volumes:
|
||||
nextcloud_aio_mastercontainer:
|
||||
name: nextcloud_aio_mastercontainer # This line is not allowed to be changed
|
||||
name: nextcloud_aio_mastercontainer # This line is not allowed to be changed as otherwise the built-in backup solution will not work
|
||||
|
||||
services:
|
||||
nextcloud:
|
||||
image: nextcloud/all-in-one:latest
|
||||
restart: always
|
||||
container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed
|
||||
container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed as otherwise AIO will not work correctly
|
||||
volumes:
|
||||
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed
|
||||
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed as otherwise the built-in backup solution will not work
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set 'WATCHTOWER_DOCKER_SOCKET_PATH'!
|
||||
ports:
|
||||
- 80:80 # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
|
||||
@@ -33,6 +33,8 @@ services:
|
||||
# - NEXTCLOUD_ENABLE_DRI_DEVICE=true # This allows to enable the /dev/dri device in the Nextcloud container which is needed for hardware-transcoding. See https://github.com/nextcloud/all-in-one#how-to-enable-hardware-transcoding-for-nextcloud
|
||||
# - TALK_PORT=3478 # This allows to adjust the port that the talk container is using.
|
||||
# - WATCHTOWER_DOCKER_SOCKET_PATH=/var/run/docker.sock # Needs to be specified if the docker socket on the host is not located in the default '/var/run/docker.sock'. Otherwise mastercontainer updates will fail. For macos it needs to be '/var/run/docker.sock'
|
||||
# networks: # Is needed when you want to create the nextcloud-aio network with ipv6-support using this file, see the network config at the bottom of the file
|
||||
# - nextcloud-aio # Is needed when you want to create the nextcloud-aio network with ipv6-support using this file, see the network config at the bottom of the file
|
||||
|
||||
# # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
|
||||
# # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588
|
||||
@@ -47,3 +49,16 @@ services:
|
||||
# - ./data:/data
|
||||
# - ./sites:/srv
|
||||
# network_mode: "host"
|
||||
|
||||
# # Optional: If you need ipv6, follow step 1 and 2 of https://github.com/nextcloud/all-in-one/blob/main/docker-ipv6-support.md first and then uncomment the below config in order to activate ipv6 for the internal nextcloud-aio network.
|
||||
# # Please make sure to uncomment also the networking lines of the mastercontainer above in order to actually create the network with docker-compose
|
||||
# # Inspired by https://github.com/mailcow/mailcow-dockerized/blob/master/docker-compose.yml
|
||||
# networks:
|
||||
# nextcloud-aio:
|
||||
# name: nextcloud-aio # This line is not allowed to be changed as otherwise the created network will not be used by the other containers of AIO
|
||||
# driver: bridge
|
||||
# enable_ipv6: true
|
||||
# ipam:
|
||||
# driver: default
|
||||
# config:
|
||||
# - subnet: fd12:3456:789a:2::/64 # IPv6 subnet to use
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
# IPv6-Support for Docker
|
||||
|
||||
Before you can use IPv6 in Docker containers or swarm services, you need to enable IPv6 support in the Docker daemon. Afterward, you can choose to use either IPv4 or IPv6 (or both) with any container, service, or network.
|
||||
Before enabling IPv6-Support for Docker, please note that there are still some unresolved problems in regards to IPv6-Support in Docker. See https://github.com/nextcloud/all-in-one/discussions/2557 for more details on this.
|
||||
|
||||
Now that this was mentioned, see the instructions below on how to enable IPv6 for Docker.
|
||||
|
||||
## Docker on Linux and Docker-rootless
|
||||
1. Edit `/etc/docker/daemon.json` (or `~/.config/docker/daemon.json` in case of docker-rootless), set the `ipv6` key to `true` and the `fixed-cidr-v6` key to your IPv6 subnet. In this example we are setting it to `2001:db8:1::/64`. Additionally set `experimental` to `true` and `ip6tables` to `true` as well.
|
||||
1. Edit `/etc/docker/daemon.json` (or `~/.config/docker/daemon.json` in case of docker-rootless), set the `ipv6` key to `true` and the `fixed-cidr-v6` key to your IPv6 subnet. In this example we are setting it to `fd12:3456:789a:1::/64`. Additionally set `experimental` to `true` and `ip6tables` to `true` as well. If you are using mailcow and enabled IPv6 with the update.sh, you can keep their daemon.json, it will work too.
|
||||
|
||||
```json
|
||||
{
|
||||
"ipv6": true,
|
||||
"fixed-cidr-v6": "2001:db8:1::/64",
|
||||
"fixed-cidr-v6": "fd12:3456:789a:1::/64",
|
||||
"experimental": true,
|
||||
"ip6tables": true
|
||||
}
|
||||
@@ -21,20 +23,22 @@ Before you can use IPv6 in Docker containers or swarm services, you need to enab
|
||||
```console
|
||||
sudo systemctl restart docker
|
||||
```
|
||||
3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `sudo docker network inspect nextcloud-aio | grep EnableIPv6`. On a new instance, this command should return that it did not find a network with this name. Then you can run `sudo docker network create --subnet="fd12:3456:789a:2::/64" --driver bridge --ipv6 nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/2045 in order to recreate the network and enable ipv6 for it.
|
||||
|
||||
## Docker Desktop (Windows and macOS)
|
||||
On Windows and macOS which use Docker Desktop, you need to go into the settings, and select `Docker Engine`. There you should see the currently used daemon.json file.
|
||||
|
||||
1. You need to now adjust this json file by setting the `ipv6` key to `true` and the `fixed-cidr-v6` key to your IPv6 subnet. In this example we are setting it to `2001:db8:1::/64`. Additionally set `experimental` to `true` and `ip6tables` to `true` as well.
|
||||
1. You need to now adjust this json file by setting the `ipv6` key to `true` and the `fixed-cidr-v6` key to your IPv6 subnet. In this example we are setting it to `fd12:3456:789a:1::/64`. Additionally set `experimental` to `true` and `ip6tables` to `true` as well.
|
||||
|
||||
```
|
||||
"ipv6": true,
|
||||
"fixed-cidr-v6": "2001:db8:1::/64",
|
||||
"fixed-cidr-v6": "fd12:3456:789a:1::/64",
|
||||
"experimental": true,
|
||||
"ip6tables": true
|
||||
```
|
||||
|
||||
2. Add these values to the json and make sure to keep the other currently values and that you don't see `Unexpected token in JSON at position ...` before attempting to restart by clicking on `Apply & restart`.
|
||||
3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `docker network inspect nextcloud-aio`. On a new instance, this command should return that it did not find a network with this name. Then you can run `docker network create --subnet="fd12:3456:789a:2::/64" --driver bridge --ipv6 nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/2045 in order to recreate the network and enable ipv6 for it.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ The recommended way is the following:
|
||||
1. Set up your domain correctly to point to your home network
|
||||
1. Set up a reverse proxy by following the [reverse proxy documentation](./reverse-proxy.md) but only open port 80 (which is needed for the ACME challenge to work - however no real traffic will use this port).
|
||||
1. Set up a local DNS-server like a pi-hole and configure it to be your local DNS-server for the whole network. Then in the Pi-hole interface, add a custom DNS-record for your domain and overwrite the A-record (and possibly the AAAA-record, too) to point to the private ip-address of your reverse proxy (see https://github.com/nextcloud/all-in-one#how-can-i-access-nextcloud-locally)
|
||||
1. Enter the the ip-address of your local dns-server in the deamon.json file for docker so that you are sure that all docker containers use the correct local dns-server.
|
||||
1. Enter the ip-address of your local dns-server in the deamon.json file for docker so that you are sure that all docker containers use the correct local dns-server.
|
||||
1. Now, entering the domain in the AIO-interface should work as expected and should allow you to continue with the setup
|
||||
|
||||
## 2. Use the ACME DNS-challenge
|
||||
|
||||
@@ -131,6 +131,7 @@ services:
|
||||
- dictionaries=${COLLABORA_DICTIONARIES}
|
||||
- TZ=${TIMEZONE}
|
||||
- server_name=${NC_DOMAIN}
|
||||
- DONT_GEN_SSL_CERT=1
|
||||
volumes:
|
||||
- nextcloud_aio_collabora_fonts:/opt/cool/systemplate/tmpfonts:rw
|
||||
restart: unless-stopped
|
||||
@@ -236,5 +237,13 @@ volumes:
|
||||
nextcloud_aio_nextcloud_data:
|
||||
name: nextcloud_aio_nextcloud_data
|
||||
|
||||
# Inspired by https://github.com/mailcow/mailcow-dockerized/blob/master/docker-compose.yml
|
||||
networks:
|
||||
nextcloud-aio:
|
||||
name: nextcloud-aio
|
||||
driver: bridge
|
||||
enable_ipv6: true
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: ${IPV6_NETWORK}
|
||||
|
||||
@@ -37,7 +37,7 @@ Since the AIO containers may change in the future, it is highly recommended to s
|
||||
1. If your previous copy of `sample.conf` is named `my.conf`, run `mv my.conf .env` in order to rename the file to `.env`.
|
||||
1. Run `sudo docker-compose down` to stop all running containers
|
||||
1. Back up all important files and folders
|
||||
1. Run `git pull` in order to get the updated yaml files from the repository. Now bring your `docker-compose.yml` file up-to-date with the updated one from the repository. You can use `diff docker-compose.yml latest.yml` for comparing.
|
||||
1. Run `git pull` in order to get the updated yaml files from the repository. Now bring your `docker-compose.yml` file up-to-date with the updated one from the repository. You can use `diff docker-compose.yml latest.yml` for comparing. ⚠️ **Please note**: Starting with AIO v5.1.0, ipv6 networking will be enabled by default, so make sure to either enable it first by following steps 1 and 2 of https://github.com/nextcloud/all-in-one/blob/main/docker-ipv6-support.md and then proceed with the steps below or disable ipv6 networking by editing the docker-compose file and removing ipv6 from the network.
|
||||
1. Also have a look at the `sample.conf` if any variable was added or renamed and add that to your conf file as well. Here may help the diff command as well.
|
||||
1. After the file update was successful, simply run `sudo docker-compose pull` to pull the new images.
|
||||
1. At the end run `sudo docker-compose up` in order to start and update the containers with the new configuration.
|
||||
|
||||
@@ -31,3 +31,4 @@ TALK_PORT=3478 # This allows to adjust the port that the talk container
|
||||
TIMEZONE=Europe/Berlin # TODO! This is the timezone that your containers will use.
|
||||
TURN_SECRET= # TODO! This needs to be a unique and good password!
|
||||
UPDATE_NEXTCLOUD_APPS="no" # When setting to "yes" (with quotes), it will automatically update all installed Nextcloud apps upon container startup on saturdays.
|
||||
IPV6_NETWORK=fd12:3456:789a:2::/64 # IPv6 subnet to use
|
||||
|
||||
@@ -15,6 +15,7 @@ OUTPUT="$(cat /tmp/containers.json)"
|
||||
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].internal_port)')"
|
||||
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].secrets)')"
|
||||
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].devices)')"
|
||||
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].backup_volumes)')"
|
||||
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[] | select(.container_name == "nextcloud-aio-watchtower"))')"
|
||||
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[] | select(.container_name == "nextcloud-aio-domaincheck"))')"
|
||||
OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[] | select(.container_name == "nextcloud-aio-borgbackup"))')"
|
||||
@@ -85,6 +86,7 @@ sed -i 's|NEXTCLOUD_ADDITIONAL_APKS=|NEXTCLOUD_ADDITIONAL_APKS=imagemagick
|
||||
sed -i 's|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value.|' sample.conf
|
||||
sed -i 's|INSTALL_LATEST_MAJOR=|INSTALL_LATEST_MAJOR=no # Setting this to yes will install the latest Major Nextcloud version upon the first installation|' sample.conf
|
||||
sed -i 's|=$|= # TODO! This needs to be a unique and good password!|' sample.conf
|
||||
echo 'IPV6_NETWORK=fd12:3456:789a:2::/64 # IPv6 subnet to use' >> sample.conf
|
||||
|
||||
cat sample.conf
|
||||
|
||||
@@ -128,8 +130,16 @@ done
|
||||
|
||||
cat << NETWORK >> containers.yml
|
||||
|
||||
# Inspired by https://github.com/mailcow/mailcow-dockerized/blob/master/docker-compose.yml
|
||||
networks:
|
||||
nextcloud-aio:
|
||||
name: nextcloud-aio
|
||||
driver: bridge
|
||||
enable_ipv6: true
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: \${IPV6_NETWORK}
|
||||
NETWORK
|
||||
|
||||
cat containers.yml > latest.yml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: nextcloud-aio-helm-chart
|
||||
description: A generated Helm Chart for Nextcloud AIO from Skippbox Kompose
|
||||
version: 5.0.0
|
||||
version: 5.1.0
|
||||
apiVersion: v2
|
||||
keywords:
|
||||
- latest
|
||||
|
||||
@@ -54,7 +54,7 @@ spec:
|
||||
value: nextcloud-aio-talk
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: nextcloud/aio-apache:20230501_090621-latest
|
||||
image: nextcloud/aio-apache:20230511_075831-latest
|
||||
name: nextcloud-aio-apache
|
||||
ports:
|
||||
- containerPort: {{ .Values.APACHE_PORT }}
|
||||
|
||||
@@ -38,7 +38,7 @@ spec:
|
||||
value: "90"
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: nextcloud/aio-clamav:20230501_090621-latest
|
||||
image: nextcloud/aio-clamav:20230511_075831-latest
|
||||
name: nextcloud-aio-clamav
|
||||
ports:
|
||||
- containerPort: 3310
|
||||
|
||||
@@ -34,6 +34,8 @@ spec:
|
||||
mountPath: /nextcloud-aio-collabora-fonts
|
||||
containers:
|
||||
- env:
|
||||
- name: DONT_GEN_SSL_CERT
|
||||
value: "1"
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
- name: aliasgroup1
|
||||
@@ -44,7 +46,7 @@ spec:
|
||||
value: --o:ssl.enable=false --o:ssl.termination=true --o:mount_jail_tree=false --o:logging.level=warning --o:home_mode.enable=true {{ .Values.COLLABORA_SECCOMP_POLICY }} --o:remote_font_config.url=https://{{ .Values.NC_DOMAIN }}/apps/richdocuments/settings/fonts.json
|
||||
- name: server_name
|
||||
value: "{{ .Values.NC_DOMAIN }}"
|
||||
image: nextcloud/aio-collabora:20230501_090621-latest
|
||||
image: nextcloud/aio-collabora:20230511_075831-latest
|
||||
name: nextcloud-aio-collabora
|
||||
ports:
|
||||
- containerPort: 9980
|
||||
|
||||
@@ -22,11 +22,25 @@ spec:
|
||||
io.kompose.service: nextcloud-aio-database
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-subpath
|
||||
image: alpine
|
||||
command:
|
||||
- mkdir
|
||||
- "-p"
|
||||
- /nextcloud-aio-database/data
|
||||
- /nextcloud-aio-database
|
||||
- /nextcloud-aio-database-dump
|
||||
volumeMounts:
|
||||
- name: nextcloud-aio-database-dump
|
||||
mountPath: /nextcloud-aio-database-dump
|
||||
- name: nextcloud-aio-database
|
||||
mountPath: /nextcloud-aio-database
|
||||
- name: init-volumes
|
||||
image: alpine
|
||||
command:
|
||||
- chown
|
||||
- 999:999
|
||||
- "-R"
|
||||
- /nextcloud-aio-database
|
||||
- /nextcloud-aio-database-dump
|
||||
volumeMounts:
|
||||
@@ -46,12 +60,13 @@ spec:
|
||||
value: nextcloud
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: nextcloud/aio-postgresql:20230501_090621-latest
|
||||
image: nextcloud/aio-postgresql:20230511_075831-latest
|
||||
name: nextcloud-aio-database
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql/data
|
||||
subPath: data
|
||||
name: nextcloud-aio-database
|
||||
- mountPath: /mnt/data
|
||||
name: nextcloud-aio-database-dump
|
||||
|
||||
@@ -42,7 +42,7 @@ spec:
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
- name: discovery.type
|
||||
value: single-node
|
||||
image: nextcloud/aio-fulltextsearch:20230501_090621-latest
|
||||
image: nextcloud/aio-fulltextsearch:20230511_075831-latest
|
||||
name: nextcloud-aio-fulltextsearch
|
||||
ports:
|
||||
- containerPort: 9200
|
||||
|
||||
@@ -26,7 +26,7 @@ spec:
|
||||
- env:
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: nextcloud/aio-imaginary:20230501_090621-latest
|
||||
image: nextcloud/aio-imaginary:20230511_075831-latest
|
||||
name: nextcloud-aio-imaginary
|
||||
ports:
|
||||
- containerPort: 9000
|
||||
|
||||
@@ -114,7 +114,7 @@ spec:
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
- name: UPDATE_NEXTCLOUD_APPS
|
||||
value: "{{ .Values.UPDATE_NEXTCLOUD_APPS }}"
|
||||
image: nextcloud/aio-nextcloud:20230501_090621-latest
|
||||
image: nextcloud/aio-nextcloud:20230511_075831-latest
|
||||
name: nextcloud-aio-nextcloud
|
||||
ports:
|
||||
- containerPort: 9000
|
||||
|
||||
@@ -42,7 +42,7 @@ spec:
|
||||
value: "{{ .Values.ONLYOFFICE_SECRET }}"
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: nextcloud/aio-onlyoffice:20230501_090621-latest
|
||||
image: nextcloud/aio-onlyoffice:20230511_075831-latest
|
||||
name: nextcloud-aio-onlyoffice
|
||||
ports:
|
||||
- containerPort: 80
|
||||
|
||||
@@ -37,7 +37,7 @@ spec:
|
||||
value: "{{ .Values.REDIS_PASSWORD }}"
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: nextcloud/aio-redis:20230501_090621-latest
|
||||
image: nextcloud/aio-redis:20230511_075831-latest
|
||||
name: nextcloud-aio-redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
|
||||
@@ -34,7 +34,7 @@ spec:
|
||||
value: "{{ .Values.TURN_SECRET }}"
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: nextcloud/aio-talk:20230501_090621-latest
|
||||
image: nextcloud/aio-talk:20230511_075831-latest
|
||||
name: nextcloud-aio-talk
|
||||
ports:
|
||||
- containerPort: {{ .Values.TALK_PORT }}
|
||||
|
||||
@@ -32,6 +32,7 @@ sed -i "s|\${TALK_PORT}:\${TALK_PORT}/|$TALK_PORT:$TALK_PORT/|g" latest.yml
|
||||
sed -i "s|- \${APACHE_PORT}|- $APACHE_PORT|" latest.yml
|
||||
sed -i "s|- \${TALK_PORT}|- $TALK_PORT|" latest.yml
|
||||
sed -i "s|\${NEXTCLOUD_DATADIR}|$NEXTCLOUD_DATADIR|" latest.yml
|
||||
sed -i "/name: nextcloud-aio/,$ d" latest.yml
|
||||
sed -i "/NEXTCLOUD_DATADIR/d" latest.yml
|
||||
sed -i "/\${NEXTCLOUD_MOUNT}/d" latest.yml
|
||||
sed -i "/^volumes:/a\ \ nextcloud_aio_nextcloud_trusted_cacerts:\n \ \ \ \ name: nextcloud_aio_nextcloud_trusted_cacerts" latest.yml
|
||||
@@ -56,11 +57,19 @@ cat << EOL > /tmp/initcontainers
|
||||
EOL
|
||||
cat << EOL > /tmp/initcontainers.database
|
||||
initContainers:
|
||||
- name: init-subpath
|
||||
image: alpine
|
||||
command:
|
||||
- mkdir
|
||||
- "-p"
|
||||
- /nextcloud-aio-database/data
|
||||
volumeMountsInitContainer:
|
||||
- name: init-volumes
|
||||
image: alpine
|
||||
command:
|
||||
- chown
|
||||
- 999:999
|
||||
- "-R"
|
||||
volumeMountsInitContainer:
|
||||
EOL
|
||||
# shellcheck disable=SC1083
|
||||
@@ -80,6 +89,11 @@ for variable in "${DEPLOYMENTS[@]}"; do
|
||||
if [ "$volumeName" != "nextcloud-aio-nextcloud-data" ]; then
|
||||
sed -i "/^.*volumeMountsInitContainer:/i\ \ \ \ \ \ \ \ \ \ \ \ - /$volumeName" "$variable"
|
||||
sed -i "/volumeMountsInitContainer:/a\ \ \ \ \ \ \ \ \ \ \ \ - name: $volumeName\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ mountPath: /$volumeName" "$variable"
|
||||
# Workaround for the database volume
|
||||
if [ "$volumeName" = nextcloud-aio-database ]; then
|
||||
sed -i "/mountPath: \/var\/lib\/postgresql\/data/a\ \ \ \ \ \ \ \ \ \ \ \ \ \ subPath: data" "$variable"
|
||||
fi
|
||||
|
||||
fi
|
||||
done
|
||||
sed -i "s|volumeMountsInitContainer|volumeMounts|" "$variable"
|
||||
@@ -174,6 +188,7 @@ sed -i 's|= |: |' /tmp/sample.conf
|
||||
sed -i '/^NEXTCLOUD_DATADIR/d' /tmp/sample.conf
|
||||
sed -i '/^APACHE_IP_BINDING/d' /tmp/sample.conf
|
||||
sed -i '/^NEXTCLOUD_MOUNT/d' /tmp/sample.conf
|
||||
sed -i '/^IPV6_NETWORK/d' /tmp/sample.conf
|
||||
sed -i '/_ENABLED.*/s/ yes / "yes" /' /tmp/sample.conf
|
||||
sed -i '/_ENABLED.*/s/ no / "no" /' /tmp/sample.conf
|
||||
sed -i 's|^NEXTCLOUD_TRUSTED_CACERTS_DIR: .*|NEXTCLOUD_TRUSTED_CACERTS_DIR: # Setting this to any value allows to automatically import root certificates into the Nextcloud container|' /tmp/sample.conf
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": "8.1.*",
|
||||
"php": "8.2.*",
|
||||
"ext-json": "*",
|
||||
"ext-sodium": "*",
|
||||
"ext-curl": "*",
|
||||
@@ -22,6 +22,6 @@
|
||||
"psalm": "psalm --threads=1",
|
||||
"psalm:update-baseline": "psalm --threads=1 --update-baseline",
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l {} \\;",
|
||||
"php-deprecation-detector": "find . -name \\*.php -not -path './vendor/*' -exec phpdd scan {} -n -t 8.1 \\;"
|
||||
"php-deprecation-detector": "find . -name \\*.php -not -path './vendor/*' -exec phpdd scan {} -n -t 8.2 \\;"
|
||||
}
|
||||
}
|
||||
|
||||
38
php/composer.lock
generated
38
php/composer.lock
generated
@@ -4,20 +4,20 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "ca8e9b0dbbbd88c096dd8f2bda37a315",
|
||||
"content-hash": "b0074cfbf6b5cde6d6d2207286ad2e85",
|
||||
"packages": [
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "7.5.1",
|
||||
"version": "7.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9"
|
||||
"reference": "8444a2bacf1960bc6a2b62ed86b8e72e11eebe51"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/b964ca597e86b752cd994f27293e9fa6b6a95ed9",
|
||||
"reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/8444a2bacf1960bc6a2b62ed86b8e72e11eebe51",
|
||||
"reference": "8444a2bacf1960bc6a2b62ed86b8e72e11eebe51",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -48,9 +48,6 @@
|
||||
"bamarni-bin": {
|
||||
"bin-links": true,
|
||||
"forward-command": false
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "7.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -116,7 +113,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.5.1"
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.6.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -132,7 +129,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-04-17T16:30:08+00:00"
|
||||
"time": "2023-05-15T20:43:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
@@ -1642,16 +1639,16 @@
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v3.5.1",
|
||||
"version": "v3.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/twigphp/Twig.git",
|
||||
"reference": "a6e0510cc793912b451fd40ab983a1d28f611c15"
|
||||
"reference": "106c170d08e8415d78be2d16c3d057d0d108262b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/a6e0510cc793912b451fd40ab983a1d28f611c15",
|
||||
"reference": "a6e0510cc793912b451fd40ab983a1d28f611c15",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/106c170d08e8415d78be2d16c3d057d0d108262b",
|
||||
"reference": "106c170d08e8415d78be2d16c3d057d0d108262b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1660,15 +1657,10 @@
|
||||
"symfony/polyfill-mbstring": "^1.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/container": "^1.0",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Twig\\": "src/"
|
||||
@@ -1702,7 +1694,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/twigphp/Twig/issues",
|
||||
"source": "https://github.com/twigphp/Twig/tree/v3.5.1"
|
||||
"source": "https://github.com/twigphp/Twig/tree/v3.6.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1714,7 +1706,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-02-08T07:49:20+00:00"
|
||||
"time": "2023-05-03T19:06:57+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
@@ -1724,7 +1716,7 @@
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "8.1.*",
|
||||
"php": "8.2.*",
|
||||
"ext-json": "*",
|
||||
"ext-sodium": "*",
|
||||
"ext-curl": "*",
|
||||
|
||||
@@ -13,40 +13,49 @@
|
||||
"required": ["image", "container_name"],
|
||||
"properties": {
|
||||
"image": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"expose": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^([0-9]{1,5})$"
|
||||
}
|
||||
},
|
||||
"cap_add": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^[A-Z_]+$"
|
||||
}
|
||||
},
|
||||
"depends_on": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^nextcloud-aio-[a-z-]+$"
|
||||
}
|
||||
},
|
||||
"display_name": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z ]+$"
|
||||
},
|
||||
"environment": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^.*=.*$",
|
||||
"minlength": 1
|
||||
}
|
||||
},
|
||||
"container_name": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^nextcloud-aio-[a-z-]+$"
|
||||
},
|
||||
"internal_port": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^(([0-9]{1,5})|host|(%[A-Z_]+%))$"
|
||||
},
|
||||
"stop_grace_period": {
|
||||
"type": "integer"
|
||||
@@ -59,19 +68,23 @@
|
||||
"minProperties": 3,
|
||||
"properties": {
|
||||
"ip_binding": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^(%[A-Z_]+%)?$"
|
||||
},
|
||||
"port_number": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^(%[A-Z_]+%)$"
|
||||
},
|
||||
"protocol": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^(tcp|udp)$"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"restart": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^unless-stopped$"
|
||||
},
|
||||
"shm_size": {
|
||||
"type": "integer"
|
||||
@@ -79,13 +92,25 @@
|
||||
"secrets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^[A-Z_]+$"
|
||||
}
|
||||
},
|
||||
"devices": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^/dev/[a-z]+$"
|
||||
}
|
||||
},
|
||||
"apparmor_unconfined": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"backup_volumes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^nextcloud_aio_[a-z_]+$"
|
||||
}
|
||||
},
|
||||
"volumes": {
|
||||
@@ -96,10 +121,12 @@
|
||||
"minProperties": 3,
|
||||
"properties": {
|
||||
"destination": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^((/[a-z_/.-]+)|(%[A-Z_]+%))$"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"pattern": "^((nextcloud_aio_[a-z_]+)|(%[A-Z_]+%))$"
|
||||
},
|
||||
"writeable": {
|
||||
"type": "boolean"
|
||||
|
||||
@@ -41,7 +41,11 @@
|
||||
"writeable": true
|
||||
}
|
||||
],
|
||||
"restart": "unless-stopped"
|
||||
"restart": "unless-stopped",
|
||||
"backup_volumes": [
|
||||
"nextcloud_aio_nextcloud",
|
||||
"nextcloud_aio_apache"
|
||||
]
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-database",
|
||||
@@ -75,7 +79,11 @@
|
||||
],
|
||||
"stop_grace_period": 1800,
|
||||
"restart": "unless-stopped",
|
||||
"shm_size": 268435456
|
||||
"shm_size": 268435456,
|
||||
"backup_volumes": [
|
||||
"nextcloud_aio_database",
|
||||
"nextcloud_aio_database_dump"
|
||||
]
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-nextcloud",
|
||||
@@ -167,6 +175,9 @@
|
||||
"restart": "unless-stopped",
|
||||
"devices": [
|
||||
"/dev/dri"
|
||||
],
|
||||
"backup_volumes": [
|
||||
"nextcloud_aio_nextcloud"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -207,7 +218,8 @@
|
||||
"extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:mount_jail_tree=false --o:logging.level=warning --o:home_mode.enable=true %COLLABORA_SECCOMP_POLICY% --o:remote_font_config.url=https://%NC_DOMAIN%/apps/richdocuments/settings/fonts.json",
|
||||
"dictionaries=%COLLABORA_DICTIONARIES%",
|
||||
"TZ=%TIMEZONE%",
|
||||
"server_name=%NC_DOMAIN%"
|
||||
"server_name=%NC_DOMAIN%",
|
||||
"DONT_GEN_SSL_CERT=1"
|
||||
],
|
||||
"volumes": [
|
||||
{
|
||||
@@ -269,31 +281,11 @@
|
||||
"destination": "/root",
|
||||
"writeable": true
|
||||
},
|
||||
{
|
||||
"source": "nextcloud_aio_nextcloud",
|
||||
"destination": "/nextcloud_aio_volumes/nextcloud_aio_nextcloud",
|
||||
"writeable": true
|
||||
},
|
||||
{
|
||||
"source": "%NEXTCLOUD_DATADIR%",
|
||||
"destination": "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data",
|
||||
"writeable": true
|
||||
},
|
||||
{
|
||||
"source": "nextcloud_aio_database",
|
||||
"destination": "/nextcloud_aio_volumes/nextcloud_aio_database",
|
||||
"writeable": true
|
||||
},
|
||||
{
|
||||
"source": "nextcloud_aio_database_dump",
|
||||
"destination": "/nextcloud_aio_volumes/nextcloud_aio_database_dump",
|
||||
"writeable": true
|
||||
},
|
||||
{
|
||||
"source": "nextcloud_aio_apache",
|
||||
"destination": "/nextcloud_aio_volumes/nextcloud_aio_apache",
|
||||
"writeable": true
|
||||
},
|
||||
{
|
||||
"source": "nextcloud_aio_mastercontainer",
|
||||
"destination": "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer",
|
||||
@@ -323,7 +315,8 @@
|
||||
],
|
||||
"cap_add": [
|
||||
"SYS_ADMIN"
|
||||
]
|
||||
],
|
||||
"apparmor_unconfined": true
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-watchtower",
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="5.9.0@8b9ad1eb9e8b7d3101f949291da2b9f7767cd163"/>
|
||||
<files psalm-version="5.11.0@c9b192ab8400fdaf04b2b13d110575adc879aa90"/>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
function disableSpinnerSpinner() {
|
||||
function enableSpinner() {
|
||||
document.getElementById('overlay').classList.add('loading');
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
xhr.addEventListener('error', () => disableSpinner());
|
||||
xhr.open(form.method, form.getAttribute("action"));
|
||||
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
disableSpinnerSpinner();
|
||||
enableSpinner();
|
||||
xhr.send(new URLSearchParams(new FormData(form)));
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
@@ -70,13 +70,15 @@ $app->post('/api/configuration', \AIO\Controller\ConfigurationController::class
|
||||
// Views
|
||||
$app->get('/containers', function (Request $request, Response $response, array $args) use ($container) {
|
||||
$view = Twig::fromRequest($request);
|
||||
$view->addExtension(new \AIO\Twig\ClassExtension());
|
||||
/** @var \AIO\Data\ConfigurationManager $configurationManager */
|
||||
$configurationManager = $container->get(\AIO\Data\ConfigurationManager::class);
|
||||
/** @var \AIO\Docker\DockerActionManager $dockerActionManger */
|
||||
$dockerActionManger = $container->get(\AIO\Docker\DockerActionManager::class);
|
||||
$dockerActionManger->ConnectMasterContainerToNetwork();
|
||||
/** @var \AIO\Controller\DockerController $dockerController */
|
||||
$dockerController = $container->get(\AIO\Controller\DockerController::class);
|
||||
$dockerActionManger->ConnectMasterContainerToNetwork();
|
||||
$dockerController->StartDomaincheckContainer();
|
||||
$view->addExtension(new \AIO\Twig\ClassExtension());
|
||||
return $view->render($response, 'containers.twig', [
|
||||
'domain' => $configurationManager->GetDomain(),
|
||||
'apache_port' => $configurationManager->GetApachePort(),
|
||||
@@ -151,6 +153,7 @@ $app->get('/setup', function (Request $request, Response $response, array $args)
|
||||
|
||||
// Auth Redirector
|
||||
$app->get('/', function (\Psr\Http\Message\RequestInterface $request, Response $response, array $args) use ($container) {
|
||||
/** @var \AIO\Auth\AuthManager $authManager */
|
||||
$authManager = $container->get(\AIO\Auth\AuthManager::class);
|
||||
|
||||
/** @var \AIO\Data\Setup $setup */
|
||||
|
||||
@@ -23,6 +23,11 @@ a {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.button:focus {
|
||||
color:black;
|
||||
border: 2px solid black;
|
||||
}
|
||||
|
||||
#logout {
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@ class Container {
|
||||
/** @var string[] */
|
||||
private array $capAdd;
|
||||
private int $shmSize;
|
||||
private bool $apparmorUnconfined;
|
||||
/** @var string[] */
|
||||
private array $backupVolumes;
|
||||
private DockerActionManager $dockerActionManager;
|
||||
|
||||
public function __construct(
|
||||
@@ -43,6 +46,8 @@ class Container {
|
||||
array $devices,
|
||||
array $capAdd,
|
||||
int $shmSize,
|
||||
bool $apparmorUnconfined,
|
||||
array $backupVolumes,
|
||||
DockerActionManager $dockerActionManager
|
||||
) {
|
||||
$this->identifier = $identifier;
|
||||
@@ -59,6 +64,8 @@ class Container {
|
||||
$this->devices = $devices;
|
||||
$this->capAdd = $capAdd;
|
||||
$this->shmSize = $shmSize;
|
||||
$this->apparmorUnconfined = $apparmorUnconfined;
|
||||
$this->backupVolumes = $backupVolumes;
|
||||
$this->dockerActionManager = $dockerActionManager;
|
||||
}
|
||||
|
||||
@@ -82,6 +89,10 @@ class Container {
|
||||
return $this->shmSize;
|
||||
}
|
||||
|
||||
public function isApparmorUnconfined() : bool {
|
||||
return $this->apparmorUnconfined;
|
||||
}
|
||||
|
||||
public function GetMaxShutdownTime() : int {
|
||||
return $this->maxShutdownTime;
|
||||
}
|
||||
@@ -98,6 +109,10 @@ class Container {
|
||||
return $this->capAdd;
|
||||
}
|
||||
|
||||
public function GetBackupVolumes() : array {
|
||||
return $this->backupVolumes;
|
||||
}
|
||||
|
||||
public function GetPorts() : ContainerPorts {
|
||||
return $this->ports;
|
||||
}
|
||||
|
||||
@@ -223,6 +223,16 @@ class ContainerDefinitionFetcher
|
||||
$shmSize = $entry['shm_size'];
|
||||
}
|
||||
|
||||
$apparmorUnconfined = false;
|
||||
if (isset($entry['apparmor_unconfined'])) {
|
||||
$apparmorUnconfined = $entry['apparmor_unconfined'];
|
||||
}
|
||||
|
||||
$backupVolumes = [];
|
||||
if (isset($entry['backup_volumes'])) {
|
||||
$backupVolumes = $entry['backup_volumes'];
|
||||
}
|
||||
|
||||
$containers[] = new Container(
|
||||
$entry['container_name'],
|
||||
$displayName,
|
||||
@@ -238,6 +248,8 @@ class ContainerDefinitionFetcher
|
||||
$devices,
|
||||
$capAdd,
|
||||
$shmSize,
|
||||
$apparmorUnconfined,
|
||||
$backupVolumes,
|
||||
$this->container->get(DockerActionManager::class)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ class DockerActionManager
|
||||
}
|
||||
|
||||
if ($internalPort !== "" && $internalPort !== 'host') {
|
||||
$connection = @fsockopen($containerName, (int)$internalPort, $errno, $errstr, 0.1);
|
||||
$connection = @fsockopen($containerName, (int)$internalPort, $errno, $errstr, 0.2);
|
||||
if ($connection) {
|
||||
fclose($connection);
|
||||
return new RunningState();
|
||||
@@ -421,12 +421,19 @@ class DockerActionManager
|
||||
$requestBody['HostConfig']['CapAdd'] = $capAdds;
|
||||
}
|
||||
|
||||
if ($container->isApparmorUnconfined()) {
|
||||
$requestBody['HostConfig']['SecurityOpt'] = ["apparmor:unconfined"];
|
||||
}
|
||||
|
||||
// Special things for the backup container which should not be exposed in the containers.json
|
||||
if ($container->GetIdentifier() === 'nextcloud-aio-borgbackup') {
|
||||
$requestBody['HostConfig']['SecurityOpt'] = ["apparmor:unconfined"];
|
||||
|
||||
// Additional backup directories
|
||||
$mounts = [];
|
||||
foreach ($this->getAllBackupVolumes() as $additionalBackupVolumes) {
|
||||
if ($additionalBackupVolumes !== '') {
|
||||
$mounts[] = ["Type" => "volume", "Source" => $additionalBackupVolumes, "Target" => "/nextcloud_aio_volumes/" . $additionalBackupVolumes, "ReadOnly" => false];
|
||||
}
|
||||
}
|
||||
foreach ($this->configurationManager->GetAdditionalBackupDirectoriesArray() as $additionalBackupDirectories) {
|
||||
if ($additionalBackupDirectories !== '') {
|
||||
if (!str_starts_with($additionalBackupDirectories, '/')) {
|
||||
@@ -488,6 +495,10 @@ class DockerActionManager
|
||||
}
|
||||
|
||||
public function isAnyUpdateAvailable() : bool {
|
||||
// return early if instance is not installed
|
||||
if (!$this->configurationManager->wasStartButtonClicked()) {
|
||||
return false;
|
||||
}
|
||||
$id = 'nextcloud-aio-apache';
|
||||
|
||||
if ($this->isContainerUpdateAvailable($id) !== "") {
|
||||
@@ -497,6 +508,31 @@ class DockerActionManager
|
||||
}
|
||||
}
|
||||
|
||||
private function getBackupVolumes(string $id) : array
|
||||
{
|
||||
$container = $this->containerDefinitionFetcher->GetContainerById($id);
|
||||
|
||||
$backupVolumes = $container->GetBackupVolumes();
|
||||
|
||||
foreach ($container->GetDependsOn() as $dependency) {
|
||||
$backupVolumes[] = $this->getBackupVolumes($dependency);
|
||||
}
|
||||
return $backupVolumes;
|
||||
}
|
||||
|
||||
private function getAllBackupVolumes() : array {
|
||||
$id = 'nextcloud-aio-apache';
|
||||
$backupVolumesArray = $this->getBackupVolumes($id);
|
||||
// Flatten array
|
||||
$backupVolumesArrayFlat = iterator_to_array(
|
||||
new \RecursiveIteratorIterator(
|
||||
new \RecursiveArrayIterator($backupVolumesArray)
|
||||
),
|
||||
$use_keys = false
|
||||
);
|
||||
return array_unique($backupVolumesArrayFlat);
|
||||
}
|
||||
|
||||
private function GetRepoDigestsOfContainer(string $containerName) : ?array {
|
||||
try {
|
||||
$containerUrl = $this->BuildApiUrl(sprintf('containers/%s/json', $containerName));
|
||||
@@ -677,10 +713,6 @@ class DockerActionManager
|
||||
'CheckDuplicate' => true,
|
||||
'Driver' => 'bridge',
|
||||
'Internal' => false,
|
||||
'Options' => [
|
||||
'com.docker.network.bridge.enable_icc' => 'true',
|
||||
'com.docker.network.bridge.enable_ip_masquerade' => 'true'
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
<h1>Nextcloud AIO v5.0.0</h1>
|
||||
<h1>Nextcloud AIO v5.2.0</h1>
|
||||
|
||||
{# Add 2nd tab warning #}
|
||||
<script type="text/javascript" src="second-tab-warning.js"></script>
|
||||
@@ -84,7 +84,7 @@
|
||||
{{ include('includes/aio-config.twig') }}
|
||||
<h2>New AIO instance</h2>
|
||||
{% if apache_port == '443' %}
|
||||
AIO is currently in "normal mode" which means that it handles the TLS proxying itself. This also means that it cannot be installed behind a web server or reverse proxy (like Apache, Nginx and else). If you want to run AIO behind a web server or reverse proxy (like Apache, Nginx and else), see the <b><a href="https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md">reverse proxy documentation</a></b>.<br><br>
|
||||
AIO is currently in "normal mode" which means that it handles the TLS proxying itself. This also means that it cannot be installed behind a web server or reverse proxy (like Apache, Nginx and else). If you want to run AIO behind a web server or reverse proxy (like Apache, Nginx and else), see the <b><a href="https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md">reverse proxy documentation</a></b>. Advice: have a detailed look at the changed docker run command for AIO.<br><br>
|
||||
{% else %}
|
||||
AIO is currently in "reverse proxy mode" which means that it can be installed behind a web server or reverse proxy (like Apache Nginx and else) and does not do the TLS proxying itself.<br><br>
|
||||
{% endif %}
|
||||
@@ -102,7 +102,7 @@
|
||||
Make sure that this server is reachable on port 443 (port 443/tcp is open/forwarded in your firewall/router) and that you've correctly set up the DNS config for the domain that you enter (set the A record to your public ipv4-address and if you need ipv6, set the AAAA record to your public ipv6-address. A CNAME record if of course also possible). You should see hints on what went wrong if your domain does not get accepted in the top right corner.<br><br>
|
||||
<details>
|
||||
<summary>Click here for further hints</summary><br />
|
||||
If you should not have a domain yet, you can get one for free e.g. from duckduckdns.org and others.<br><br>
|
||||
If you should not have a domain yet, you can get one for free e.g. from duckdns.org and others.<br><br>
|
||||
If you have a dynamic public IP-address, you can use e.g. <a href="https://ddclient.net/">DDclient</a> with a compatible domain provider for DNS updates.<br /><br/>
|
||||
If you only want to install AIO locally without exposing it to the public internet or if you cannot do so, feel free to follow <a href="https://github.com/nextcloud/all-in-one/blob/main/local-instance.md">this documentation</a>.<br><br>
|
||||
If you should be using Cloudflare Proxy for your domain, make sure to disable the Proxy feature temporarily as it might block the domain validation attempts.<br /><br/>
|
||||
@@ -189,7 +189,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if domain != "" and was_start_button_clicked == true %}
|
||||
{% if was_start_button_clicked == true %}
|
||||
{% if current_channel starts with 'latest' or current_channel starts with 'beta' or current_channel starts with 'develop' %}
|
||||
You are running the <a href="https://github.com/nextcloud/all-in-one#how-to-switch-the-channel"><b>{{ current_channel }}</b></a> channel. (<a href="/api/docker/logs?id=nextcloud-aio-mastercontainer">Logs</a>)<br><br>
|
||||
{% else %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<details>
|
||||
<summary>Click here to view the current AIO config and documentation links</summary><br />
|
||||
{% if domain != '' %}
|
||||
{% if was_start_button_clicked == true %}
|
||||
Nextclouds config.php file is stored in the nextcloud_aio_nextcloud Docker volume and can by edited by following the <a href="https://github.com/nextcloud/all-in-one#how-to-edit-nextclouds-configphp-file-with-a-texteditor">config.php documentation</a>.<br><br>
|
||||
You can run Nextcloud's usual occ commands by following the <a href="https://github.com/nextcloud/all-in-one#how-to-run-occ-commands">occ documentation</a></b>.<br><br>
|
||||
{% endif %}
|
||||
|
||||
@@ -170,6 +170,8 @@ Also, you may be interested in adjusting Nextcloud's Datadir to store the files
|
||||
### How to run AIO on Synology DSM
|
||||
On Synology, there are two things different in comparison to Linux: instead of using `--volume /var/run/docker.sock:/var/run/docker.sock:ro`, you need to use `--volume /volume1/docker/docker.sock:/var/run/docker.sock:ro` to run it. You also need to add `--env WATCHTOWER_DOCKER_SOCKET_PATH="/volume1/docker/docker.sock"`to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`). Apart from that it should work and behave the same like on Linux. Obviously the Synology Docker GUI will not work with that so you will need to either use SSH or create a user-defined script task in the task scheduler as the user 'root' in order to run the command.
|
||||
|
||||
⚠️ **Please note**: it is possible that the docker socket on your Synology is located in `/var/run/docker.sock` like the default on Linux. Then you can just use the Linux command without having to change anything - you will notice this when you try to start the container and it says that the bind mount failed. E.g. `docker: Error response from daemon: Bind mount failed: '/volume1/docker/docker.sock' does not exists.`
|
||||
|
||||
Also, you may be interested in adjusting Nextcloud's Datadir to store the files on the host system. See [this documentation](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir) on how to do it.
|
||||
|
||||
You'll also need to adjust Synology's firewall, see below:
|
||||
@@ -195,6 +197,7 @@ The easiest way to run it with Portainer on Linux is to use Portainer's stacks f
|
||||
- Cloudflare only supports uploading files up to 100 MB in the free plan, if you try to upload bigger files you will get an error (413 - Payload Too Large) if no chunking is used (e.g. for public uploads in the web, or if chunks are configured to be bigger than 100 MB in the clients or the web). If you need to upload bigger files, you need to disable the proxy option in your DNS settings, or you must use another proxy than Cloudflare tunnels. Both options will disable Cloudflare DDoS protection.
|
||||
- Cloudflare only allows a max timeout of 100s for requests which is not configurable. This means that any server-side processing e.g. for assembling chunks for big files during upload that take longer than 100s will simply not work. See https://github.com/nextcloud/server/issues/19223. If you need to upload big files reliably, you need to disable the proxy option in your DNS settings, or you must use another proxy than Cloudflare tunnels. Both options will disable Cloudflare DDoS protection.
|
||||
- It is known that the in AIO included collabora (Nextcloud Office) does not work out of the box behind Cloudflare. To make it work, you need to add all [Cloudflare IP-ranges](https://www.cloudflare.com/ips/) to the wopi-allowlist in `https://yourdomain.com/settings/admin/richdocuments`
|
||||
- Cloudflare Proxy might block the Turnserver for Nextcloud Talk from working correctly. You might want to disable Cloudflare Proxy thus. See https://github.com/nextcloud/all-in-one/discussions/2463#discussioncomment-5779981
|
||||
- The built-in High performance backend for Nextcloud Talk will potentially not work out-of-the-box since it needs a separate port (by default 3478 or as chosen) available on the same domain. If you still want to use the feature, you will need to adjust and test your settings in `https://yourdomain.com/settings/admin/talk`.
|
||||
- If you get an error in Nextcloud's admin overview that the HSTS header is not set correctly, you might need to enable it in Cloudflare manually.
|
||||
- If you are using AIO's built-in Reverse Proxy and don't use your own, then may the certificate issuing possibly not work out-of-the-box because Cloudflare might block the attempt. In that case you need to disable the Proxy feature at least temporarily in order to make it work. See https://github.com/nextcloud/all-in-one/discussions/1101.
|
||||
@@ -300,7 +303,7 @@ Here is how to reset the AIO instance properly:
|
||||
1. Now remove all these stopped containers with `sudo docker container prune`
|
||||
1. Delete the docker network with `sudo docker network rm nextcloud-aio`
|
||||
1. Check which volumes are dangling with `sudo docker volume ls --filter "dangling=true"`
|
||||
1. Now remove all these dangling volumes: `sudo docker volume prune docker --filter all=1` (on Windows you might need to remove some volumes afterwards manually with `docker volume rm nextcloud_aio_backupdir`, `docker volume rm nextcloud_aio_nextcloud_datadir`).
|
||||
1. Now remove all these dangling volumes: `sudo docker volume prune --filter all=1` (on Windows you might need to remove some volumes afterwards manually with `docker volume rm nextcloud_aio_backupdir`, `docker volume rm nextcloud_aio_nextcloud_datadir`).
|
||||
1. If you've configured `NEXTCLOUD_DATADIR` to a path on your host instead of the default volume, you need to clean that up as well. (E.g. by simply deleting the directory).
|
||||
1. Make sure that no volumes are remaining with `sudo docker volume ls --format {{.Name}}`. If no `nextcloud-aio` volumes are listed, you can proceed with the steps below. If there should be some, you will need to stop them with `sudo docker volume rm <volume_name>` until no one is listed anymore.
|
||||
1. Optional: You can remove all docker images with `sudo docker image prune -a`.
|
||||
@@ -568,7 +571,7 @@ Be aware though that these locations will not be covered by the built-in backup
|
||||
**Please note:** If you can't see the type "local storage" in the external storage admin options, a restart of the containers from the AIO interface may be required.
|
||||
|
||||
### How to adjust the Talk port?
|
||||
By default will the talk container use port `3478/UDP` and `3478/TCP` for connections. You can adjust the port by adding e.g. `--env TALK_PORT=3478` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and adjusting the port to your desired value.
|
||||
By default will the talk container use port `3478/UDP` and `3478/TCP` for connections. You can adjust the port by adding e.g. `--env TALK_PORT=3478` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and adjusting the port to your desired value. Best is to use a port over 1024, so e.g. 3479 to not run into this: https://github.com/nextcloud/all-in-one/discussions/2517
|
||||
|
||||
### How to adjust the upload limit for Nextcloud?
|
||||
By default are public uploads to Nextcloud limited to a max of 10G (logged in users can upload much bigger files using the webinterface or the mobile/desktop clients since chunking is used in that case). You can adjust the upload limit by providing `--env NEXTCLOUD_UPLOAD_LIMIT=10G` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must start with a number and end with `G` e.g. `10G`.
|
||||
|
||||
102
reverse-proxy.md
102
reverse-proxy.md
@@ -132,6 +132,16 @@ You can get AIO running using the ACME DNS-challenge. Here is how to do it.
|
||||
|
||||
</details>
|
||||
|
||||
### Citrix ADC VPX / Citrix Netscaler
|
||||
|
||||
<details>
|
||||
|
||||
<summary>click here to expand</summary>
|
||||
|
||||
For a reverse proxy example guide for Citrix ADC VPX / Citrix Netscaler, see this guide by @esmith443: https://github.com/nextcloud/all-in-one/discussions/2452
|
||||
|
||||
</details>
|
||||
|
||||
### Cloudflare Tunnel
|
||||
|
||||
<details>
|
||||
@@ -352,6 +362,94 @@ Of course you need to modify `<your-nc-domain>` to the domain on which you want
|
||||
|
||||
</details>
|
||||
|
||||
### Node.js with Express
|
||||
|
||||
<details>
|
||||
|
||||
<summary>click here to expand</summary>
|
||||
|
||||
**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!
|
||||
|
||||
For Node.js, we will use the npm package `http-proxy`. WebSockets must be handled separately.
|
||||
|
||||
This example only uses `http`, but if your Express server already uses a `https` server, then follow the same instructions for `https`.
|
||||
|
||||
```js
|
||||
const HttpProxy = require('http-proxy');
|
||||
const express = require('express');
|
||||
const http = require('http');
|
||||
|
||||
const app = express();
|
||||
const proxy = HttpProxy.createProxyServer({
|
||||
target: 'http://localhost:11000',
|
||||
// Timeout can be changed to your liking.
|
||||
timeout: 1000 * 60 * 3,
|
||||
proxyTimeout: 1000 * 60 * 3,
|
||||
// Not 100% certain whether autoRewrite is necessary, but enabling it SEEMS to make it behave more stably.
|
||||
autoRewrite: true,
|
||||
// Do not enable followRedirects.
|
||||
followRedirects: false,
|
||||
});
|
||||
|
||||
// Handle errors with proxy.web and proxy.ws
|
||||
function onProxyError(err, req, res, target) {
|
||||
// Handle errors however you like. Here's an example:
|
||||
if (err.code === 'ECONNREFUSED') {
|
||||
return res.status(503).send('Nextcloud server is currently not running. It may be down for temporary maintenance.');
|
||||
}
|
||||
// other errors
|
||||
else {
|
||||
console.error(err);
|
||||
return res.status(500).send(String(err));
|
||||
}
|
||||
}
|
||||
|
||||
app.use((req, res) => {
|
||||
proxy.web(req, res, {}, onProxyError);
|
||||
});
|
||||
|
||||
const httpServer = http.createServer(app);
|
||||
httpServer.listen('80');
|
||||
|
||||
// Listen for an upgrade to a WebSocket connection.
|
||||
httpServer.on('upgrade', (req, socket, head) => {
|
||||
proxy.ws(req, socket, head, {}, onProxyError);
|
||||
});
|
||||
```
|
||||
|
||||
If you are using the Express package `vhost` for your app, you can use `proxy.web` inside the vhosted express function (see the following code snippet), but `proxy.ws` still needs to be done "globally" on your http server. Nextcloud should automatically ignore websocket requests for other domains.
|
||||
|
||||
```js
|
||||
const HttpProxy = require('http-proxy');
|
||||
const express = require('express');
|
||||
const http = require('http');
|
||||
|
||||
const myNextcloudApp = express();
|
||||
const myOtherApp = express();
|
||||
const vhost = express();
|
||||
|
||||
// Definitions for proxy and onProxyError unchanged. (see above)
|
||||
|
||||
myNextcloudApp.use((req, res) => {
|
||||
proxy.web(req, res, {}, onProxyError);
|
||||
});
|
||||
|
||||
vhost.use(vhostFunc('<your-nextcloud-domain>', myNextcloudApp));
|
||||
|
||||
const httpServer = http.createServer(app);
|
||||
httpServer.listen('80');
|
||||
|
||||
// Listen for an upgrade to a WebSocket connection.
|
||||
httpServer.on('upgrade', (req, socket, head) => {
|
||||
proxy.ws(req, socket, head, {}, onProxyError);
|
||||
});
|
||||
```
|
||||
|
||||
Of course you need to modify `<your-nc-domain>` to the domain on which you want to run Nextcloud. Also make sure to adjust the port 11000 to match the chosen `APACHE_PORT`.
|
||||
**Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` option (or `network_mode: host` for docker-compose) when starting the reverse proxy container in order to connect the reverse proxy container to the host network. ***If that is not an option or not possible for you (like e.g. on Windows or if the reverse proxy is running on a different host), you can alternatively instead of `localhost` use the private ip-address of the host that is running the docker daemon. If you are not sure how to retrieve that, you can run: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'`. If the command returns a public ip-address, use `ip a | grep "scope global" | grep docker0 | awk '{print $2}' | sed 's|/.*||'` instead (the commands only work on Linux)***
|
||||
|
||||
</details>
|
||||
|
||||
### Synology Reverse Proxy
|
||||
|
||||
<details>
|
||||
@@ -451,7 +549,7 @@ Of course you need to modify `<your-nextcloud-domain>` in the `nextcloud.yml` to
|
||||
|
||||
**Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` option (or `network_mode: host` for docker-compose) when starting the reverse proxy container in order to connect the reverse proxy container to the host network. ***If that is not an option or not possible for you (like e.g. on Windows or if the reverse proxy is running on a different host), you can alternatively instead of `localhost` use the private ip-address of the host that is running the docker daemon. If you are not sure how to retrieve that, you can run: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'`. If the command returns a public ip-address, use `ip a | grep "scope global" | grep docker0 | awk '{print $2}' | sed 's|/.*||'` instead (the commands only work on Linux)***
|
||||
|
||||
**Hint:** Possibly the following link is useful to understand how AIO configures things: https://github.com/nextcloud/all-in-one/blob/main/manual-install/latest.yml
|
||||
**Hint**: see https://www.youtube.com/watch?v=VLPSRrLMDmA for a video on configuring Traefik.
|
||||
|
||||
</details>
|
||||
|
||||
@@ -548,7 +646,7 @@ Afterwards should the AIO interface be accessible via `https://ip.address.of.the
|
||||
## 6. How to debug things?
|
||||
If something does not work, follow the steps below:
|
||||
1. Make sure to exactly follow the whole reverse proxy documentation step-for-step from top to bottom!
|
||||
1. Make sure that you used the docker run command that is described in this reverse proxy documentation.
|
||||
1. Make sure that you used the docker run command that is described in this reverse proxy documentation. Hint: make sure that you have set the APACHE_PORT during the docker run command!
|
||||
1. Make sure to set the `APACHE_IP_BINDING` variable correctly. If in doubt, set it to `--env APACHE_IP_BINDING=0.0.0.0`
|
||||
1. Make sure that all ports match the chosen `APACHE_PORT`.
|
||||
1. Make sure that the reverse proxy is running on the host OS or if running in a container, connected to the host network. If that is not possible (e.g. on Windows or if the reverse proxy is running on a different host), substitute `localhost` or `127.0.0.1` in the default configurations by the private ip-address of the host that is running the docker daemon. If you are not sure how to retrieve that, you can run: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'`. If the command returns a public ip-address, use `ip a | grep "scope global" | grep docker0 | awk '{print $2}' | sed 's|/.*||'` instead (the commands only work on Linux)
|
||||
|
||||
Reference in New Issue
Block a user