mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-21 19:00:33 +00:00
Compare commits
240 Commits
copilot/fi
...
watchtower
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23dc60aa9d | ||
|
|
5a474d92d9 | ||
|
|
795baf903b | ||
|
|
b4c0266461 | ||
|
|
3a988938b2 | ||
|
|
7c0df4f701 | ||
|
|
1d27e165e6 | ||
|
|
a75d1c48bf | ||
|
|
74b98b369e | ||
|
|
74dee77fac | ||
|
|
70100ba5ef | ||
|
|
de72608519 | ||
|
|
02c9a7475b | ||
|
|
c2e48d3524 | ||
|
|
b615acf413 | ||
|
|
379b3d9e5a | ||
|
|
abbe6a85cf | ||
|
|
20835baa0c | ||
|
|
a32568cc9c | ||
|
|
c6748dc450 | ||
|
|
6288665170 | ||
|
|
a3d84cce7b | ||
|
|
535a0ffbd2 | ||
|
|
1d947355ab | ||
|
|
fdfd479db7 | ||
|
|
d4da301c9a | ||
|
|
4c0b28f70d | ||
|
|
34429865fe | ||
|
|
aa115110d5 | ||
|
|
01365c817f | ||
|
|
774bd38f79 | ||
|
|
82fc4635a2 | ||
|
|
e8b9e25cf8 | ||
|
|
d6a06f9e79 | ||
|
|
8e19b7165d | ||
|
|
7ae8f729fb | ||
|
|
e6c340779f | ||
|
|
e9a2076a9c | ||
|
|
a571faa4a5 | ||
|
|
cdda9ea637 | ||
|
|
dca9c6b2e2 | ||
|
|
af7c1d02fd | ||
|
|
1a70a9e9fd | ||
|
|
0837266f86 | ||
|
|
ea9eca44c2 | ||
|
|
3fc84ee784 | ||
|
|
bf445e699f | ||
|
|
a03df48865 | ||
|
|
cbea0730d3 | ||
|
|
6c33a96980 | ||
|
|
6a07493f4d | ||
|
|
e510e14550 | ||
|
|
1c5169c9e4 | ||
|
|
b0c00866d4 | ||
|
|
ba48b8134f | ||
|
|
0a553459ab | ||
|
|
f42e669704 | ||
|
|
483d562b20 | ||
|
|
5a77d4e842 | ||
|
|
c5b853e50b | ||
|
|
2a757d3d66 | ||
|
|
19b94f40d5 | ||
|
|
33f40632dd | ||
|
|
574a408d10 | ||
|
|
79dd1286e9 | ||
|
|
96002b185d | ||
|
|
3828b1ae3d | ||
|
|
cdad9614cd | ||
|
|
c55ae87002 | ||
|
|
3021f256ce | ||
|
|
124a6d295b | ||
|
|
0c6c1caa90 | ||
|
|
889096ab2b | ||
|
|
cf2fb5f58d | ||
|
|
76c03d11f0 | ||
|
|
1bc3896314 | ||
|
|
d86ff57d2f | ||
|
|
a93e9ff0c6 | ||
|
|
b25b0e1075 | ||
|
|
e4d92bdea6 | ||
|
|
d9332ef966 | ||
|
|
9d53188df3 | ||
|
|
acb18004de | ||
|
|
70a0a4a361 | ||
|
|
aa7ff451b8 | ||
|
|
5eb6850d92 | ||
|
|
78b4bea957 | ||
|
|
0af08104f5 | ||
|
|
df14efa1ef | ||
|
|
f5d35f0197 | ||
|
|
901cd8ccef | ||
|
|
9ed2b32d3e | ||
|
|
5c1d85b27d | ||
|
|
55a4ffab63 | ||
|
|
846bc06bc5 | ||
|
|
441a2a28e3 | ||
|
|
df9971b249 | ||
|
|
15ae285d9f | ||
|
|
1fa4f3b6a3 | ||
|
|
654c39ff1e | ||
|
|
91d59af4dc | ||
|
|
5091f27e87 | ||
|
|
c74d08902e | ||
|
|
216c73d3aa | ||
|
|
6c1c33e069 | ||
|
|
f0949a8746 | ||
|
|
79eccd576d | ||
|
|
323a34a437 | ||
|
|
f2076fa56b | ||
|
|
5bb2778fb7 | ||
|
|
3b3c8ba25c | ||
|
|
0be797a531 | ||
|
|
490a1811c8 | ||
|
|
99ea91c5ef | ||
|
|
7b2de0683e | ||
|
|
f7b677fb51 | ||
|
|
ee8a5a185c | ||
|
|
2b0cb13f35 | ||
|
|
1e064fed8a | ||
|
|
a1eaea85ed | ||
|
|
bc2105d668 | ||
|
|
c545bffc53 | ||
|
|
dc27f8078f | ||
|
|
9f9846461e | ||
|
|
8e3141ab75 | ||
|
|
f060a334d3 | ||
|
|
4417d1ca7a | ||
|
|
cdc617d0b7 | ||
|
|
71dbf98d48 | ||
|
|
42e2d88b3e | ||
|
|
4682355bfe | ||
|
|
13ac536b68 | ||
|
|
9b9b3b638d | ||
|
|
7b6bda1f60 | ||
|
|
764314524d | ||
|
|
4910c3f012 | ||
|
|
55790da3eb | ||
|
|
035e270245 | ||
|
|
4e8292b922 | ||
|
|
50643afd6a | ||
|
|
4f4ef8f1d6 | ||
|
|
4acc5b87e3 | ||
|
|
753ea8d3fd | ||
|
|
dbda18b67d | ||
|
|
461f9e14c1 | ||
|
|
457a0d9fef | ||
|
|
ffd9dd2da8 | ||
|
|
2bc3c4e7ec | ||
|
|
46eb2dfc7d | ||
|
|
0dd6ab3f2c | ||
|
|
119f68b6ee | ||
|
|
cd2d06fca6 | ||
|
|
6c3403d95d | ||
|
|
8b40127b0e | ||
|
|
8d77f3340a | ||
|
|
dac2ccd195 | ||
|
|
c7d980e7bc | ||
|
|
024e404c8d | ||
|
|
aa831bc8a5 | ||
|
|
8727df147d | ||
|
|
a747ab1c5e | ||
|
|
f28d94c30c | ||
|
|
6dc1cd6ebd | ||
|
|
1f813aacc3 | ||
|
|
670e38969c | ||
|
|
ae5a21eadf | ||
|
|
d772c14f55 | ||
|
|
172c72f735 | ||
|
|
39f30a6609 | ||
|
|
5cf4580a86 | ||
|
|
47307b37f8 | ||
|
|
da88c7d25b | ||
|
|
f113f2c155 | ||
|
|
f1dacad6b3 | ||
|
|
30cb79bb62 | ||
|
|
f80f888d6c | ||
|
|
95f70d2082 | ||
|
|
d69939f010 | ||
|
|
ab167fe665 | ||
|
|
02eae0f5ed | ||
|
|
60231f09eb | ||
|
|
38996ddb29 | ||
|
|
e30742904e | ||
|
|
6185478b21 | ||
|
|
d1a677909e | ||
|
|
14c4ff7809 | ||
|
|
d837898ade | ||
|
|
2c0461d223 | ||
|
|
498c4bda12 | ||
|
|
81878f669e | ||
|
|
49234b77fe | ||
|
|
07bd520b77 | ||
|
|
995b5cc27a | ||
|
|
d8aa83f4e0 | ||
|
|
74ec1b6baa | ||
|
|
c20bae5a0f | ||
|
|
e76ccf4f3c | ||
|
|
14dc5b7729 | ||
|
|
d46b222c4e | ||
|
|
5e0ee16b9e | ||
|
|
fadbdc5c78 | ||
|
|
f8274028ea | ||
|
|
e05bdaeca0 | ||
|
|
7699ac9c12 | ||
|
|
84d8d78106 | ||
|
|
546474346f | ||
|
|
54ca36ec46 | ||
|
|
8a5440134b | ||
|
|
177c093dd9 | ||
|
|
2eee2eac53 | ||
|
|
7bf5b18d5e | ||
|
|
9d33eb29d2 | ||
|
|
b2e02da46b | ||
|
|
954f250ac8 | ||
|
|
0cea791a64 | ||
|
|
49afd85adc | ||
|
|
9f6b0c2fe9 | ||
|
|
8de44cf6aa | ||
|
|
45a1cd73b6 | ||
|
|
304dc97ad6 | ||
|
|
0af87295a6 | ||
|
|
b71408af98 | ||
|
|
d6e4b83c51 | ||
|
|
563a047a9a | ||
|
|
7c40f57f36 | ||
|
|
f91d26115b | ||
|
|
180ea67cbb | ||
|
|
ce2b4c6b87 | ||
|
|
953a5fdf1e | ||
|
|
bce78168e4 | ||
|
|
7031310257 | ||
|
|
301f42d2a0 | ||
|
|
5fe6adc62a | ||
|
|
5c016d5d35 | ||
|
|
fed44e0010 | ||
|
|
47733776b9 | ||
|
|
44148ba4a3 | ||
|
|
f99a59fb58 | ||
|
|
a79f637251 | ||
|
|
640b5b7d6d |
20
.editorconfig
Normal file
20
.editorconfig
Normal file
@@ -0,0 +1,20 @@
|
||||
# https://editorconfig.org
|
||||
|
||||
# Tip: to find files violating the rules set out here, run `docker run --rm --volume=$PWD:/check mstruebing/editorconfig-checker`
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 2
|
||||
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
2
.github/workflows/fail-on-prerelease.yml
vendored
2
.github/workflows/fail-on-prerelease.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Check latest published release isn't a prerelease"
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v6
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v6
|
||||
with:
|
||||
script: |
|
||||
const tags = await github.rest.repos.listTags({
|
||||
|
||||
7
.github/workflows/helm-release.yml
vendored
7
.github/workflows/helm-release.yml
vendored
@@ -10,13 +10,16 @@ on:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
# Do not run this workflow on forked repositories, as they might not have the `gh-pages` branch created, or might
|
||||
# want to use it for other purposes than publishing helm charts
|
||||
if: github.repository == 'nextcloud/all-in-one'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Turnstyle
|
||||
uses: softprops/turnstyle@e565d2d86403c5d23533937e95980570545e5586 # v2
|
||||
uses: softprops/turnstyle@e15e934b3f69ee283ba389ea05c8886baa656d93 # v2
|
||||
with:
|
||||
continue-after-seconds: 180
|
||||
env:
|
||||
@@ -32,7 +35,7 @@ jobs:
|
||||
|
||||
# See https://github.com/helm/chart-releaser-action/issues/6
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
|
||||
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
|
||||
with:
|
||||
version: v3.6.3
|
||||
|
||||
|
||||
2
.github/workflows/lint-helm.yml
vendored
2
.github/workflows/lint-helm.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
|
||||
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
|
||||
with:
|
||||
version: v3.11.1
|
||||
|
||||
|
||||
2
.github/workflows/lint-yaml.yml
vendored
2
.github/workflows/lint-yaml.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
line-length: warning
|
||||
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
|
||||
- name: Check GitHub actions
|
||||
run: uvx zizmor --min-severity medium .github/workflows/*.yml
|
||||
|
||||
8
.github/workflows/playwright-on-push.yml
vendored
8
.github/workflows/playwright-on-push.yml
vendored
@@ -5,12 +5,14 @@ on:
|
||||
paths:
|
||||
- 'php/**'
|
||||
- 'Containers/mastercontainer/*.Caddyfile'
|
||||
- 'Containers/mastercontainer/start.sh'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'php/**'
|
||||
- 'Containers/mastercontainer/*.Caddyfile'
|
||||
- 'Containers/mastercontainer/start.sh'
|
||||
|
||||
concurrency:
|
||||
group: playwright-${{ github.head_ref || github.run_id }}
|
||||
@@ -28,7 +30,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||
with:
|
||||
node-version: lts/*
|
||||
|
||||
@@ -55,7 +57,7 @@ jobs:
|
||||
rm -r ./session
|
||||
composer install --no-dev
|
||||
composer clear-cache
|
||||
sudo chmod 777 -R ./
|
||||
sudo chmod 777 -R ../
|
||||
|
||||
- name: Start fresh development server
|
||||
run: |
|
||||
@@ -72,6 +74,7 @@ jobs:
|
||||
--volume ./php:/var/www/docker-aio/php \
|
||||
--volume ./Containers/mastercontainer/internal.Caddyfile:/internal.Caddyfile \
|
||||
--volume ./Containers/mastercontainer/headers.Caddyfile:/headers.Caddyfile \
|
||||
--volume ./Containers/mastercontainer/start.sh:/start.sh \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||
--env SKIP_DOMAIN_VALIDATION=true \
|
||||
--env APACHE_PORT=11000 \
|
||||
@@ -103,6 +106,7 @@ jobs:
|
||||
--volume ./php:/var/www/docker-aio/php \
|
||||
--volume ./Containers/mastercontainer/internal.Caddyfile:/internal.Caddyfile \
|
||||
--volume ./Containers/mastercontainer/headers.Caddyfile:/headers.Caddyfile \
|
||||
--volume ./Containers/mastercontainer/start.sh:/start.sh \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||
--env SKIP_DOMAIN_VALIDATION=false \
|
||||
--env APACHE_PORT=11000 \
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||
with:
|
||||
node-version: lts/*
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
FROM caddy:2.11.2-alpine AS caddy
|
||||
FROM caddy:2.11.3-alpine AS caddy
|
||||
|
||||
# From https://github.com/docker-library/httpd/blob/master/2.4/alpine/Dockerfile
|
||||
FROM httpd:2.4.66-alpine3.23
|
||||
FROM httpd:2.4.67-alpine3.23
|
||||
|
||||
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
nc -z "$NEXTCLOUD_HOST" 9000 || exit 0
|
||||
nc -z 127.0.0.1 8000 || exit 1
|
||||
nc -z 127.0.0.1 "$APACHE_PORT" || exit 1
|
||||
|
||||
@@ -7,35 +7,7 @@ Listen 8000
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
|
||||
ErrorLog /proc/self/fd/2
|
||||
ErrorLogFormat "[%t] [%l] [%E] [client: %{X-Forwarded-For}i] [%M] [%{User-Agent}i]"
|
||||
LogLevel warn
|
||||
|
||||
# KeepAlive On: allow the same TCP connection to carry multiple HTTP requests.
|
||||
# Without this each asset (JS, CSS, image) would require a full TCP handshake,
|
||||
# which is especially expensive on TLS connections and noticeably slows down
|
||||
# Nextcloud's login page and file manager that load dozens of resources at once.
|
||||
KeepAlive On
|
||||
# KeepAliveTimeout: close an idle keep-alive connection after 5 seconds.
|
||||
# A short timeout frees Apache worker threads quickly so they are available
|
||||
# for new requests; 5 s is long enough to cover the gap between requests
|
||||
# that a browser issues while rendering a page (typically < 1 s), yet short
|
||||
# enough to avoid holding threads open for idle or slow clients.
|
||||
KeepAliveTimeout 5
|
||||
# MaxKeepAliveRequests: allow at most 500 requests per persistent connection.
|
||||
# 100 (the Apache default) is too low for Nextcloud: the desktop and mobile
|
||||
# sync clients issue many small API calls (PROPFIND, GET, PUT, checksums …)
|
||||
# per sync cycle and routinely exceed 100 requests on a single connection.
|
||||
# Hitting the limit forces a new TCP/TLS handshake, adding latency and CPU
|
||||
# overhead. 500 gives sync clients enough headroom while still periodically
|
||||
# recycling threads to contain per-process memory growth.
|
||||
MaxKeepAliveRequests 500
|
||||
|
||||
# sendfile(2) is disabled because it bypasses Apache's output-filter chain: with
|
||||
# it enabled, mod_brotli is silently skipped for static files (JS, CSS, SVG),
|
||||
# negating the compression configured below. MMAP is also
|
||||
# disabled because files can be replaced by Nextcloud at any time and mmap'd
|
||||
# pages could serve stale data.
|
||||
EnableSendfile Off
|
||||
EnableMMAP Off
|
||||
LogLevel ${AIO_LOG_LEVEL}
|
||||
|
||||
# PHP match
|
||||
<FilesMatch "\.php$">
|
||||
@@ -45,17 +17,12 @@ Listen 8000
|
||||
<Proxy "fcgi://${NEXTCLOUD_HOST}:9000" flushpackets=on>
|
||||
</Proxy>
|
||||
|
||||
# Compress JS, CSS and SVG responses with Brotli (quality 4 gives good
|
||||
# compression with reasonable CPU cost; the default of 0 barely compresses).
|
||||
# Compress JS, CSS and SVG responses with Brotli.
|
||||
# Other plain-text files are already compressed by Nextcloud itself.
|
||||
# No deflate fallback is needed: every browser that Nextcloud supports
|
||||
# (Chrome 49+, Firefox 44+, Safari 11+, Edge 15+ — all from 2016-2017)
|
||||
# supports Brotli. Internet Explorer, the only browser that never gained
|
||||
# Brotli support, was dropped by Nextcloud with NC15 (2019).
|
||||
# Desktop and mobile sync clients never request JS/CSS/SVG assets.
|
||||
<IfModule mod_brotli.c>
|
||||
AddOutputFilterByType BROTLI_COMPRESS text/javascript application/javascript application/x-javascript text/css image/svg+xml
|
||||
BrotliCompressionQuality 4
|
||||
BrotliCompressionQuality 0
|
||||
</IfModule>
|
||||
|
||||
# Nextcloud dir
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -z "$NC_DOMAIN" ]; then
|
||||
echo "NC_DOMAIN and NEXTCLOUD_HOST need to be provided. Exiting!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
export SUPERVISORD_STDOUT=/dev/stdout
|
||||
else
|
||||
export SUPERVISORD_STDOUT=NONE
|
||||
fi
|
||||
|
||||
# Need write access to /mnt/data
|
||||
if ! [ -w /mnt/data ]; then
|
||||
echo "Cannot write to /mnt/data"
|
||||
|
||||
@@ -5,14 +5,14 @@ pidfile=/var/run/supervisord/supervisord.pid
|
||||
childlogdir=/var/log/supervisord/
|
||||
logfile_maxbytes=50MB
|
||||
logfile_backups=10
|
||||
loglevel=error
|
||||
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
||||
|
||||
[program:apache]
|
||||
# Stdout logging is disabled as otherwise the logs are spammed
|
||||
stdout_logfile=NONE
|
||||
stdout_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
command=apachectl -DFOREGROUND
|
||||
command=httpd -DFOREGROUND
|
||||
|
||||
[program:caddy]
|
||||
stdout_logfile=/dev/stdout
|
||||
|
||||
@@ -31,4 +31,5 @@ LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||
org.opencontainers.image.source="https://github.com/nextcloud/all-in-one" \
|
||||
org.opencontainers.image.vendor="Nextcloud" \
|
||||
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md"
|
||||
ENV BORG_RETENTION_POLICY="--keep-within=7d --keep-weekly=4 --keep-monthly=6"
|
||||
ENV BORG_RETENTION_POLICY="--keep-within=7d --keep-weekly=4 --keep-monthly=6" \
|
||||
AIO_LOG_LEVEL="warn"
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Functions
|
||||
get_start_time(){
|
||||
START_TIME=$(date +%s)
|
||||
@@ -40,7 +44,7 @@ if [ -z "$BORG_REMOTE_REPO" ] && ! mountpoint -q "$MOUNT_DIR"; then
|
||||
fi
|
||||
|
||||
# Check if repo is uninitialized
|
||||
if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != test ] && ! borg info > /dev/null; then
|
||||
if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != test ] && ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
||||
if [ -n "$BORG_REMOTE_REPO" ]; then
|
||||
echo "The repository is uninitialized or cannot connect to remote. Cannot perform check or restore."
|
||||
else
|
||||
@@ -123,7 +127,7 @@ if [ "$BORG_MODE" = backup ]; then
|
||||
fi
|
||||
|
||||
# Initialize the repository if can't get info from target
|
||||
if ! borg info > /dev/null; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
||||
# Don't initialize if already initialized
|
||||
if [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" ]; then
|
||||
if [ -n "$BORG_REMOTE_REPO" ]; then
|
||||
@@ -140,14 +144,14 @@ if [ "$BORG_MODE" = backup ]; then
|
||||
|
||||
echo "Initializing repository..."
|
||||
NEW_REPOSITORY=1
|
||||
if ! borg init --debug --encryption=repokey-blake2; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" init --encryption=repokey-blake2; then
|
||||
echo "Could not initialize borg repository."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BORG_REMOTE_REPO" ]; then
|
||||
# borg config only works for local repos; it's up to the remote to ensure the disk isn't full
|
||||
borg config :: additional_free_space 2G
|
||||
borg "$BORG_LOG_LEVEL_FLAG" config :: additional_free_space 2G
|
||||
|
||||
# Fix too large Borg cache
|
||||
# https://borgbackup.readthedocs.io/en/stable/faq.html#the-borg-cache-eats-way-too-much-disk-space-what-can-i-do
|
||||
@@ -156,7 +160,7 @@ if [ "$BORG_MODE" = backup ]; then
|
||||
touch "/root/.cache/borg/$BORG_ID/chunks.archive.d"
|
||||
fi
|
||||
|
||||
if ! borg info > /dev/null; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
||||
echo "Borg can't get info from the repo it created. Something is wrong."
|
||||
exit 1
|
||||
fi
|
||||
@@ -216,9 +220,9 @@ if [ "$BORG_MODE" = backup ]; then
|
||||
# Create the backup
|
||||
echo "Starting the backup..."
|
||||
get_start_time
|
||||
if ! borg create "${BORG_OPTS[@]}" "${BORG_INCLUDE[@]}" "${BORG_EXCLUDE[@]}" "::$CURRENT_DATE-nextcloud-aio" "/nextcloud_aio_volumes/" --exclude-from /borg_excludes; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" create "${BORG_OPTS[@]}" "${BORG_INCLUDE[@]}" "${BORG_EXCLUDE[@]}" "::$CURRENT_DATE-nextcloud-aio" "/nextcloud_aio_volumes/" --exclude-from /borg_excludes; then
|
||||
echo "Deleting the failed backup archive..."
|
||||
borg delete --stats "::$CURRENT_DATE-nextcloud-aio"
|
||||
borg "$BORG_LOG_LEVEL_FLAG" delete --stats "::$CURRENT_DATE-nextcloud-aio"
|
||||
echo "Backup failed!"
|
||||
echo "You might want to check the backup integrity via the AIO interface."
|
||||
if [ "$NEW_REPOSITORY" = 1 ]; then
|
||||
@@ -237,14 +241,14 @@ if [ "$BORG_MODE" = backup ]; then
|
||||
|
||||
# Prune archives
|
||||
echo "Pruning the archives..."
|
||||
if ! borg prune --stats --glob-archives '*_*-nextcloud-aio' "${BORG_PRUNE_OPTS[@]}"; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" prune --stats --glob-archives '*_*-nextcloud-aio' "${BORG_PRUNE_OPTS[@]}"; then
|
||||
echo "Failed to prune archives!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Compact archives
|
||||
echo "Compacting the archives..."
|
||||
if ! borg compact; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" compact; then
|
||||
echo "Failed to compact archives!"
|
||||
exit 1
|
||||
fi
|
||||
@@ -261,19 +265,19 @@ if [ "$BORG_MODE" = backup ]; then
|
||||
fi
|
||||
done
|
||||
echo "Starting the backup for additional volumes..."
|
||||
if ! borg create "${BORG_OPTS[@]}" "::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" create "${BORG_OPTS[@]}" "::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then
|
||||
echo "Deleting the failed backup archive..."
|
||||
borg delete --stats "::$CURRENT_DATE-additional-docker-volumes"
|
||||
borg "$BORG_LOG_LEVEL_FLAG" delete --stats "::$CURRENT_DATE-additional-docker-volumes"
|
||||
echo "Backup of additional docker-volumes failed!"
|
||||
exit 1
|
||||
fi
|
||||
echo "Pruning additional volumes..."
|
||||
if ! borg prune --stats --glob-archives '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" prune --stats --glob-archives '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then
|
||||
echo "Failed to prune additional docker-volumes archives!"
|
||||
exit 1
|
||||
fi
|
||||
echo "Compacting additional volumes..."
|
||||
if ! borg compact; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" compact; then
|
||||
echo "Failed to compact additional docker-volume archives!"
|
||||
exit 1
|
||||
fi
|
||||
@@ -291,19 +295,19 @@ if [ "$BORG_MODE" = backup ]; then
|
||||
EXCLUDE_DIRS+=(--exclude "/host_mounts/$directory/")
|
||||
done
|
||||
echo "Starting the backup for additional host mounts..."
|
||||
if ! borg create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then
|
||||
echo "Deleting the failed backup archive..."
|
||||
borg delete --stats "::$CURRENT_DATE-additional-host-mounts"
|
||||
borg "$BORG_LOG_LEVEL_FLAG" delete --stats "::$CURRENT_DATE-additional-host-mounts"
|
||||
echo "Backup of additional host-mounts failed!"
|
||||
exit 1
|
||||
fi
|
||||
echo "Pruning additional host mounts..."
|
||||
if ! borg prune --stats --glob-archives '*_*-additional-host-mounts' "${BORG_PRUNE_OPTS[@]}"; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" prune --stats --glob-archives '*_*-additional-host-mounts' "${BORG_PRUNE_OPTS[@]}"; then
|
||||
echo "Failed to prune additional host-mount archives!"
|
||||
exit 1
|
||||
fi
|
||||
echo "Compacting additional host mounts..."
|
||||
if ! borg compact; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" compact; then
|
||||
echo "Failed to compact additional host-mount archives!"
|
||||
exit 1
|
||||
fi
|
||||
@@ -385,7 +389,7 @@ if [ "$BORG_MODE" = restore ]; then
|
||||
|
||||
if [ -z "$BORG_REMOTE_REPO" ]; then
|
||||
mkdir -p /tmp/borg
|
||||
if ! borg mount "::$SELECTED_ARCHIVE" /tmp/borg; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" mount "::$SELECTED_ARCHIVE" /tmp/borg; then
|
||||
echo "Could not mount the backup!"
|
||||
exit 1
|
||||
fi
|
||||
@@ -432,7 +436,7 @@ if [ "$BORG_MODE" = restore ]; then
|
||||
#
|
||||
# Older backups may still contain files we've since excluded, so we have to exclude on extract as well.
|
||||
cd / # borg extract has no destination arg and extracts to CWD
|
||||
if ! borg extract "::$SELECTED_ARCHIVE" --progress --exclude-from /borg_excludes "${ADDITIONAL_BORG_EXCLUDES[@]}" --pattern '+nextcloud_aio_volumes/**'
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" extract "::$SELECTED_ARCHIVE" --progress --exclude-from /borg_excludes "${ADDITIONAL_BORG_EXCLUDES[@]}" --pattern '+nextcloud_aio_volumes/**'
|
||||
then
|
||||
RESTORE_FAILED=1
|
||||
echo "Failed to extract backup archive."
|
||||
@@ -464,7 +468,7 @@ if [ "$BORG_MODE" = restore ]; then
|
||||
\) \
|
||||
| LC_ALL=C sort \
|
||||
| LC_ALL=C comm -23 - \
|
||||
<(borg list "::$SELECTED_ARCHIVE" --short --exclude-from /borg_excludes --pattern '+nextcloud_aio_volumes/**' | LC_ALL=C sort) \
|
||||
<(borg "$BORG_LOG_LEVEL_FLAG" list "::$SELECTED_ARCHIVE" --short --exclude-from /borg_excludes --pattern '+nextcloud_aio_volumes/**' | LC_ALL=C sort) \
|
||||
> /tmp/local_files_not_in_backup
|
||||
then
|
||||
RESTORE_FAILED=1
|
||||
@@ -552,7 +556,7 @@ if [ "$BORG_MODE" = check ]; then
|
||||
echo "Checking the backup integrity..."
|
||||
|
||||
# Perform the check
|
||||
if ! borg check -v --verify-data; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" check -v --verify-data; then
|
||||
echo "Some errors were found while checking the backup integrity!"
|
||||
echo "Check the AIO interface for advice on how to proceed now!"
|
||||
exit 1
|
||||
@@ -570,7 +574,7 @@ if [ "$BORG_MODE" = "check-repair" ]; then
|
||||
echo "Checking the backup integrity and repairing it..."
|
||||
|
||||
# Perform the check-repair
|
||||
if ! echo YES | borg check -v --repair; then
|
||||
if ! echo YES | borg "$BORG_LOG_LEVEL_FLAG" check -v --repair; then
|
||||
echo "Some errors were found while checking and repairing the backup integrity!"
|
||||
exit 1
|
||||
fi
|
||||
@@ -584,7 +588,7 @@ fi
|
||||
# Do the backup test
|
||||
if [ "$BORG_MODE" = test ]; then
|
||||
if [ -n "$BORG_REMOTE_REPO" ]; then
|
||||
if ! borg info > /dev/null; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
||||
echo "Borg could not get info from the remote repo."
|
||||
echo "See the above borg info output for details."
|
||||
exit 1
|
||||
@@ -605,12 +609,12 @@ if [ "$BORG_MODE" = test ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! borg list >/dev/null; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" list >/dev/null; then
|
||||
echo "The entered path seems to be valid but could not open the backup archive."
|
||||
echo "Most likely the entered password was wrong so please adjust it accordingly!"
|
||||
exit 1
|
||||
else
|
||||
if ! borg list | grep "nextcloud-aio"; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" list | grep "nextcloud-aio"; then
|
||||
echo "The backup archive does not contain a valid Nextcloud AIO backup."
|
||||
echo "Most likely was the archive not created via Nextcloud AIO."
|
||||
exit 1
|
||||
@@ -623,7 +627,7 @@ fi
|
||||
|
||||
if [ "$BORG_MODE" = list ]; then
|
||||
echo "Updating backup list..."
|
||||
if ! borg info > /dev/null; then
|
||||
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
||||
echo "Could not update the backup list."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = "warn" ]; then
|
||||
BORG_LOG_LEVEL_FLAG="--warning"
|
||||
else
|
||||
BORG_LOG_LEVEL_FLAG="--$AIO_LOG_LEVEL"
|
||||
fi
|
||||
export BORG_LOG_LEVEL_FLAG
|
||||
|
||||
# Variables
|
||||
export MOUNT_DIR="/mnt/borgbackup"
|
||||
export BORG_BACKUP_DIRECTORY="$MOUNT_DIR/borg" # necessary even when remote to store the aio-lockfile
|
||||
@@ -48,7 +59,7 @@ fi
|
||||
rm -f "/nextcloud_aio_volumes/nextcloud_aio_database_dump/backup-is-running"
|
||||
|
||||
# Get a list of all available borg archives
|
||||
if borg list &>/dev/null; then
|
||||
if borg "$BORG_LOG_LEVEL_FLAG" list &>/dev/null; then
|
||||
borg list | grep "nextcloud-aio" | awk -F " " '{print $1","$3,$4}' > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
|
||||
else
|
||||
echo "" > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
|
||||
|
||||
@@ -13,6 +13,15 @@ RUN set -ex; \
|
||||
sed -i "s|#\?PCREMaxFileSize.*|PCREMaxFileSize 2000M|g" /etc/clamav/clamd.conf; \
|
||||
# StreamMaxLength must be synced with av_stream_max_length inside the Nextcloud files_antivirus plugin
|
||||
sed -i "s|#\?StreamMaxLength.*|StreamMaxLength 2000M|g" /etc/clamav/clamd.conf; \
|
||||
# By default clamd keeps the old signature database in RAM while loading the new one,
|
||||
# briefly doubling memory usage (~1 GB extra) during each freshclam update cycle.
|
||||
# Setting ConcurrentDatabaseReload to "no" makes clamd unload the old database first,
|
||||
# eliminating that transient peak and significantly reducing maximum RAM consumption.
|
||||
sed -i "s|#\?ConcurrentDatabaseReload.*|ConcurrentDatabaseReload no|g" /etc/clamav/clamd.conf; \
|
||||
# The default thread pool is 10-12 threads, each reserving its own stack and scan buffers.
|
||||
# The Nextcloud antivirus plugin sends one file at a time, so 2 threads are sufficient
|
||||
# and avoids the idle per-thread memory overhead of the larger default pool.
|
||||
sed -i "s|#\?MaxThreads.*|MaxThreads 2|g" /etc/clamav/clamd.conf; \
|
||||
sed -i "s|#\?TCPSocket|TCPSocket|g" /etc/clamav/clamd.conf; \
|
||||
sed -i "s|^LocalSocket .*|LocalSocket /tmp/clamd.sock|g" /etc/clamav/clamd.conf; \
|
||||
sed -i "s|Example| |g" /etc/clamav/clamav-milter.conf; \
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ "$(echo "PING" | nc 127.0.0.1 3310)" != "PONG" ]; then
|
||||
echo "ERROR: Unable to contact server"
|
||||
exit 1
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Print out clamav version for compliance reasons
|
||||
clamscan --version
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
nodaemon=true
|
||||
logfile=/var/log/supervisord/supervisord.log
|
||||
pidfile=/var/run/supervisord/supervisord.pid
|
||||
childlogdir=/var/log/supervisord/
|
||||
logfile_maxbytes=50MB
|
||||
logfile_backups=10
|
||||
loglevel=error
|
||||
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
||||
|
||||
[program:freshclam]
|
||||
stdout_logfile=/dev/stdout
|
||||
|
||||
@@ -5,6 +5,7 @@ FROM collabora/code:25.04.9.4.1
|
||||
USER root
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||
|
||||
USER 1001
|
||||
@@ -18,3 +19,5 @@ LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||
org.opencontainers.image.source="https://github.com/nextcloud/all-in-one" \
|
||||
org.opencontainers.image.vendor="Nextcloud" \
|
||||
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md"
|
||||
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
|
||||
19
Containers/collabora/start.sh
Normal file
19
Containers/collabora/start.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = "warn" ]; then
|
||||
COLLABORA_LOG_LEVEL="warning"
|
||||
elif [ "$AIO_LOG_LEVEL" = "info" ]; then
|
||||
COLLABORA_LOG_LEVEL="notice"
|
||||
else
|
||||
COLLABORA_LOG_LEVEL="$AIO_LOG_LEVEL"
|
||||
fi
|
||||
|
||||
# Replace the hardcoded log level in extra_params with the translated one
|
||||
extra_params+=" --o:logging.level=$COLLABORA_LOG_LEVEL --o:logging.level_startup=$COLLABORA_LOG_LEVEL"
|
||||
export extra_params
|
||||
|
||||
exec /start-collabora-online.sh "$@"
|
||||
@@ -1,5 +1,5 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
FROM haproxy:3.3.6-alpine
|
||||
FROM haproxy:3.3.10-alpine
|
||||
|
||||
# hadolint ignore=DL3002
|
||||
USER root
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
nc -z "$NEXTCLOUD_HOST" 9001 || exit 0
|
||||
nc -z 127.0.0.1 2375 || exit 1
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Only start container if nextcloud is accessible
|
||||
while ! nc -z "$NEXTCLOUD_HOST" 9001; do
|
||||
echo "Waiting for Nextcloud to start..."
|
||||
@@ -18,6 +22,8 @@ else
|
||||
HAPROXYFILE="$(sed "s# || { src NC_IPV6_PLACEHOLDER }##g" /tmp/haproxy.cfg)"
|
||||
fi
|
||||
echo "$HAPROXYFILE" > /tmp/haproxy.cfg
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
|
||||
haproxy -f /tmp/haproxy.cfg -db
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -z "$INSTANCE_ID" ]; then
|
||||
echo "You need to provide an instance id."
|
||||
exit 1
|
||||
@@ -14,6 +18,20 @@ fi
|
||||
CONF_FILE="$(sed "s|ipv6-placeholder|\[::\]:$APACHE_PORT|" /lighttpd.conf)"
|
||||
echo "$CONF_FILE" > /etc/lighttpd/lighttpd.conf
|
||||
|
||||
# shellcheck disable=SC2235
|
||||
if ([ "$AIO_LOG_LEVEL" = 'debug' ] || [ "$AIO_LOG_LEVEL" = 'info' ]) && ! grep -q debug.log-request-handling /etc/lighttpd/lighttpd.conf; then
|
||||
cat << CONF_FILE >> /etc/lighttpd/lighttpd.conf
|
||||
debug.log-request-handling = "enable"
|
||||
CONF_FILE
|
||||
fi
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ] && ! grep -q debug.log-request-header /etc/lighttpd/lighttpd.conf; then
|
||||
cat << CONF_FILE >> /etc/lighttpd/lighttpd.conf
|
||||
debug.log-request-header = "enable"
|
||||
debug.log-response-header = "enable"
|
||||
CONF_FILE
|
||||
fi
|
||||
|
||||
# Check config file
|
||||
lighttpd -tt -f /etc/lighttpd/lighttpd.conf
|
||||
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
# Probably from here https://github.com/elastic/elasticsearch/blob/main/distribution/docker/src/docker/Dockerfile
|
||||
FROM elasticsearch:8.19.14
|
||||
# Probably from here https://github.com/elastic/dockerfiles/blob/9.3/elasticsearch/Dockerfile
|
||||
FROM elasticsearch:9.4.1
|
||||
|
||||
USER root
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# hadolint ignore=DL3008
|
||||
# hadolint ignore=DL3041
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get upgrade -y; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
microdnf update -y; \
|
||||
microdnf install -y --setopt=tsflags=nodocs \
|
||||
tzdata \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*;
|
||||
microdnf clean all;
|
||||
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||
|
||||
USER 1000:0
|
||||
@@ -30,3 +28,5 @@ LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||
org.opencontainers.image.vendor="Nextcloud" \
|
||||
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md"
|
||||
ENV ES_JAVA_OPTS="-Xms512M -Xmx512M"
|
||||
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
curl -fs "http://127.0.0.1:9200/_cluster/health?filter_path=status" | grep -qE '"status":"(green|yellow)"' || exit 1
|
||||
|
||||
9
Containers/fulltextsearch/start.sh
Normal file
9
Containers/fulltextsearch/start.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
ELASTIC_LOG_LEVEL="$(echo "$AIO_LOG_LEVEL" | tr '[:lower:]' '[:upper:]')"
|
||||
|
||||
exec env "logger.level=$ELASTIC_LOG_LEVEL" /usr/local/bin/docker-entrypoint.sh "$@"
|
||||
@@ -1,5 +1,5 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
FROM golang:1.26.2-alpine3.23 AS go
|
||||
FROM golang:1.26.3-alpine3.23 AS go
|
||||
|
||||
ENV IMAGINARY_HASH=6a274b488759a896aff02f52afee6e50b5e3a3ee
|
||||
|
||||
@@ -33,7 +33,8 @@ COPY --from=go /go/bin/imaginary /usr/local/bin/imaginary
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||
|
||||
ENV PORT=9000
|
||||
ENV PORT=9000 \
|
||||
AIO_LOG_LEVEL=warn
|
||||
|
||||
USER 65534
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
wget -q -O /dev/null "http://127.0.0.1:${PORT}/health" || exit 1
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
nc -z 127.0.0.1 "$PORT" || exit 1
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
GOLANG_LOG="$(case "$AIO_LOG_LEVEL" in
|
||||
debug) printf 'info' ;;
|
||||
info) printf 'info' ;;
|
||||
warn) printf 'warning' ;;
|
||||
error) printf 'error' ;;
|
||||
esac)"
|
||||
export GOLANG_LOG
|
||||
if [ "$AIO_LOG_LEVEL" = "debug" ]; then
|
||||
export DEBUG='*'
|
||||
fi
|
||||
|
||||
echo "Imaginary has started"
|
||||
|
||||
IMAGINARY_ARGS=(-return-size -max-allowed-resolution 222.2)
|
||||
@@ -8,4 +23,4 @@ if [ -n "$IMAGINARY_SECRET" ]; then
|
||||
IMAGINARY_ARGS+=(-key "$IMAGINARY_SECRET")
|
||||
fi
|
||||
|
||||
imaginary "${IMAGINARY_ARGS[@]}" "$@"
|
||||
exec imaginary "${IMAGINARY_ARGS[@]}" "$@"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
# Docker CLI is a requirement
|
||||
FROM docker:29.4.0-cli AS docker
|
||||
FROM docker:29.5.1-cli AS docker
|
||||
|
||||
ARG CADDY_REMOTE_HOST_HASH=b21775afa730ffb52a24ddff310c8a6d1fd37276
|
||||
ARG CADDY_REMOTE_HOST_HASH=e80a9931765a8dbcbb47db415863387f0df0e1b3
|
||||
|
||||
# Caddy is a requirement
|
||||
FROM caddy:2.11.2-builder-alpine AS caddy
|
||||
FROM caddy:2.11.3-builder-alpine AS caddy
|
||||
RUN set -ex; \
|
||||
xcaddy build --with github.com/muety/caddy-remote-host@"$CADDY_REMOTE_HOST_HASH"; \
|
||||
/usr/bin/caddy list-modules
|
||||
|
||||
# From https://github.com/docker-library/php/blob/master/8.5/alpine3.23/fpm/Dockerfile
|
||||
FROM php:8.5.5-fpm-alpine3.23
|
||||
FROM php:8.5.6-fpm-alpine3.23
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 8080
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
restart_process() {
|
||||
echo "Restarting cron.sh because daily backup time was set, changed or unset."
|
||||
pkill cron.sh
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
while true; do
|
||||
if [ -f "/mnt/docker-aio-config/data/daily_backup_time" ]; then
|
||||
set -x
|
||||
@@ -17,7 +21,9 @@ while true; do
|
||||
else
|
||||
export SEND_SUCCESS_NOTIFICATIONS=0
|
||||
fi
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
if [ -f "/mnt/docker-aio-config/data/daily_backup_running" ]; then
|
||||
export LOCK_FILE_PRESENT=1
|
||||
else
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
echo "Daily backup script has started"
|
||||
|
||||
# Check if initial configuration has been done, otherwise this script should do nothing.
|
||||
|
||||
@@ -18,12 +18,12 @@ header {
|
||||
Referrer-Policy "no-referrer" # Tells the browser to never sent a Referer header. See https://developer.mozilla.org/de/docs/Web/HTTP/Reference/Headers/Referrer-Policy
|
||||
X-Robots-Tag "noindex, nofollow" # Tells web crawlers to not index this page. See https://developer.mozilla.org/de/docs/Web/HTTP/Reference/Headers/X-Robots-Tag
|
||||
Origin-Agent-Cluster "?1" # Isolates AIO from other same site pages. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Origin-Agent-Cluster
|
||||
Cross-Origin-Opener-Policy "same-origin"; # AIO does not use any popup, still we can isolate its BCG if it is opened as a pop up by another page. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cross-Origin-Opener-Policy
|
||||
Cross-Origin-Embedder-Policy "require-corp"; # Harder rules for cross origin embeds. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cross-Origin-Embedder-Policy
|
||||
Cross-Origin-Resource-Policy "same-origin"; # Only allow the same origin to load resources. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cross-Origin_Resource_Policy
|
||||
Cross-Origin-Opener-Policy "same-origin" # AIO does not use any popup, still we can isolate its BCG if it is opened as a pop up by another page. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cross-Origin-Opener-Policy
|
||||
Cross-Origin-Embedder-Policy "require-corp" # Harder rules for cross origin embeds. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cross-Origin-Embedder-Policy
|
||||
Cross-Origin-Resource-Policy "same-origin" # Only allow the same origin to load resources. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cross-Origin_Resource_Policy
|
||||
|
||||
# Permissions-Policy disables browser features that AIO does not use. Since there is no "deny all" option, all known features need to be listed explicitly. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Permissions-Policy
|
||||
Permissions-Policy "accelerometer=(), ambient-light-sensor=(), aria-notify=(), attribution-reporting=(), autoplay=(), battery=(), bluetooth=(), browsing-topics=(), camera=(), captured-surface-control=(), ch-ua-high-entropy-values=(), compute-pressure=(), cross-origin-isolated=(), deferred-fetch=(), deferred-fetch-minimal=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), language-detector=(), local-fonts=(), magnetometer=(), microphone=(), midi=(), on-device-speech-recognition=(), otp-credentials=(), payment=(), picture-in-picture=(), private-state-token-issuance=(), private-state-token-redemption=(), publickey-credentials-create=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), speaker-selection=(), storage-access=(), summarizer=(), translator=(), usb=(), web-share=(), window-management=(), xr-spatial-tracking=()"
|
||||
Permissions-Policy "accelerometer=(), ambient-light-sensor=(), aria-notify=(), attribution-reporting=(), autoplay=(), bluetooth=(), browsing-topics=(), camera=(), captured-surface-control=(), ch-ua-high-entropy-values=(), compute-pressure=(), cross-origin-isolated=(), deferred-fetch=(), deferred-fetch-minimal=(), display-capture=(), encrypted-media=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), local-fonts=(), local-network=(), local-network-access=(), loopback-network=(), magnetometer=(), microphone=(), midi=(), on-device-speech-recognition=(), otp-credentials=(), payment=(), picture-in-picture=(), private-state-token-issuance=(), private-state-token-redemption=(), publickey-credentials-create=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), storage-access=(), summarizer=(), usb=(), web-share=(), window-management=(), xr-spatial-tracking=()"
|
||||
|
||||
-Server
|
||||
-X-Powered-By
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -f "/mnt/docker-aio-config/data/configuration.json" ]; then
|
||||
nc -z 127.0.0.1 80 || exit 1
|
||||
nc -z 127.0.0.1 8080 || exit 1
|
||||
|
||||
@@ -16,6 +16,10 @@ compare_times() {
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
while true; do
|
||||
compare_times
|
||||
sleep 2
|
||||
|
||||
@@ -20,6 +20,10 @@ case "${1}" in
|
||||
esac
|
||||
}
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Check if running as root user
|
||||
if [ "$EUID" != "0" ]; then
|
||||
print_red "Container does not run as root user. This is not supported."
|
||||
@@ -333,6 +337,22 @@ else
|
||||
export NEXTCLOUD_DRI_GID=""
|
||||
fi
|
||||
|
||||
# Log level logics
|
||||
if [ -n "$AIO_LOG_LEVEL" ] && ! echo "$AIO_LOG_LEVEL" | grep -q "^debug$\|^info$\|^warn$\|^error$"; then
|
||||
print_red "AIO_LOG_LEVEL must be one of 'debug', 'info', 'warn' or 'error'.
|
||||
It is set to '$AIO_LOG_LEVEL'".
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$AIO_LOG_LEVEL" ]; then
|
||||
export AIO_LOG_LEVEL="warn"
|
||||
fi
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
export SUPERVISORD_STDOUT=/dev/stdout
|
||||
else
|
||||
export SUPERVISORD_STDOUT=NONE
|
||||
fi
|
||||
|
||||
# Check if ghcr.io is reachable
|
||||
# Solves issues like https://github.com/nextcloud/all-in-one/discussions/5268
|
||||
if ! curl --no-progress-meter https://ghcr.io/v2/ >/dev/null; then
|
||||
|
||||
@@ -5,12 +5,12 @@ pidfile=/var/run/supervisord/supervisord.pid
|
||||
childlogdir=/var/log/supervisord/
|
||||
logfile_maxbytes=50MB
|
||||
logfile_backups=10
|
||||
loglevel=error
|
||||
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
||||
user=root
|
||||
|
||||
[program:php-fpm]
|
||||
# Stdout logging is disabled as otherwise the logs are spammed
|
||||
stdout_logfile=NONE
|
||||
stdout_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
command=php-fpm
|
||||
@@ -54,11 +54,11 @@ stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
command=/session-deduplicator.sh
|
||||
user=root
|
||||
user=www-data
|
||||
|
||||
[program:domain-validator]
|
||||
# Logging is disabled as otherwise all attempts will be logged which spams the logs
|
||||
stdout_logfile=NONE
|
||||
stderr_logfile=NONE
|
||||
stdout_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
||||
stderr_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
||||
command=php -S 127.0.0.1:9876 /var/www/docker-aio/php/domain-validator.php
|
||||
user=www-data
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
FROM php:8.3.30-fpm-alpine3.23
|
||||
FROM php:8.3.31-fpm-alpine3.23
|
||||
|
||||
ENV PHP_MEMORY_LIMIT=512M
|
||||
ENV PHP_UPLOAD_LIMIT=16G
|
||||
@@ -8,7 +8,7 @@ ENV SOURCE_LOCATION=/usr/src/nextcloud
|
||||
ENV REDIS_DB_INDEX=0
|
||||
|
||||
# AIO settings start # Do not remove or change this line!
|
||||
ENV NEXTCLOUD_VERSION=33.0.2
|
||||
ENV NEXTCLOUD_VERSION=33.0.3
|
||||
ENV AIO_TOKEN=123456
|
||||
ENV AIO_URL=localhost
|
||||
# AIO settings end # Do not remove or change this line!
|
||||
@@ -142,7 +142,7 @@ RUN set -ex; \
|
||||
\
|
||||
{ \
|
||||
echo 'session.save_handler = redis'; \
|
||||
echo 'session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}?database=${REDIS_DB_INDEX}${REDIS_USER_AUTH}&auth[]=${REDIS_HOST_PASSWORD}"'; \
|
||||
echo 'session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}?database=${REDIS_DB_INDEX}${REDIS_USER_AUTH}&auth[]=${REDIS_HOST_PASSWORD}&timeout=3.0&read_timeout=10.0"'; \
|
||||
echo 'redis.session.locking_enabled = 1'; \
|
||||
echo 'redis.session.lock_retries = -1'; \
|
||||
echo '; 100ms in microseconds - prevents timeout on long requests such as large file uploads'; \
|
||||
@@ -244,27 +244,27 @@ RUN set -ex; \
|
||||
imagemagick-tiff \
|
||||
coreutils; \
|
||||
\
|
||||
# Use dynamic pm mode: spare workers stay alive between requests so every request is served immediately
|
||||
# without waiting for a new process to spawn (unlike ondemand which forks on every request when idle).
|
||||
# pm.max_children: upper bound on worker processes; synced with max DB connections and MaxRequestWorkers.
|
||||
# Set high so users never hit an artificial limit under peak load — spare-server bounds keep idle memory usage low.
|
||||
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; \
|
||||
# Sync this with max db connections and MaxRequestWorkers
|
||||
# We don't actually expect so many children but don't want to limit it artificially because people will report issues otherwise.
|
||||
# Also children will usually be terminated again after the process is done due to the ondemand setting
|
||||
sed -i 's/^pm.max_children =.*/pm.max_children = 5000/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
# pm.start_servers: number of workers pre-forked at container startup.
|
||||
# Having 2 workers ready immediately means the first requests after boot are served without any spawn delay.
|
||||
sed -i '/^;pm.start_servers/s/^;//' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
sed -i 's/^pm.start_servers =.*/pm.start_servers = 2/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
# pm.min_spare_servers: floor of idle workers kept alive at all times.
|
||||
# Guarantees at least 1 ready worker so a sudden burst of requests is handled without any fork wait.
|
||||
sed -i '/^;pm.min_spare_servers/s/^;//' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
sed -i 's/^pm.min_spare_servers =.*/pm.min_spare_servers = 1/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
# pm.max_spare_servers: ceiling of idle workers kept alive during quiet periods.
|
||||
# Capping at 3 limits idle memory consumption while still keeping a small ready pool.
|
||||
sed -i '/^;pm.max_spare_servers/s/^;//' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
sed -i 's/^pm.max_spare_servers =.*/pm.max_spare_servers = 3/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
# pm.max_requests: recycle each worker after handling 500 requests.
|
||||
# PHP extensions and apps can leak memory over time; recycling prevents those leaks from accumulating indefinitely.
|
||||
sed -i '/^;pm.max_requests/s/^;//' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
sed -i 's/^pm.max_requests =.*/pm.max_requests = 500/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
# With pm = ondemand, workers are killed after pm.process_idle_timeout seconds
|
||||
# of inactivity. The upstream default is 10 s, which is aggressive: after a
|
||||
# brief quiet period (e.g. desktop-sync clients polling every few seconds), all
|
||||
# workers are reaped and the next request burst must wait for fresh forks. On
|
||||
# a loaded host that spawn latency can push Apache past its FastCGI timeout and
|
||||
# produce a 502. 300 s (5 min) keeps a warm pool through normal sync-client
|
||||
# polling cycles while still reclaiming memory during genuinely idle periods.
|
||||
sed -i 's/^;*pm.process_idle_timeout\s*=.*/pm.process_idle_timeout = 300s/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
# Set request_terminate_timeout so that PHP-FPM forcibly kills workers that
|
||||
# exceed the wall-clock limit. Without this (default = 0 = disabled) a worker
|
||||
# stuck on a slow DB query, a stalled Redis connection, or a hung syscall is
|
||||
# never reaped. Over time these zombies fill up pm.max_children, leaving no
|
||||
# free slots for legitimate requests and causing Apache to return 502 Bad
|
||||
# Gateway upstream.
|
||||
sed -i "s|^;*request_terminate_timeout = .*|request_terminate_timeout = \${PHP_MAX_TIME}|" /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; \
|
||||
\
|
||||
echo "[ -n \"\$TERM\" ] && [ -f /root.motd ] && cat /root.motd" >> /root/.bashrc; \
|
||||
|
||||
@@ -16,6 +16,12 @@ $CONFIG = array (
|
||||
if (getenv('APPS_ALLOWLIST')) {
|
||||
$CONFIG['appsallowlist'] = explode(" ", getenv('APPS_ALLOWLIST'));
|
||||
}
|
||||
if (getenv('NEXTCLOUD_APP_STORE_URL')) {
|
||||
$CONFIG['appstoreurl'] = getenv('NEXTCLOUD_APP_STORE_URL');
|
||||
|
||||
$appStoreUrl = getenv('NEXTCLOUD_APP_STORE_URL');
|
||||
if ($appStoreUrl) {
|
||||
if ($appStoreUrl === 'no') {
|
||||
$CONFIG['appstoreenabled '] = false;
|
||||
} else {
|
||||
$CONFIG['appstoreurl'] = getenv('NEXTCLOUD_APP_STORE_URL');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ if (getenv('REDIS_MODE') !== 'rediscluster') {
|
||||
|
||||
if (getenv('REDIS_HOST')) {
|
||||
$CONFIG['redis']['host'] = (string) getenv('REDIS_HOST');
|
||||
$CONFIG['redis']['timeout'] = 1.5;
|
||||
$CONFIG['redis']['read_timeout'] = 1.5;
|
||||
$CONFIG['redis']['timeout'] = 3.0;
|
||||
$CONFIG['redis']['read_timeout'] = 10.0;
|
||||
}
|
||||
|
||||
if (getenv('REDIS_HOST_PASSWORD')) {
|
||||
@@ -23,6 +23,10 @@ if (getenv('REDIS_MODE') !== 'rediscluster') {
|
||||
$CONFIG['redis']['dbindex'] = (int) getenv('REDIS_DB_INDEX');
|
||||
}
|
||||
|
||||
if (getenv('REDIS_PREFIX')) {
|
||||
$CONFIG['redis']['memcache_customprefix'] = getenv('REDIS_PREFIX');
|
||||
}
|
||||
|
||||
if (getenv('REDIS_USER_AUTH')) {
|
||||
$CONFIG['redis']['user'] = str_replace("&auth[]=", "", getenv('REDIS_USER_AUTH'));
|
||||
}
|
||||
@@ -60,6 +64,10 @@ if (getenv('REDIS_MODE') !== 'rediscluster') {
|
||||
$CONFIG['redis.cluster']['user'] = str_replace("&auth[]=", "", getenv('REDIS_USER_AUTH'));
|
||||
}
|
||||
|
||||
if (getenv('REDIS_PREFIX')) {
|
||||
$CONFIG['redis.cluster']['memcache_customprefix'] = getenv('REDIS_PREFIX');
|
||||
}
|
||||
|
||||
if (getenv('NEXTCLOUD_TRUSTED_CERTIFICATES_REDIS')) {
|
||||
$CONFIG['redis.cluster']['ssl_context']['cafile'] = '/var/www/html/data/certificates/ca-bundle.crt';
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
$CONFIG = array (
|
||||
'serverid' => crc32(gethostname()) % 512,
|
||||
'serverid' => hexdec(hash('xxh32', gethostname()) & 0x1FF,
|
||||
);
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
wait_for_cron() {
|
||||
set -x
|
||||
while [ -n "$(pgrep -f /var/www/html/cron.php)" ]; do
|
||||
|
||||
@@ -10,6 +10,10 @@ directory_empty() {
|
||||
[ -z "$(ls -A "$1/")" ]
|
||||
}
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
run_upgrade_if_needed_due_to_app_update() {
|
||||
if php /var/www/html/occ status | grep maintenance | grep -q true; then
|
||||
php /var/www/html/occ maintenance:mode --off
|
||||
@@ -20,6 +24,14 @@ run_upgrade_if_needed_due_to_app_update() {
|
||||
fi
|
||||
}
|
||||
|
||||
NEXTCLOUD_LOG_LEVEL="$(case "$AIO_LOG_LEVEL" in
|
||||
debug) printf '0' ;;
|
||||
info) printf '1' ;;
|
||||
warn) printf '2' ;;
|
||||
error) printf '3' ;;
|
||||
esac)"
|
||||
export NEXTCLOUD_LOG_LEVEL
|
||||
|
||||
# Create cert bundle
|
||||
if env | grep -q NEXTCLOUD_TRUSTED_CERTIFICATES_; then
|
||||
|
||||
@@ -75,7 +87,9 @@ if env | grep -q NEXTCLOUD_TRUSTED_CERTIFICATES_; then
|
||||
cat "$CERTIFICATE_BUNDLE"
|
||||
|
||||
# Disable debug mode
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
fi
|
||||
|
||||
# Adjust DATABASE_TYPE to by Nextcloud supported value
|
||||
@@ -115,6 +129,11 @@ rm -f "$test_file"
|
||||
if [ -f /var/www/html/version.php ]; then
|
||||
# shellcheck disable=SC2016
|
||||
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
|
||||
if [ -z "$installed_version" ]; then
|
||||
echo "Could not determine the installed Nextcloud version via php -r. The PHP installation might be broken."
|
||||
echo "Please check the container logs and your PHP installation."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
installed_version="0.0.0.0"
|
||||
fi
|
||||
@@ -217,7 +236,9 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
|
||||
if grep -q appstoreurl /var/www/html/config/config.php; then
|
||||
set -x
|
||||
APPSTORE_URL="$(grep appstoreurl /var/www/html/config/config.php | grep -oP 'https://.*v[0-9]+')"
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
fi
|
||||
# Default appstoreurl parameter in config.php defaults to 'https://apps.nextcloud.com/api/v1' so we check for the apps.json file stored in there
|
||||
CURL_STATUS="$(curl -LI "$APPSTORE_URL"/apps.json -o /dev/null -w '%{http_code}\n' -s)"
|
||||
@@ -284,7 +305,9 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
|
||||
"$SOURCE_LOCATION/custom_apps/" \
|
||||
/var/www/html/custom_apps/
|
||||
done
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
fi
|
||||
|
||||
# Copy these from Nextcloud archive if they don't exist yet (i.e. new install)
|
||||
@@ -437,12 +460,20 @@ EOF
|
||||
# Apply log settings
|
||||
echo "Applying default settings..."
|
||||
mkdir -p /var/www/html/data
|
||||
php /var/www/html/occ config:system:set loglevel --value="2" --type=integer
|
||||
php /var/www/html/occ config:system:set log_type --value="file"
|
||||
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
|
||||
php /var/www/html/occ config:system:set loglevel --value="$NEXTCLOUD_LOG_LEVEL" --type=integer
|
||||
if [ "$NEXTCLOUD_LOG_TYPE" = "errorlog" ]; then
|
||||
php /var/www/html/occ config:system:set log_type --value="errorlog"
|
||||
php /var/www/html/occ config:system:set log_type_audit --value="errorlog"
|
||||
php /var/www/html/occ app:disable logreader
|
||||
else
|
||||
php /var/www/html/occ config:system:set log_type --value="file"
|
||||
php /var/www/html/occ config:system:set log_type_audit --value="file"
|
||||
php /var/www/html/occ app:enable logreader
|
||||
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
|
||||
php /var/www/html/occ config:system:set logfile_audit --value="/var/www/html/data/audit.log"
|
||||
fi
|
||||
php /var/www/html/occ config:system:set log_rotate_size --value="10485760" --type=integer
|
||||
php /var/www/html/occ app:enable admin_audit
|
||||
php /var/www/html/occ config:app:set admin_audit logfile --value="/var/www/html/data/audit.log"
|
||||
php /var/www/html/occ config:system:set log.condition apps 0 --value="admin_audit"
|
||||
|
||||
# Apply preview settings
|
||||
@@ -640,8 +671,18 @@ fi
|
||||
# Adjusting log files to be stored on a volume
|
||||
echo "Adjusting log files..."
|
||||
php /var/www/html/occ config:system:set upgrade.cli-upgrade-link --value="https://github.com/nextcloud/all-in-one/discussions/2726"
|
||||
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
|
||||
php /var/www/html/occ config:app:set admin_audit logfile --value="/var/www/html/data/audit.log"
|
||||
php /var/www/html/occ config:system:set loglevel --value="$NEXTCLOUD_LOG_LEVEL" --type=integer
|
||||
if [ "$NEXTCLOUD_LOG_TYPE" = "errorlog" ]; then
|
||||
php /var/www/html/occ config:system:set log_type --value="errorlog"
|
||||
php /var/www/html/occ config:system:set log_type_audit --value="errorlog"
|
||||
php /var/www/html/occ app:disable logreader
|
||||
else
|
||||
php /var/www/html/occ config:system:set log_type --value="file"
|
||||
php /var/www/html/occ config:system:set log_type_audit --value="file"
|
||||
php /var/www/html/occ app:enable logreader
|
||||
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
|
||||
php /var/www/html/occ config:system:set logfile_audit --value="/var/www/html/data/audit.log"
|
||||
fi
|
||||
php /var/www/html/occ config:system:set updatedirectory --value="/nc-updater"
|
||||
if [ -n "$NEXTCLOUD_SKELETON_DIRECTORY" ]; then
|
||||
if [ "$NEXTCLOUD_SKELETON_DIRECTORY" = "empty" ]; then
|
||||
@@ -742,7 +783,9 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then
|
||||
if echo "$COLLABORA_HOST" | grep -q "nextcloud-.*-collabora"; then
|
||||
COLLABORA_HOST="$NC_DOMAIN"
|
||||
fi
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
# Remove richdcoumentscode if it should be incorrectly installed
|
||||
if [ -d "/var/www/html/custom_apps/richdocumentscode" ]; then
|
||||
php /var/www/html/occ app:remove richdocumentscode
|
||||
@@ -863,7 +906,9 @@ if [ "$TALK_ENABLED" = 'yes' ]; then
|
||||
if [ -z "$TURN_DOMAIN" ]; then
|
||||
TURN_DOMAIN="$TALK_HOST"
|
||||
fi
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
if ! [ -d "/var/www/html/custom_apps/spreed" ]; then
|
||||
php /var/www/html/occ app:install spreed
|
||||
elif [ "$(php /var/www/html/occ config:app:get spreed enabled)" != "yes" ]; then
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Set a default value for POSTGRES_PORT
|
||||
if [ -z "$POSTGRES_PORT" ]; then
|
||||
POSTGRES_PORT=5432
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [[ "$EUID" = 0 ]]; then
|
||||
COMMAND=(sudo -E -u www-data php /var/www/html/occ)
|
||||
else
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [[ "$EUID" = 0 ]]; then
|
||||
COMMAND=(sudo -E -u www-data php /var/www/html/occ)
|
||||
else
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Wait until the apache container is ready
|
||||
while ! nc -z "$APACHE_HOST" "$APACHE_PORT"; do
|
||||
echo "Waiting for $APACHE_HOST to become available..."
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Set a default value for POSTGRES_PORT
|
||||
if [ -z "$POSTGRES_PORT" ]; then
|
||||
POSTGRES_PORT=5432
|
||||
@@ -25,7 +29,7 @@ fi
|
||||
# Fix false database connection on old instances
|
||||
if [ -f "/var/www/html/config/config.php" ]; then
|
||||
sleep 2
|
||||
while ! sudo -E -u www-data psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB" -c "select now()"; do
|
||||
while ! sudo -E -u www-data env PGPASSWORD="$POSTGRES_PASSWORD" psql -h "$POSTGRES_HOST" -p "$POSTGRES_PORT" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()"; do
|
||||
echo "Waiting for the database to start..."
|
||||
sleep 5
|
||||
done
|
||||
@@ -53,7 +57,9 @@ if ! [ -f "/dev-dri-group-was-added" ] && [ -n "$(find /dev -maxdepth 1 -mindept
|
||||
usermod -aG "$GROUP" www-data
|
||||
touch "/dev-dri-group-was-added"
|
||||
fi
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
|
||||
# Check datadir permissions
|
||||
sudo -E -u www-data touch "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" &>/dev/null
|
||||
@@ -170,6 +176,8 @@ if [ "$THIS_IS_AIO" = "true" ] && [ "$APACHE_PORT" = 443 ]; then
|
||||
sed -i "/^listen.allowed_clients/s/,$//" /usr/local/etc/php-fpm.d/www.conf
|
||||
grep listen.allowed_clients /usr/local/etc/php-fpm.d/www.conf
|
||||
fi
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
@@ -6,7 +6,7 @@ pidfile=/var/run/supervisord/supervisord.pid
|
||||
childlogdir=/var/log/supervisord/
|
||||
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
||||
logfile_backups=10 ; number of backed up logfiles
|
||||
loglevel=error
|
||||
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
||||
user=root
|
||||
|
||||
[program:php-fpm]
|
||||
@@ -25,6 +25,14 @@ stderr_logfile_maxbytes=0
|
||||
command=/cron.sh
|
||||
user=www-data
|
||||
|
||||
[program:taskprocessing-worker]
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
command=php /var/www/html/occ taskprocessing:worker --timeout 300
|
||||
user=www-data
|
||||
|
||||
[program:run-exec-commands]
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if ! nc -z "$NEXTCLOUD_HOST" 9001; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
export RUST_LOG="$AIO_LOG_LEVEL"
|
||||
|
||||
if [ -z "$NEXTCLOUD_HOST" ]; then
|
||||
echo "NEXTCLOUD_HOST needs to be provided. Exiting!"
|
||||
exit 1
|
||||
@@ -22,7 +28,7 @@ elif [ "$CPU_ARCH" != "x86_64" ]; then
|
||||
fi
|
||||
|
||||
# Add warning
|
||||
if ! [ -f /var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push ]; then
|
||||
if ! [ -f /var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push ] && ! [ -f /var/www/html/apps/notify_push/bin/"$CPU_ARCH"/notify_push ]; then
|
||||
echo "The notify_push binary was not found."
|
||||
echo "Most likely is DNS resolution not working correctly."
|
||||
echo "You can try to fix this by configuring a DNS server globally in dockers daemon.json."
|
||||
@@ -36,11 +42,24 @@ if ! [ -f /var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push ]; t
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Logic for ipv6 disabled servers
|
||||
BIND="::"
|
||||
if grep -q "1" /sys/module/ipv6/parameters/disable \
|
||||
|| grep -q "1" /proc/sys/net/ipv6/conf/all/disable_ipv6 \
|
||||
|| grep -q "1" /proc/sys/net/ipv6/conf/default/disable_ipv6; then
|
||||
BIND="0.0.0.0"
|
||||
fi
|
||||
export BIND
|
||||
|
||||
echo "notify-push was started"
|
||||
|
||||
|
||||
if [ -f /var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push ]; then
|
||||
PUSH_PATH="/var/www/html/custom_apps/notify_push/bin/$CPU_ARCH/notify_push"
|
||||
else
|
||||
PUSH_PATH="/var/www/html/apps/notify_push/bin/$CPU_ARCH/notify_push"
|
||||
fi
|
||||
# Run it
|
||||
/var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push \
|
||||
exec "$PUSH_PATH" \
|
||||
--port 7867 \
|
||||
/var/www/html/config/config.php
|
||||
|
||||
exec "$@"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
nc -z 127.0.0.1 80 || exit 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
# From https://github.com/docker-library/postgres/blob/master/18/alpine3.23/Dockerfile
|
||||
FROM postgres:18.3-alpine
|
||||
FROM postgres:18.4-alpine
|
||||
|
||||
ENV PGDATA=/var/lib/postgresql/data
|
||||
|
||||
@@ -14,6 +14,7 @@ RUN set -ex; \
|
||||
bash \
|
||||
openssl \
|
||||
shadow \
|
||||
netcat-openbsd \
|
||||
grep; \
|
||||
\
|
||||
# We need to use the same gid and uid as on old installations
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
test -f "/mnt/data/backup-is-running" && exit 0
|
||||
|
||||
psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@127.0.0.1:11000/$POSTGRES_DB" -c "select now()" && exit 0
|
||||
# If database import is running, do not continue with the health check
|
||||
if nc -z 127.0.0.1 11000; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@127.0.0.1:5432/$POSTGRES_DB" -c "select now()" || exit 1
|
||||
PGPASSWORD="$POSTGRES_PASSWORD" psql -h 127.0.0.1 -p 5432 -U "oc_$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()" || exit 1
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
touch "$DUMP_DIR/initialization.failed"
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" \
|
||||
-v "pg_new_password=$POSTGRES_PASSWORD" <<-EOSQL
|
||||
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD :'pg_new_password' CREATEDB;
|
||||
ALTER DATABASE "$POSTGRES_DB" OWNER TO "oc_$POSTGRES_USER";
|
||||
GRANT ALL PRIVILEGES ON DATABASE "$POSTGRES_DB" TO "oc_$POSTGRES_USER";
|
||||
GRANT ALL PRIVILEGES ON SCHEMA public TO "oc_$POSTGRES_USER";
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
POSTGRES_LOG_MIN_MESSAGES="$(case "$AIO_LOG_LEVEL" in
|
||||
debug) printf 'debug1' ;;
|
||||
info) printf 'info' ;;
|
||||
warn) printf 'warning' ;;
|
||||
error) printf 'error' ;;
|
||||
esac)"
|
||||
export POSTGRES_LOG_MIN_MESSAGES
|
||||
|
||||
# Variables
|
||||
DATADIR="/var/lib/postgresql/data"
|
||||
export DUMP_DIR="/mnt/data"
|
||||
@@ -85,7 +97,7 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
|
||||
exec docker-entrypoint.sh postgres &
|
||||
|
||||
# Wait for creation
|
||||
while ! psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@127.0.0.1:11000/$POSTGRES_DB" -c "select now()"; do
|
||||
while ! psql -h 127.0.0.1 -p 11000 -U "oc_$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()"; do
|
||||
echo "Waiting for the database to start."
|
||||
sleep 5
|
||||
done
|
||||
@@ -107,8 +119,9 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
|
||||
exit 1
|
||||
elif [ "$DB_OWNER" != "oc_$POSTGRES_USER" ]; then
|
||||
DIFFERENT_DB_OWNER=1
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER "$DB_OWNER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" \
|
||||
-v "pg_new_password=$POSTGRES_PASSWORD" <<-EOSQL
|
||||
CREATE USER "$DB_OWNER" WITH PASSWORD :'pg_new_password' CREATEDB;
|
||||
ALTER DATABASE "$POSTGRES_DB" OWNER TO "$DB_OWNER";
|
||||
GRANT ALL PRIVILEGES ON DATABASE "$POSTGRES_DB" TO "$DB_OWNER";
|
||||
GRANT ALL PRIVILEGES ON SCHEMA public TO "$DB_OWNER";
|
||||
@@ -165,6 +178,12 @@ if [ -f "/var/lib/postgresql/data/postgresql.conf" ]; then
|
||||
sed -i 's|#log_checkpoints.*|log_checkpoints = off|' "$PGCONF"
|
||||
fi
|
||||
|
||||
if grep -q "^#\?log_min_messages" /var/lib/postgresql/data/postgresql.conf; then
|
||||
sed -i "s|^#\?log_min_messages.*|log_min_messages = $POSTGRES_LOG_MIN_MESSAGES|" /var/lib/postgresql/data/postgresql.conf
|
||||
else
|
||||
echo "log_min_messages = $POSTGRES_LOG_MIN_MESSAGES" >> /var/lib/postgresql/data/postgresql.conf
|
||||
fi
|
||||
|
||||
# Closing idling connections automatically seems to break any logic so was reverted again to default where it is disabled
|
||||
if grep -q "^idle_session_timeout" "$PGCONF"; then
|
||||
sed -i 's|^idle_session_timeout.*|#idle_session_timeout|' "$PGCONF"
|
||||
@@ -222,12 +241,16 @@ do_database_dump() {
|
||||
pg_ctl stop -m fast
|
||||
rm "$DUMP_DIR/export.failed"
|
||||
echo 'Database dump successful!'
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
exit 0
|
||||
else
|
||||
pg_ctl stop -m fast
|
||||
echo "Database dump unsuccessful!"
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
# From https://github.com/redis/docker-library-redis/blob/release/8.2/alpine/Dockerfile
|
||||
FROM redis:8.6.2-alpine
|
||||
FROM redis:8.6.3-alpine
|
||||
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
redis-cli -a "$REDIS_HOST_PASSWORD" PING || exit 1
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Redis only supports [debug, verbose, notice, warning, nothing] as log level
|
||||
if [ "$AIO_LOG_LEVEL" = "warn" ] || [ "$AIO_LOG_LEVEL" = "error" ]; then
|
||||
REDIS_LOG_LEVEL="warning"
|
||||
elif [ "$AIO_LOG_LEVEL" = "info" ]; then
|
||||
REDIS_LOG_LEVEL="notice"
|
||||
else
|
||||
REDIS_LOG_LEVEL="$AIO_LOG_LEVEL"
|
||||
fi
|
||||
export REDIS_LOG_LEVEL
|
||||
|
||||
# Show wiki if vm.overcommit is disabled
|
||||
if [ "$(sysctl -n vm.overcommit_memory)" != "1" ]; then
|
||||
echo "Memory overcommit is disabled but necessary for safe operation"
|
||||
@@ -16,7 +30,7 @@ fi
|
||||
|
||||
# Build the redis-server argument list.
|
||||
REDIS_ARGS=(
|
||||
--loglevel warning
|
||||
--loglevel "$REDIS_LOG_LEVEL"
|
||||
--save "" # Disable RDB persistence (Redis is used as a pure cache/lock store)
|
||||
--maxmemory-policy allkeys-lru # Evict least-recently-used keys when memory is full
|
||||
--lazyfree-lazy-eviction yes # Perform evictions in a background thread
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
FROM python:3.14.3-alpine3.23
|
||||
FROM python:3.14.5-alpine3.23
|
||||
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||
|
||||
ENV RECORDING_VERSION=v0.2.1
|
||||
ENV ALLOW_ALL=false
|
||||
ENV HPB_PROTOCOL=https
|
||||
ENV NC_PROTOCOL=https
|
||||
ENV SKIP_VERIFY=false
|
||||
ENV HPB_PATH=/standalone-signaling/
|
||||
ENV ALLOW_ALL=false \
|
||||
HPB_PROTOCOL=https \
|
||||
NC_PROTOCOL=https \
|
||||
SKIP_VERIFY=false \
|
||||
HPB_PATH=/standalone-signaling/ \
|
||||
AIO_LOG_LEVEL=warn
|
||||
|
||||
RUN set -ex; \
|
||||
apk upgrade --no-cache -a; \
|
||||
@@ -34,6 +35,9 @@ RUN set -ex; \
|
||||
build-base \
|
||||
linux-headers \
|
||||
geckodriver; \
|
||||
if [ "$(apk --print-arch)" = "x86_64" ]; then \
|
||||
apk add --no-cache intel-media-driver; \
|
||||
fi; \
|
||||
useradd -d /tmp --system recording -u 122; \
|
||||
# Give root a random password
|
||||
echo "root:$(openssl rand -base64 12)" | chpasswd; \
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
nc -z 127.0.0.1 1234 || exit 1
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
TALK_RECORDING_LOG_LEVEL="$(case "$AIO_LOG_LEVEL" in
|
||||
debug) printf '10' ;;
|
||||
info) printf '20' ;;
|
||||
warn) printf '30' ;;
|
||||
error) printf '40' ;;
|
||||
esac)"
|
||||
export TALK_RECORDING_LOG_LEVEL
|
||||
|
||||
# Variables
|
||||
if [ -z "$NC_DOMAIN" ]; then
|
||||
echo "You need to provide the NC_DOMAIN."
|
||||
@@ -49,7 +61,7 @@ fi
|
||||
cat << RECORDING_CONF > "/conf/recording.conf"
|
||||
[logs]
|
||||
# 30 means Warning
|
||||
level = 30
|
||||
level = ${TALK_RECORDING_LOG_LEVEL}
|
||||
|
||||
[http]
|
||||
listen = 0.0.0.0:1234
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
FROM nats:2.12.7-scratch AS nats
|
||||
FROM nats:2.14.1-scratch AS nats
|
||||
FROM eturnal/eturnal:1.12.2-alpine AS eturnal
|
||||
FROM strukturag/nextcloud-spreed-signaling:2.1.1 AS signaling
|
||||
FROM alpine:3.23.4 AS janus
|
||||
@@ -37,7 +37,8 @@ RUN set -ex; \
|
||||
|
||||
FROM alpine:3.23.4
|
||||
ENV ETURNAL_ETC_DIR="/conf"
|
||||
ENV SKIP_CERT_VERIFY=false
|
||||
ENV SKIP_CERT_VERIFY=false \
|
||||
AIO_LOG_LEVEL=warn
|
||||
COPY --from=janus --chmod=777 --chown=1000:1000 /usr/local /usr/local
|
||||
COPY --from=eturnal --chmod=777 --chown=1000:1000 /opt/eturnal /opt/eturnal
|
||||
COPY --from=nats --chmod=777 --chown=1000:1000 /nats-server /usr/local/bin/nats-server
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
nc -z 127.0.0.1 8081 || exit 1
|
||||
nc -z 127.0.0.1 8188 || exit 1
|
||||
nc -z 127.0.0.1 4222 || exit 1
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = "warn" ]; then
|
||||
ETURNAL_LOG_LEVEL="warning"
|
||||
else
|
||||
ETURNAL_LOG_LEVEL="$AIO_LOG_LEVEL"
|
||||
fi
|
||||
export ETURNAL_LOG_LEVEL
|
||||
JANUS_LOG_LEVEL="$(case "$AIO_LOG_LEVEL" in
|
||||
debug) printf '7' ;;
|
||||
info) printf '4' ;;
|
||||
warn) printf '3' ;;
|
||||
error) printf '1' ;;
|
||||
esac)"
|
||||
export JANUS_LOG_LEVEL
|
||||
|
||||
# Variables
|
||||
if [ -z "$NC_DOMAIN" ]; then
|
||||
echo "You need to provide the NC_DOMAIN."
|
||||
@@ -31,7 +49,9 @@ if mountpoint -q /usr/local/share/ca-certificates; then
|
||||
fi
|
||||
done
|
||||
export SSL_CERT_FILE=/tmp/ca-certificates.crt
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
fi
|
||||
|
||||
set -x
|
||||
@@ -40,7 +60,9 @@ IPv4_ADDRESS_TALK_RELAY="$(hostname -i | grep -oP '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]
|
||||
IPv4_ADDRESS_TALK="$(dig "$TALK_HOST" IN A +short +search | grep '^[0-9.]\+$' | sort | head -n1)"
|
||||
# shellcheck disable=SC2153
|
||||
IPv6_ADDRESS_TALK="$(dig "$TALK_HOST" AAAA +short +search | grep '^[0-9a-f:]\+$' | sort | head -n1)"
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
|
||||
if [ -n "$IPv4_ADDRESS_TALK" ] && [ "$IPv4_ADDRESS_TALK_RELAY" = "$IPv4_ADDRESS_TALK" ]; then
|
||||
IPv4_ADDRESS_TALK=""
|
||||
@@ -53,7 +75,9 @@ if grep -q "1" /sys/module/ipv6/parameters/disable \
|
||||
|| grep -q "1" /proc/sys/net/ipv6/conf/default/disable_ipv6; then
|
||||
IP_BINDING="0.0.0.0"
|
||||
fi
|
||||
set +x
|
||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||
set +x
|
||||
fi
|
||||
|
||||
# Turn
|
||||
cat << TURN_CONF > "/conf/eturnal.yml"
|
||||
@@ -66,7 +90,7 @@ eturnal:
|
||||
port: $TALK_PORT
|
||||
transport: tcp
|
||||
log_dir: stdout
|
||||
log_level: warning
|
||||
log_level: ${ETURNAL_LOG_LEVEL}
|
||||
secret: "$TURN_SECRET"
|
||||
relay_ipv4_addr: "$IPv4_ADDRESS_TALK_RELAY"
|
||||
relay_ipv6_addr: "$IPv6_ADDRESS_TALK"
|
||||
|
||||
@@ -5,7 +5,7 @@ pidfile=/var/run/supervisord/supervisord.pid
|
||||
childlogdir=/var/log/supervisord/
|
||||
logfile_maxbytes=50MB
|
||||
logfile_backups=10
|
||||
loglevel=error
|
||||
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
||||
|
||||
[program:nats-server]
|
||||
stdout_logfile=/dev/stdout
|
||||
@@ -30,8 +30,7 @@ stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
# debug-level 3 means warning
|
||||
command=janus --config=/conf/janus.jcfg --disable-colors --log-stdout --full-trickle --debug-level 3
|
||||
command=janus --config=/conf/janus.jcfg --disable-colors --log-stdout --full-trickle --debug-level %(ENV_JANUS_LOG_LEVEL)s
|
||||
# Start alongside eturnal; signaling connects to Janus via WebSocket
|
||||
priority=20
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
FROM golang:1.26.2-alpine3.23 AS go
|
||||
FROM golang:1.26.3-alpine3.23 AS go
|
||||
|
||||
ENV WATCHTOWER_COMMIT_HASH=652c89577076f6bc6f2af4465217589641216ee3
|
||||
ENV WATCHTOWER_COMMIT_HASH=14c318d05a529c59f6b48a8cc3633527ec6770af
|
||||
|
||||
RUN set -ex; \
|
||||
apk upgrade --no-cache -a; \
|
||||
apk add --no-cache \
|
||||
build-base; \
|
||||
go install github.com/nicholas-fedor/watchtower@$WATCHTOWER_COMMIT_HASH # v1.16.1
|
||||
go install github.com/nicholas-fedor/watchtower@$WATCHTOWER_COMMIT_HASH # v1.17.1
|
||||
|
||||
FROM alpine:3.23.4
|
||||
|
||||
@@ -22,6 +22,8 @@ COPY --chmod=775 start.sh /start.sh
|
||||
# hadolint ignore=DL3002
|
||||
USER root
|
||||
|
||||
ENV AIO_LOG_LEVEL="warn"
|
||||
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||
wud.watch="false" \
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Check if socket is available and readable
|
||||
if ! [ -e "/var/run/docker.sock" ]; then
|
||||
echo "Docker socket is not available. Cannot continue."
|
||||
@@ -17,7 +21,7 @@ if [ -f /run/.containerenv ]; then
|
||||
fi
|
||||
|
||||
if [ -n "$CONTAINER_TO_UPDATE" ]; then
|
||||
exec /watchtower --cleanup --debug --run-once "$CONTAINER_TO_UPDATE"
|
||||
exec /watchtower --cleanup --log-level "$AIO_LOG_LEVEL" --run-once "$CONTAINER_TO_UPDATE"
|
||||
else
|
||||
echo "'CONTAINER_TO_UPDATE' is not set. Cannot update anything."
|
||||
exit 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
# Probably from this file: https://github.com/nextcloud/whiteboard/blob/main/Dockerfile
|
||||
FROM ghcr.io/nextcloud-releases/whiteboard:v1.5.7
|
||||
FROM ghcr.io/nextcloud-releases/whiteboard:v1.5.8
|
||||
|
||||
USER root
|
||||
RUN set -ex; \
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
nc -z "$REDIS_HOST" "$REDIS_PORT" || exit 0
|
||||
nc -z 127.0.0.1 3002 || exit 1
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
export LOG_LEVEL="$AIO_LOG_LEVEL"
|
||||
|
||||
# Only start container if nextcloud is accessible
|
||||
while ! nc -z "$REDIS_HOST" "$REDIS_PORT"; do
|
||||
echo "Waiting for redis to start..."
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
# https://editorconfig.org
|
||||
|
||||
# note: the files in ./composer actually use 4 spaces instead of tabs
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = tab
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.feature]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
# AIO app for Nextcloud
|
||||
|
||||
This folder contains a Nextcloud app, which will be automatically installed within the Nextcloud instance.
|
||||
It adds a link to the admin settings page that gives access to the AIO interface.
|
||||
|
||||
## How to develop the app?
|
||||
|
||||
Please note that in order to check if an app is already downloaded
|
||||
Nextcloud will look for a folder with the same name as the app.
|
||||
Please note that in order to check if an app is already downloaded Nextcloud will look for a folder with the same name as the app.
|
||||
|
||||
Therefore you need to add the app to one of the app directories
|
||||
naming the directory `nextcloud-aio`.
|
||||
Therefore you need to add the app to one of the app directories naming the directory `nextcloud-aio`.
|
||||
|
||||
@@ -6,6 +6,8 @@ This container bundles Home Assistant and auto-configures it for you.
|
||||
- After adding and starting the container, you can visit `http://ip.address.of.this.server:8123` in order to set up your Home Assistant instance.
|
||||
- The data of Home Assistant will be automatically included in AIOs backup solution!
|
||||
- In order to access your Home Assistant outside the local network, you have to set up your own reverse proxy. You can set up a reverse proxy following [these instructions](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md).
|
||||
- And to allow the traffic from the reverse proxy to be accepted by Home Assistant, follow [these instructions](https://www.home-assistant.io/integrations/http/#reverse-proxies) from the Home Assistant documentation.
|
||||
- Or, to use the Caddy with geoblocking community container, follow the following instruction to add your own Caddyfile, to use it for Home Assistant: https://github.com/nextcloud/all-in-one/tree/main/community-containers/caddy#notes
|
||||
- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack
|
||||
|
||||
### Repository
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"container_name": "nextcloud-aio-lldap",
|
||||
"display_name": "Light LDAP implementation",
|
||||
"documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/lldap",
|
||||
"image": "lldap/lldap",
|
||||
"image_tag": "v0-alpine",
|
||||
"image": "ghcr.io/lldap/lldap",
|
||||
"image_tag": "latest-alpine",
|
||||
"internal_port": "17170",
|
||||
"restart": "unless-stopped",
|
||||
"ports": [
|
||||
|
||||
@@ -5,7 +5,6 @@ This container bundles Local AI and auto-configures it for you. It support hardw
|
||||
Documentation is available on the container repository. This documentation is regularly updated and is intended to be as simple and detailed as possible. Thanks for all your feedback!
|
||||
|
||||
- See https://github.com/docjyJ/aio-local-ai-vulkan#getting-started for getting start with this container.
|
||||
- See [this guide](https://github.com/nextcloud/all-in-one/discussions/5430) for how to improve AI task pickup speed
|
||||
- Note that Nextcloud supports only one server for AI queries, so this container cannot be used at the same time as other AI containers.
|
||||
- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
## Minio
|
||||
This container bundles minio s3 storage and auto-configures it for you.
|
||||
|
||||
> [!CAUTION]
|
||||
> The Minio upstream project is no longer maintained. The container should still work in its current form...
|
||||
|
||||
>[!WARNING]
|
||||
> Enabling this container will remove access to all the files formerly written to the data directory.
|
||||
> So only enable this on a clean instance directly after installing AIO.
|
||||
|
||||
@@ -4,9 +4,65 @@ This directory features containers that are built for AIO which allows to add ad
|
||||
## Disclaimers
|
||||
All containers that are in this directory are community maintained so the responsibility is on the community to keep them updated and secure. There is no guarantee that this will be the case in the future.
|
||||
|
||||
## Overview
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
%% ── Styles ───────────────────────────────────────────────────────────────────
|
||||
classDef community fill:#FDEBD0,stroke:#E67E22,color:#222
|
||||
classDef group fill:#FEF9E7,stroke:#F39C12,color:#333
|
||||
|
||||
subgraph COMM_AI["🤖 AI & Language"]
|
||||
LAI(["🧠 Local AI\nPrivate AI assistant"]):::community
|
||||
LT(["✏️ LanguageTool\nSpell & grammar check"]):::community
|
||||
LTRANS(["🌐 LibreTranslate\nTranslation engine"]):::community
|
||||
FACE(["🙂 FaceRecognition\nPhoto AI processor"]):::community
|
||||
end
|
||||
|
||||
subgraph COMM_BACKUP["💾 Backup & Storage"]
|
||||
BV(["📦 Borgbackup Viewer\nBrowse backups"]):::community
|
||||
CALB(["📅 CalCardBackup\nCalendar/Contacts backup"]):::community
|
||||
MINIO(["🗃️ MinIO\nS3-compatible storage"]):::community
|
||||
SMB(["📂 SMB Server\nWindows file sharing"]):::community
|
||||
end
|
||||
|
||||
subgraph COMM_EXTRA["🌟 Extra Services"]
|
||||
HA(["🏠 Home Assistant\nHome automation"]):::community
|
||||
STLW(["📧 Stalwart\nMail server"]):::community
|
||||
NOCO(["🗂️ NocoDB\nNo-code database"]):::community
|
||||
JSER(["🎯 Jellyseerr\nMedia request manager"]):::community
|
||||
NOTIF(["📣 Notifications\nExternal push notify"]):::community
|
||||
end
|
||||
|
||||
subgraph COMM_MEDIA["🎬 Media"]
|
||||
PLEX(["🎞️ Plex\nMedia Server"]):::community
|
||||
JELLY(["🎬 Jellyfin\nMedia Server"]):::community
|
||||
DLNA(["📡 DLNA\nMedia Streaming"]):::community
|
||||
MEMTR(["📸 Memories\nVideo Transcoder"]):::community
|
||||
MKV(["💿 MakeMKV\nBlu-ray / DVD rip"]):::community
|
||||
end
|
||||
|
||||
subgraph COMM_MONITOR["📊 Monitoring & Infra"]
|
||||
GLAN(["📈 Glances\nSystem monitoring"]):::community
|
||||
EXP(["📊 Nextcloud Exporter\nPrometheus metrics"]):::community
|
||||
SCRU(["💽 Scrutiny\nDisk health (S.M.A.R.T.)"]):::community
|
||||
CMGMT(["🐳 Container Mgmt\nDocker web console"]):::community
|
||||
end
|
||||
|
||||
subgraph COMM_SEC["🔒 Security & Network"]
|
||||
F2B(["🚫 Fail2ban\nBrute-force protection"]):::community
|
||||
PIH(["🕳️ Pi-hole\nAd & DNS blocker"]):::community
|
||||
VW(["🔐 Vaultwarden\nPassword Manager"]):::community
|
||||
LDAP(["👥 LLDAP\nLight LDAP / Users"]):::community
|
||||
CADDY(["🌐 Caddy\nReverse Proxy + Geoblocking"]):::community
|
||||
NPMPLUS(["🌐 NPMplus\nNginx Proxy Manager"]):::community
|
||||
end
|
||||
```
|
||||
|
||||
## How to use this?
|
||||
Starting with v11 of AIO, the management of Community Containers is done via the AIO interface (it is the last section in the AIO interface, so only visible if you scroll down).
|
||||
⚠️⚠️⚠️ Please review the folder for documentation on each of the containers before adding them! Not reviewing the documentation for each of them first might break starting the AIO containers because e.g. fail2ban only works on Linux and not on Docker Desktop! **Hint:** If the containers where running already, in order to actually start the added container, you need to click on `Stop containers` and the `Update and start containers` in order to actually start it.
|
||||
|
||||
⚠️⚠️⚠️ Please review the folder for documentation on each of the containers before adding them! Not reviewing the documentation for each of them first might break starting the AIO containers because some containers are not compatible with each other and more.
|
||||
|
||||
## How to add containers?
|
||||
Simply submit a PR by creating a new folder in this directory: https://github.com/nextcloud/all-in-one/tree/main/community-containers with the name of your container. It must include a json file with the same name and with correct syntax and a readme.md with additional information. You might get inspired by caddy, fail2ban, local-ai, libretranslate, plex, pi-hole or vaultwarden (subfolders in this directory). For a full-blown example of the json file, see https://github.com/nextcloud/all-in-one/blob/main/php/containers.json. The json-schema that it validates against can be found here: https://github.com/nextcloud/all-in-one/blob/main/php/containers-schema.json.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: nextcloud-aio # Add the container to the same compose project like all the sibling containers are added to automatically.
|
||||
name: nextcloud-aio # Add the container to the same compose project to which all the sibling containers are added automatically
|
||||
services:
|
||||
nextcloud-aio-mastercontainer:
|
||||
image: ghcr.io/nextcloud-releases/all-in-one:latest # This is the container image used. You can switch to ghcr.io/nextcloud-releases/all-in-one:beta if you want to help testing new releases. See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel
|
||||
@@ -15,13 +15,14 @@ services:
|
||||
- "80:80" # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
|
||||
- "8080:8080" # This is the AIO interface, served via https and self-signed certificate. See https://github.com/nextcloud/all-in-one#explanation-of-used-ports
|
||||
- "8443:8443" # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
|
||||
# security_opt: ["label:disable"] # Is needed when using SELinux. See https://github.com/nextcloud/all-in-one#are-there-known-problems-when-selinux-is-enabled
|
||||
# environment: # Is needed when using any of the options below
|
||||
# security_opt: ["label:disable"] # Needed when using SELinux. See https://github.com/nextcloud/all-in-one#are-there-known-problems-when-selinux-is-enabled
|
||||
# environment: # This line is needed (has to be uncommented) when using any of the options below
|
||||
# AIO_DISABLE_BACKUP_SECTION: false # Setting this to true allows to hide the backup section in the AIO interface. See https://github.com/nextcloud/all-in-one#how-to-disable-the-backup-section
|
||||
# APACHE_PORT: 11000 # Is needed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
|
||||
# APACHE_PORT: 11000 # Needed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
|
||||
# APACHE_IP_BINDING: 127.0.0.1 # Should be set when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) that is running on the same host. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
|
||||
# APACHE_ADDITIONAL_NETWORK: frontend_net # (Optional) Connect the apache container to an additional docker network. Needed when behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) running in a different docker network on same server. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
|
||||
# BORG_RETENTION_POLICY: --keep-within=7d --keep-weekly=4 --keep-monthly=6 # Allows to adjust borgs retention policy. See https://github.com/nextcloud/all-in-one#how-to-adjust-borgs-retention-policy
|
||||
# AIO_LOG_LEVEL: warn # Allows to globally adjust the log level of the included AIO components. Supported values: debug, info, warn, error. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-log-level-for-aio-components
|
||||
# COLLABORA_SECCOMP_DISABLED: false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature
|
||||
# DOCKER_API_VERSION: 1.44 # You can adjust the internally used docker api version with this variable. ⚠️⚠️⚠️ Warning: please note that only the default api version (unset this variable) is supported and tested by the maintainers of Nextcloud AIO. So use this on your own risk and things might break without warning. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-internally-used-docker-api-version
|
||||
# FULLTEXTSEARCH_JAVA_OPTIONS: "-Xms1024M -Xmx1024M" # Allows to adjust the fulltextsearch java options. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-fulltextsearch-java-options
|
||||
|
||||
@@ -3,15 +3,23 @@ It is possible due to several reasons that you do not want or cannot open Nextcl
|
||||
|
||||
### Content
|
||||
- [1. Tailscale](#1-tailscale)
|
||||
- [2. The normal way](#2-the-normal-way)
|
||||
- [3. Use the ACME DNS-challenge](#3-use-the-acme-dns-challenge)
|
||||
- [4. Use Cloudflare](#4-use-cloudflare)
|
||||
- [5. Buy a certificate and use that](#5-buy-a-certificate-and-use-that)
|
||||
- [2. Pangolin](#2-pangolin)
|
||||
- [3. The normal way](#3-the-normal-way)
|
||||
- [4. Use the ACME DNS-challenge](#4-use-the-acme-dns-challenge)
|
||||
- [5. Use Cloudflare](#5-use-cloudflare)
|
||||
- [6. Buy a certificate and use that](#6-buy-a-certificate-and-use-that)
|
||||
|
||||
## 1. Tailscale
|
||||
This is the recommended way. For a reverse proxy example guide for Tailscale, see this guide by [@Perseus333](https://github.com/Perseus333): https://github.com/nextcloud/all-in-one/discussions/6817
|
||||
|
||||
## 2. The normal way
|
||||
## 2. Pangolin
|
||||
[Pangolin](https://pangolin.net/) is an open-source, WireGuard-based remote access platform similar in concept to Tailscale. It uses the **Newt** connector to create outbound-only encrypted tunnels — no inbound ports need to be opened on your firewall. Pangolin handles TLS automatically, providing a valid certificate for your Nextcloud domain.
|
||||
|
||||
You can use either [Pangolin Cloud](https://app.pangolin.net/) (free tier available) or [self-host your own Pangolin server](https://docs.pangolin.net/self-host/quick-install) on a VPS. For private/local-only access, self-hosting Pangolin on a machine within your local network means that Nextcloud never needs to be exposed to the public internet.
|
||||
|
||||
For the reverse proxy configuration details and a step-by-step setup guide, see the [Pangolin section in the reverse proxy documentation](./reverse-proxy.md#pangolin).
|
||||
|
||||
## 3. The normal way
|
||||
The normal 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).
|
||||
@@ -21,12 +29,12 @@ The normal way is the following:
|
||||
|
||||
**Hint:** You may have a look at [this video](https://youtu.be/zk-y2wVkY4c) for a more complete but possibly outdated example.
|
||||
|
||||
## 3. Use the ACME DNS-challenge
|
||||
## 4. Use the ACME DNS-challenge
|
||||
You can alternatively use the ACME DNS-challenge to get a valid certificate for Nextcloud. Here is described how to set it up using an external caddy reverse proxy: https://github.com/nextcloud/all-in-one#how-to-get-nextcloud-running-using-the-acme-dns-challenge
|
||||
|
||||
## 4. Use Cloudflare
|
||||
## 5. Use Cloudflare
|
||||
If you do not have any control over the network, you may think about using Cloudflare Tunnel to get a valid certificate for your Nextcloud. However it will be opened to the public internet then. See https://github.com/nextcloud/all-in-one#how-to-run-nextcloud-behind-a-cloudflare-tunnel how to set this up.
|
||||
|
||||
## 5. Buy a certificate and use that
|
||||
## 6. Buy a certificate and use that
|
||||
If none of the above ways work for you, you may simply buy a certificate from an issuer for your domain. You then download the certificate onto your server, configure AIO in [reverse proxy mode](./reverse-proxy.md) and use the certificate for your domain in your reverse proxy config.
|
||||
|
||||
|
||||
@@ -39,13 +39,13 @@ services:
|
||||
- COLLABORA_HOST=nextcloud-aio-collabora
|
||||
- TALK_HOST=nextcloud-aio-talk
|
||||
- APACHE_PORT
|
||||
- AIO_LOG_LEVEL
|
||||
- ONLYOFFICE_HOST=nextcloud-aio-onlyoffice
|
||||
- TZ=${TIMEZONE}
|
||||
- APACHE_MAX_SIZE
|
||||
- APACHE_MAX_TIME=${NEXTCLOUD_MAX_TIME}
|
||||
- NOTIFY_PUSH_HOST=nextcloud-aio-notify-push
|
||||
- WHITEBOARD_HOST=nextcloud-aio-whiteboard
|
||||
- HARP_HOST=nextcloud-aio-harp
|
||||
volumes:
|
||||
- nextcloud_aio_nextcloud:/var/www/html:ro
|
||||
- nextcloud_aio_apache:/mnt/data:rw
|
||||
@@ -80,6 +80,7 @@ services:
|
||||
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
|
||||
- POSTGRES_DB=nextcloud_database
|
||||
- POSTGRES_USER=nextcloud
|
||||
- AIO_LOG_LEVEL
|
||||
- TZ=${TIMEZONE}
|
||||
- PGTZ=${TIMEZONE}
|
||||
stop_grace_period: 1800s
|
||||
@@ -149,6 +150,7 @@ services:
|
||||
- TURN_SECRET
|
||||
- SIGNALING_SECRET
|
||||
- ONLYOFFICE_SECRET
|
||||
- AIO_LOG_LEVEL
|
||||
- NEXTCLOUD_MOUNT
|
||||
- CLAMAV_ENABLED
|
||||
- CLAMAV_HOST=nextcloud-aio-clamav
|
||||
@@ -186,6 +188,7 @@ services:
|
||||
- WHITEBOARD_ENABLED
|
||||
stop_grace_period: 600s
|
||||
restart: unless-stopped
|
||||
shm_size: 134217728
|
||||
cap_drop:
|
||||
- NET_RAW
|
||||
|
||||
@@ -206,6 +209,7 @@ services:
|
||||
- nextcloud_aio_nextcloud:/var/www/html:ro
|
||||
environment:
|
||||
- NEXTCLOUD_HOST=nextcloud-aio-nextcloud
|
||||
- AIO_LOG_LEVEL
|
||||
- TZ=${TIMEZONE}
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
@@ -227,6 +231,7 @@ services:
|
||||
- "6379"
|
||||
environment:
|
||||
- REDIS_HOST_PASSWORD=${REDIS_PASSWORD}
|
||||
- AIO_LOG_LEVEL
|
||||
- TZ=${TIMEZONE}
|
||||
volumes:
|
||||
- nextcloud_aio_redis:/data:rw
|
||||
@@ -250,8 +255,9 @@ services:
|
||||
- "9980"
|
||||
environment:
|
||||
- aliasgroup1=https://${NC_DOMAIN}:443,http://nextcloud-aio-apache.nextcloud-aio:23973
|
||||
- extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.disable_server_audit=true --o:logging.level=warning --o:logging.level_startup=warning --o:welcome.enable=false --o:fetch_update_check=0 --o:allow_update_popup=false --o:remote_font_config.url=https://${NC_DOMAIN}/apps/richdocuments/settings/fonts.json --o:net.post_allow.host[0]=.+
|
||||
- extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.disable_server_audit=true --o:welcome.enable=false --o:fetch_update_check=0 --o:allow_update_popup=false --o:remote_font_config.url=https://${NC_DOMAIN}/apps/richdocuments/settings/fonts.json --o:net.post_allow.host[0]=.+
|
||||
- dictionaries=${COLLABORA_DICTIONARIES}
|
||||
- AIO_LOG_LEVEL
|
||||
- TZ=${TIMEZONE}
|
||||
- server_name=${NC_DOMAIN}
|
||||
- DONT_GEN_SSL_CERT=1
|
||||
@@ -292,6 +298,7 @@ services:
|
||||
- TALK_HOST=nextcloud-aio-talk
|
||||
- TURN_SECRET
|
||||
- SIGNALING_SECRET
|
||||
- AIO_LOG_LEVEL
|
||||
- TZ=${TIMEZONE}
|
||||
- TALK_PORT
|
||||
- INTERNAL_SECRET=${TALK_INTERNAL_SECRET}
|
||||
@@ -324,6 +331,7 @@ services:
|
||||
- "1234"
|
||||
environment:
|
||||
- NC_DOMAIN
|
||||
- AIO_LOG_LEVEL
|
||||
- TZ=${TIMEZONE}
|
||||
- RECORDING_SECRET
|
||||
- INTERNAL_SECRET=${TALK_INTERNAL_SECRET}
|
||||
@@ -353,6 +361,7 @@ services:
|
||||
expose:
|
||||
- "3310"
|
||||
environment:
|
||||
- AIO_LOG_LEVEL
|
||||
- TZ=${TIMEZONE}
|
||||
- MAX_SIZE=${NEXTCLOUD_UPLOAD_LIMIT}
|
||||
volumes:
|
||||
@@ -383,6 +392,8 @@ services:
|
||||
expose:
|
||||
- "80"
|
||||
environment:
|
||||
- AIO_LOG_LEVEL
|
||||
- LOG_LEVEL=${AIO_LOG_LEVEL}
|
||||
- TZ=${TIMEZONE}
|
||||
- JWT_ENABLED=true
|
||||
- JWT_HEADER=AuthorizationJwt
|
||||
@@ -409,6 +420,7 @@ services:
|
||||
expose:
|
||||
- "9000"
|
||||
environment:
|
||||
- AIO_LOG_LEVEL
|
||||
- TZ=${TIMEZONE}
|
||||
- IMAGINARY_SECRET
|
||||
restart: unless-stopped
|
||||
@@ -435,12 +447,12 @@ services:
|
||||
expose:
|
||||
- "9200"
|
||||
environment:
|
||||
- AIO_LOG_LEVEL
|
||||
- TZ=${TIMEZONE}
|
||||
- ES_JAVA_OPTS=${FULLTEXTSEARCH_JAVA_OPTIONS}
|
||||
- bootstrap.memory_lock=false
|
||||
- cluster.name=nextcloud-aio
|
||||
- discovery.type=single-node
|
||||
- logger.level=WARN
|
||||
- http.port=9200
|
||||
- xpack.license.self_generated.type=basic
|
||||
- xpack.security.enabled=false
|
||||
@@ -472,6 +484,7 @@ services:
|
||||
tmpfs:
|
||||
- /tmp
|
||||
environment:
|
||||
- AIO_LOG_LEVEL
|
||||
- TZ=${TIMEZONE}
|
||||
- NEXTCLOUD_URL=https://${NC_DOMAIN}
|
||||
- JWT_SECRET_KEY=${WHITEBOARD_SECRET}
|
||||
|
||||
@@ -21,6 +21,7 @@ TALK_ENABLED="no" # Setting this to "yes" (with quotes) enables the opt
|
||||
TALK_RECORDING_ENABLED="no" # Setting this to "yes" (with quotes) enables the option in Nextcloud automatically.
|
||||
WHITEBOARD_ENABLED="no" # Setting this to "yes" (with quotes) enables the option in Nextcloud automatically.
|
||||
|
||||
AIO_LOG_LEVEL=warn # Allows to adjust the global AIO log level. Valid values are debug, info, warn and error.
|
||||
APACHE_IP_BINDING=0.0.0.0 # This can be changed to e.g. 127.0.0.1 if you want to run AIO behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) and if that is running on the same host and using localhost to connect
|
||||
APACHE_MAX_SIZE=17179869184 # This needs to be an integer and in sync with NEXTCLOUD_UPLOAD_LIMIT
|
||||
APACHE_PORT=443 # Changing this to a different value than 443 will allow you to run it behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else).
|
||||
@@ -34,7 +35,7 @@ NEXTCLOUD_DATADIR=nextcloud_aio_nextcloud_data # You can change this to
|
||||
NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit of the Nextcloud container
|
||||
NEXTCLOUD_MEMORY_LIMIT=512M # This allows to change the PHP memory limit of the Nextcloud container
|
||||
NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR!
|
||||
NEXTCLOUD_STARTUP_APPS="deck twofactor_totp tasks calendar contacts notes" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time
|
||||
NEXTCLOUD_STARTUP_APPS="deck twofactor_totp tasks calendar contacts notes" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. You can also disable apps by using a hyphen in front of them. E.g. "-app_api"
|
||||
NEXTCLOUD_TRUSTED_CACERTS_DIR=/usr/local/share/ca-certificates/my-custom-ca # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory.
|
||||
NEXTCLOUD_UPLOAD_LIMIT=16G # This allows to change the upload limit of the Nextcloud container
|
||||
REMOVE_DISABLED_APPS=yes # Setting this to no keep Nextcloud apps that are disabled via their switch and not uninstall them if they should be installed in Nextcloud.
|
||||
|
||||
@@ -48,6 +48,7 @@ sed -i '/AIO_TOKEN/d' containers.yml
|
||||
sed -i '/AIO_URL/d' containers.yml
|
||||
sed -i '/DOCKER_SOCKET_PROXY_ENABLED/d' containers.yml
|
||||
sed -i '/HARP_ENABLED/d' containers.yml
|
||||
sed -i '/HARP_HOST/d' containers.yml
|
||||
sed -i '/HP_SHARED_KEY/d' containers.yml
|
||||
sed -i '/ADDITIONAL_TRUSTED_PROXY/d' containers.yml
|
||||
sed -i '/TURN_DOMAIN/d' containers.yml
|
||||
@@ -100,8 +101,9 @@ sed -i 's|NC_DOMAIN=|NC_DOMAIN=yourdomain.com # TODO! Needs to be chang
|
||||
sed -i 's|NEXTCLOUD_PASSWORD=|NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin".|' sample.conf
|
||||
sed -i 's|TIMEZONE=|TIMEZONE=Europe/Berlin # TODO! This is the timezone that your containers will use.|' sample.conf
|
||||
sed -i 's|COLLABORA_SECCOMP_POLICY=|COLLABORA_SECCOMP_POLICY=--o:security.seccomp=true # Changing the value to false allows to disable the seccomp feature of the Collabora container.|' sample.conf
|
||||
sed -i 's|AIO_LOG_LEVEL=|AIO_LOG_LEVEL=warn # Allows to adjust the global AIO log level. Valid values are debug, info, warn and error.|' sample.conf
|
||||
sed -i 's|FULLTEXTSEARCH_JAVA_OPTIONS=|FULLTEXTSEARCH_JAVA_OPTIONS="-Xms512M -Xmx512M" # Allows to adjust the fulltextsearch java options.|' sample.conf
|
||||
sed -i 's|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="deck twofactor_totp tasks calendar contacts notes" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time|' sample.conf
|
||||
sed -i 's|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="deck twofactor_totp tasks calendar contacts notes" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. You can also disable apps by using a hyphen in front of them. E.g. "-app_api"|' sample.conf
|
||||
sed -i 's|NEXTCLOUD_ADDITIONAL_APKS=|NEXTCLOUD_ADDITIONAL_APKS=imagemagick # This allows to add additional packages to the Nextcloud container permanently. Default is imagemagick but can be overwritten by modifying this value.|' sample.conf
|
||||
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
|
||||
|
||||
128
migration.md
128
migration.md
@@ -3,7 +3,7 @@
|
||||
There are basically three ways how to migrate from an already existing Nextcloud installation to Nextcloud AIO (if you ran AIO on the former installation already, you can follow [these steps](https://github.com/nextcloud/all-in-one#how-to-migrate-from-aio-to-aio)):
|
||||
|
||||
1. Migrate only the files which is the easiest way (this excludes all calendar data for example)
|
||||
1. Migrate the files and the database which is much more complicated (and doesn't work on former snap installations)
|
||||
1. Migrate the files and the database which is much more complicated (with special handling required for former snap installations, see [below](#migrating-from-a-snap-installation))
|
||||
1. Use the user_migration app that allows to migrate some of the user's data from a former instance to a new instance but needs to be done manually for each user
|
||||
|
||||
## Migrate only the files
|
||||
@@ -21,7 +21,7 @@ The procedure for migrating only the files works like this:
|
||||
1. If the restored data is older than any clients you want to continue to sync, for example if the server was down for a period of time during migration, you may want to take a look at [Synchronising with clients after migration](/migration.md#synchronising-with-clients-after-migration) below.
|
||||
|
||||
## Migrate the files and the database
|
||||
**Please note**: this is much more complicated than migrating only the files and also not as failproof so be warned! Also, this will not work on former snap installations as the snap is read-only and thus you cannot install the necessary `pdo_pgsql` PHP extension. So if migrating from snap, you will need to use one of the other methods. However you could try to ask if the snaps maintainer could add this one small PHP extension to the snap here: https://github.com/nextcloud-snap/nextcloud-snap/issues which would allow for an easy migration.
|
||||
**Please note**: this is much more complicated than migrating only the files and also not as failproof so be warned! If you are migrating from a snap installation, please first follow the [dedicated snap migration steps](#migrating-from-a-snap-installation) below, which show you how to perform the database conversion using a temporary Docker container. Once done, you can continue from step 5 of this guide.
|
||||
|
||||
The procedure for migrating the files and the database works like this:
|
||||
1. Make sure that your old instance is on exactly the same version like the version used in Nextcloud AIO. (e.g. 23.0.0) You can find the used version here: [click here](https://github.com/nextcloud/all-in-one/search?l=Dockerfile&q=NEXTCLOUD_VERSION&type=). If not, simply upgrade your former installation to that version or wait until the version used in Nextcloud AIO got updated to the same version of your former installation or the other way around.
|
||||
@@ -87,6 +87,130 @@ If not, feel free to restore the AIO instance from backup and start at step 8 ag
|
||||
|
||||
If the restored data is older than any clients you want to continue to sync, for example if the server was down for a period of time during migration, you may want to take a look at [Synchronising with clients after migration](/migration.md#synchronising-with-clients-after-migration) below.
|
||||
|
||||
### Migrating from a snap installation
|
||||
|
||||
**Disclaimer:** it might be possible that the guide below is not working 100% correctly, yet. Improvements to it are very welcome!
|
||||
|
||||
Since the Nextcloud snap is read-only, it is not possible to install the `pdo_pgsql` PHP extension inside the snap to perform the MySQL-to-PostgreSQL database conversion required by AIO. As a workaround, a temporary [nextcloud/docker](https://github.com/nextcloud/docker) container can be used as an intermediate environment that already includes `pdo_pgsql` and can convert the snap's MySQL database to PostgreSQL for you.
|
||||
|
||||
This procedure covers steps 1–3 of the regular migration above (version matching, app updates, and database conversion) and also produces the `database-dump.sql` needed for step 4. Once finished, continue from step 5 of the [Migrate the files and the database](#migrate-the-files-and-the-database) procedure above.
|
||||
|
||||
1. **Create a backup of the snap before doing anything else**, so you can restore the snap to its current state if anything goes wrong:
|
||||
```
|
||||
sudo snap save nextcloud
|
||||
```
|
||||
This creates a snapshot that can be restored later with `sudo snap restore <snapshot-id>`. The snapshot ID is shown in the output of `snap save`. You can also list existing snapshots with `snap saved`.
|
||||
1. Note the exact Nextcloud version of your snap installation:
|
||||
```
|
||||
sudo nextcloud.occ -V
|
||||
```
|
||||
1. Make sure that this version matches exactly the version used in Nextcloud AIO. You can find the AIO version here: [click here](https://github.com/nextcloud/all-in-one/search?l=Dockerfile&q=NEXTCLOUD_VERSION&type=). If they do not match, upgrade your snap with `sudo snap refresh nextcloud --channel=<major-version>/stable` or wait for AIO to be updated to the same version.
|
||||
1. Update all installed Nextcloud apps to their latest versions:
|
||||
```
|
||||
sudo nextcloud.occ app:update --all
|
||||
```
|
||||
1. Retrieve the necessary configuration values from the snap using `nextcloud.occ` and store them in environment variables. Do this **before** stopping the snap, as `nextcloud.occ` requires the snap services to be running:
|
||||
```
|
||||
export INSTANCEID=$(sudo nextcloud.occ config:system:get instanceid)
|
||||
export PASSWORDSALT=$(sudo nextcloud.occ config:system:get passwordsalt)
|
||||
export SECRET=$(sudo nextcloud.occ config:system:get secret)
|
||||
export TABLE_PREFIX=$(sudo nextcloud.occ config:system:get dbtableprefix || echo "oc_")
|
||||
export SNAP_DATA=$(sudo nextcloud.occ config:system:get datadirectory)
|
||||
# Note down SNAP_DATA — you will need it later when copying files
|
||||
echo "Snap data directory: $SNAP_DATA"
|
||||
```
|
||||
1. Export a dump of the snap's MySQL database:
|
||||
```
|
||||
sudo nextcloud.mysqldump > ~/mysql-dump.sql
|
||||
```
|
||||
1. Stop the snap to prevent further writes during the migration:
|
||||
```
|
||||
sudo snap stop nextcloud
|
||||
```
|
||||
1. Set up environment variables for the temporary containers (adjust the version and passwords as needed):
|
||||
```
|
||||
export NEXTCLOUD_VERSION="29.0.0" # Replace with the exact version from step 2
|
||||
export MYSQL_PASSWORD="mysql-temp-password"
|
||||
export PG_USER="ncadmin"
|
||||
export PG_PASSWORD="my-temporary-pg-password"
|
||||
export PG_DATABASE="nextcloud_db"
|
||||
```
|
||||
1. Create a Docker network for the temporary migration containers:
|
||||
```
|
||||
docker network create nextcloud-migration
|
||||
```
|
||||
1. Start a temporary MySQL container and import the snap database dump into it:
|
||||
```
|
||||
docker run -d \
|
||||
--name mysql-migration \
|
||||
--network nextcloud-migration \
|
||||
-e MYSQL_ROOT_PASSWORD="mysql-root-temp" \
|
||||
-e MYSQL_DATABASE="nextcloud" \
|
||||
-e MYSQL_USER="nextcloud" \
|
||||
-e MYSQL_PASSWORD="$MYSQL_PASSWORD" \
|
||||
mysql:8
|
||||
# Wait for MySQL to finish starting up before importing
|
||||
until docker exec mysql-migration mysqladmin ping -h localhost --silent 2>/dev/null; do sleep 1; done
|
||||
docker exec -i mysql-migration mysql -u nextcloud -p"$MYSQL_PASSWORD" nextcloud < ~/mysql-dump.sql
|
||||
```
|
||||
1. Start a temporary PostgreSQL container as the migration target:
|
||||
```
|
||||
docker run -d \
|
||||
--name postgres-migration \
|
||||
--network nextcloud-migration \
|
||||
-e POSTGRES_USER="$PG_USER" \
|
||||
-e POSTGRES_PASSWORD="$PG_PASSWORD" \
|
||||
-e POSTGRES_DB="$PG_DATABASE" \
|
||||
postgres:16
|
||||
```
|
||||
1. Create a temporary config file for the migration container using the values retrieved in step 5:
|
||||
```
|
||||
cat > /tmp/migration-config.php << EOF
|
||||
<?php
|
||||
\$CONFIG = array(
|
||||
'instanceid' => '$INSTANCEID',
|
||||
'passwordsalt' => '$PASSWORDSALT',
|
||||
'secret' => '$SECRET',
|
||||
'dbtype' => 'mysql',
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => 'mysql-migration',
|
||||
'dbport' => '',
|
||||
'dbtableprefix' => '$TABLE_PREFIX',
|
||||
'dbuser' => 'nextcloud',
|
||||
'dbpassword' => '$MYSQL_PASSWORD',
|
||||
'datadirectory' => '$SNAP_DATA',
|
||||
'installed' => true,
|
||||
);
|
||||
EOF
|
||||
```
|
||||
1. Run a temporary nextcloud/docker container to convert the MySQL database to PostgreSQL. Note that the container image version must match the Nextcloud version you noted in step 2, and that `pdo_pgsql` is already included in the `nextcloud` Docker image:
|
||||
```
|
||||
docker run --rm \
|
||||
--network nextcloud-migration \
|
||||
--entrypoint bash \
|
||||
-v /tmp/migration-config.php:/var/www/html/config/config.php:rw \
|
||||
-v "${SNAP_DATA}:${SNAP_DATA}:ro" \
|
||||
nextcloud:${NEXTCLOUD_VERSION}-apache \
|
||||
-c "php /var/www/html/occ db:convert-type --all-apps --password '$PG_PASSWORD' pgsql '$PG_USER' postgres-migration '$PG_DATABASE'"
|
||||
```
|
||||
**Please note:** The `occ` command may print a warning about being run as root — this can be safely ignored for this migration step.
|
||||
1. Export the converted PostgreSQL database:
|
||||
```
|
||||
docker exec postgres-migration pg_dump -U "$PG_USER" "$PG_DATABASE" > ~/database-dump.sql
|
||||
```
|
||||
**Please note:** The exact name of the database export file is important! (`database-dump.sql`)
|
||||
1. Clean up the temporary containers and network:
|
||||
```
|
||||
docker rm -f mysql-migration postgres-migration
|
||||
docker network rm nextcloud-migration
|
||||
```
|
||||
1. You now have a `~/database-dump.sql`. Continue from step 5 of the [Migrate the files and the database](#migrate-the-files-and-the-database) procedure above. When those steps ask for your old data directory path, use the `$SNAP_DATA` value noted in step 5 (typically `/var/snap/nextcloud/common`). If you have opened a new shell session since then, you can retrieve it again with `sudo nextcloud.occ config:system:get datadirectory` (requires the snap to be running) or read it directly from `/var/snap/nextcloud/current/nextcloud/config/config.php`.
|
||||
1. Once you have verified that the migration to AIO was successful and everything is working correctly, you can permanently remove the Nextcloud snap from your system:
|
||||
```
|
||||
sudo snap remove --purge nextcloud
|
||||
```
|
||||
The `--purge` flag removes the snap along with all its saved snapshots and data. Omit it if you want to keep the snap snapshots as a fallback. **Only do this after you are fully satisfied that your AIO instance is working correctly**, as this action cannot be undone.
|
||||
|
||||
## Use the user_migration app
|
||||
A new way since the Nextcloud update to 24 is to use the new [user_migration app](https://apps.nextcloud.com/apps/user_migration#app-gallery). It allows to export the most important data on one instance and import it on a different Nextcloud instance. For that, you need to install and enable the user_migration app on your old instance, trigger the export for the user, create the user on the new instance, log in with that user and import the archive that was created during the export. This then needs to be done for each user that you want to migrate.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: nextcloud-aio-helm-chart
|
||||
description: A generated Helm Chart for Nextcloud AIO from Skippbox Kompose
|
||||
version: 12.9.2
|
||||
version: 13.0.4
|
||||
apiVersion: v2
|
||||
keywords:
|
||||
- latest
|
||||
|
||||
@@ -37,6 +37,8 @@ spec:
|
||||
- env:
|
||||
- name: ADDITIONAL_TRUSTED_DOMAIN
|
||||
value: "{{ .Values.ADDITIONAL_TRUSTED_DOMAIN }}"
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: APACHE_HOST
|
||||
value: nextcloud-aio-apache
|
||||
- name: APACHE_MAX_SIZE
|
||||
@@ -63,7 +65,7 @@ spec:
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
- name: WHITEBOARD_HOST
|
||||
value: nextcloud-aio-whiteboard
|
||||
image: ghcr.io/nextcloud-releases/aio-apache:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-apache:20260515_145717
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
||||
@@ -36,7 +36,7 @@ spec:
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: init-subpath
|
||||
image: ghcr.io/nextcloud-releases/aio-alpine:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-alpine:20260515_145717
|
||||
command:
|
||||
- mkdir
|
||||
- "-p"
|
||||
@@ -55,11 +55,13 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- env:
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: MAX_SIZE
|
||||
value: "{{ .Values.NEXTCLOUD_UPLOAD_LIMIT }}"
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: ghcr.io/nextcloud-releases/aio-clamav:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-clamav:20260515_145717
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
||||
@@ -23,6 +23,8 @@ spec:
|
||||
containers:
|
||||
- args: {{ .Values.ADDITIONAL_COLLABORA_OPTIONS | default list | toJson }}
|
||||
env:
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: DONT_GEN_SSL_CERT
|
||||
value: "1"
|
||||
- name: TZ
|
||||
@@ -32,13 +34,13 @@ spec:
|
||||
- name: dictionaries
|
||||
value: "{{ .Values.COLLABORA_DICTIONARIES }}"
|
||||
- name: extra_params
|
||||
value: --o:ssl.enable=false --o:ssl.termination=true --o:logging.disable_server_audit=true --o:logging.level=warning --o:logging.level_startup=warning --o:welcome.enable=false --o:fetch_update_check=0 --o:allow_update_popup=false --o:remote_font_config.url=https://{{ .Values.NC_DOMAIN }}/apps/richdocuments/settings/fonts.json --o:net.post_allow.host[0]=.+
|
||||
value: --o:ssl.enable=false --o:ssl.termination=true --o:logging.disable_server_audit=true --o:welcome.enable=false --o:fetch_update_check=0 --o:allow_update_popup=false --o:remote_font_config.url=https://{{ .Values.NC_DOMAIN }}/apps/richdocuments/settings/fonts.json --o:net.post_allow.host[0]=.+
|
||||
- name: server_name
|
||||
value: "{{ .Values.NC_DOMAIN }}"
|
||||
{{- if contains "--o:support_key=" (join " " (.Values.ADDITIONAL_COLLABORA_OPTIONS | default list)) }}
|
||||
image: ghcr.io/nextcloud-releases/aio-collabora-online:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-collabora-online:20260515_145717
|
||||
{{- else }}
|
||||
image: ghcr.io/nextcloud-releases/aio-collabora:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-collabora:20260515_145717
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
|
||||
@@ -35,7 +35,7 @@ spec:
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: init-subpath
|
||||
image: ghcr.io/nextcloud-releases/aio-alpine:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-alpine:20260515_145717
|
||||
command:
|
||||
- mkdir
|
||||
- "-p"
|
||||
@@ -54,6 +54,8 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- env:
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: PGTZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
- name: POSTGRES_DB
|
||||
@@ -64,7 +66,7 @@ spec:
|
||||
value: nextcloud
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: ghcr.io/nextcloud-releases/aio-postgresql:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-postgresql:20260515_145717
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-volumes
|
||||
image: ghcr.io/nextcloud-releases/aio-alpine:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-alpine:20260515_145717
|
||||
command:
|
||||
- chmod
|
||||
- "777"
|
||||
@@ -34,6 +34,8 @@ spec:
|
||||
mountPath: /nextcloud-aio-elasticsearch
|
||||
containers:
|
||||
- env:
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: ES_JAVA_OPTS
|
||||
value: "{{ .Values.FULLTEXTSEARCH_JAVA_OPTIONS | default "-Xms512M -Xmx512M" }}"
|
||||
- name: FULLTEXTSEARCH_PASSWORD
|
||||
@@ -48,13 +50,17 @@ spec:
|
||||
value: single-node
|
||||
- name: http.port
|
||||
value: "9200"
|
||||
- name: logger.level
|
||||
value: WARN
|
||||
- name: indices.fielddata.cache.size
|
||||
value: 20%
|
||||
- name: indices.memory.index_buffer_size
|
||||
value: 20%
|
||||
- name: thread_pool.write.queue_size
|
||||
value: "1000"
|
||||
- name: xpack.license.self_generated.type
|
||||
value: basic
|
||||
- name: xpack.security.enabled
|
||||
value: "false"
|
||||
image: ghcr.io/nextcloud-releases/aio-fulltextsearch:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-fulltextsearch:20260515_145717
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
||||
@@ -34,11 +34,13 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- env:
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: IMAGINARY_SECRET
|
||||
value: "{{ .Values.IMAGINARY_SECRET }}"
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: ghcr.io/nextcloud-releases/aio-imaginary:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-imaginary:20260515_145717
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
||||
@@ -38,7 +38,7 @@ spec:
|
||||
# AIO settings start # Do not remove or change this line!
|
||||
initContainers:
|
||||
- name: init-volumes
|
||||
image: ghcr.io/nextcloud-releases/aio-alpine:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-alpine:20260515_145717
|
||||
command:
|
||||
- chmod
|
||||
- "777"
|
||||
@@ -92,6 +92,8 @@ spec:
|
||||
value: "{{ .Values.NEXTCLOUD_PASSWORD }}"
|
||||
- name: ADMIN_USER
|
||||
value: admin
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: APACHE_HOST
|
||||
value: nextcloud-aio-apache
|
||||
- name: APACHE_PORT
|
||||
@@ -190,7 +192,7 @@ spec:
|
||||
value: "{{ .Values.WHITEBOARD_ENABLED }}"
|
||||
- name: WHITEBOARD_SECRET
|
||||
value: "{{ .Values.WHITEBOARD_SECRET }}"
|
||||
image: ghcr.io/nextcloud-releases/aio-nextcloud:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-nextcloud:20260515_145717
|
||||
{{- if eq (.Values.RPSS_ENABLED | default "no") "yes" }} # AIO-config - do not change this comment!
|
||||
securityContext:
|
||||
# The items below only work in container context
|
||||
|
||||
@@ -35,11 +35,13 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- env:
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: NEXTCLOUD_HOST
|
||||
value: nextcloud-aio-nextcloud
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: ghcr.io/nextcloud-releases/aio-notify-push:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-notify-push:20260515_145717
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-volumes
|
||||
image: ghcr.io/nextcloud-releases/aio-alpine:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-alpine:20260515_145717
|
||||
command:
|
||||
- chmod
|
||||
- "777"
|
||||
@@ -34,15 +34,19 @@ spec:
|
||||
mountPath: /nextcloud-aio-onlyoffice
|
||||
containers:
|
||||
- env:
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: JWT_ENABLED
|
||||
value: "true"
|
||||
- name: JWT_HEADER
|
||||
value: AuthorizationJwt
|
||||
- name: JWT_SECRET
|
||||
value: "{{ .Values.ONLYOFFICE_SECRET }}"
|
||||
- name: LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: ghcr.io/nextcloud-releases/aio-onlyoffice:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-onlyoffice:20260515_145717
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
||||
@@ -35,11 +35,13 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- env:
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: REDIS_HOST_PASSWORD
|
||||
value: "{{ .Values.REDIS_PASSWORD }}"
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: ghcr.io/nextcloud-releases/aio-redis:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-redis:20260515_145717
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
||||
@@ -40,6 +40,8 @@ spec:
|
||||
value: "{{ .Values.TALK_MAX_STREAM_BITRATE }}"
|
||||
- name: TALK_MAX_SCREEN_BITRATE
|
||||
value: "{{ .Values.TALK_MAX_SCREEN_BITRATE }}"
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: INTERNAL_SECRET
|
||||
value: "{{ .Values.TALK_INTERNAL_SECRET }}"
|
||||
- name: NC_DOMAIN
|
||||
@@ -54,7 +56,7 @@ spec:
|
||||
value: "{{ .Values.TURN_SECRET }}"
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: ghcr.io/nextcloud-releases/aio-talk:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-talk:20260515_145717
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
||||
@@ -36,6 +36,8 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- env:
|
||||
- name: AIO_LOG_LEVEL
|
||||
value: "{{ .Values.AIO_LOG_LEVEL }}"
|
||||
- name: INTERNAL_SECRET
|
||||
value: "{{ .Values.TALK_INTERNAL_SECRET }}"
|
||||
- name: NC_DOMAIN
|
||||
@@ -44,7 +46,7 @@ spec:
|
||||
value: "{{ .Values.RECORDING_SECRET }}"
|
||||
- name: TZ
|
||||
value: "{{ .Values.TIMEZONE }}"
|
||||
image: ghcr.io/nextcloud-releases/aio-talk-recording:20260409_094910
|
||||
image: ghcr.io/nextcloud-releases/aio-talk-recording:20260515_145717
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user