mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-23 03:40:19 +00:00
Compare commits
1 Commits
main
...
alan/dev-s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a34327bd5a |
@@ -1,20 +0,0 @@
|
|||||||
# 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/collabora.yml
vendored
2
.github/workflows/collabora.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
mv cool-seccomp-profile.json php/
|
mv cool-seccomp-profile.json php/
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commit-message: collabora-seccomp-update automated change
|
commit-message: collabora-seccomp-update automated change
|
||||||
|
|||||||
2
.github/workflows/dependency-updates.yml
vendored
2
.github/workflows/dependency-updates.yml
vendored
@@ -53,7 +53,7 @@ jobs:
|
|||||||
sed -i "s|^ARG CADDY_REMOTE_HOST_HASH.*$|ARG CADDY_REMOTE_HOST_HASH=$CADDY_REMOTE_HOST_HASH|" ./Containers/mastercontainer/Dockerfile
|
sed -i "s|^ARG CADDY_REMOTE_HOST_HASH.*$|ARG CADDY_REMOTE_HOST_HASH=$CADDY_REMOTE_HOST_HASH|" ./Containers/mastercontainer/Dockerfile
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commit-message: php dependency updates
|
commit-message: php dependency updates
|
||||||
|
|||||||
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "Check latest published release isn't a prerelease"
|
- name: "Check latest published release isn't a prerelease"
|
||||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v6
|
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const tags = await github.rest.repos.listTags({
|
const tags = await github.rest.repos.listTags({
|
||||||
|
|||||||
7
.github/workflows/helm-release.yml
vendored
7
.github/workflows/helm-release.yml
vendored
@@ -10,16 +10,13 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Turnstyle
|
- name: Turnstyle
|
||||||
uses: softprops/turnstyle@e15e934b3f69ee283ba389ea05c8886baa656d93 # v2
|
uses: softprops/turnstyle@e565d2d86403c5d23533937e95980570545e5586 # v2
|
||||||
with:
|
with:
|
||||||
continue-after-seconds: 180
|
continue-after-seconds: 180
|
||||||
env:
|
env:
|
||||||
@@ -35,7 +32,7 @@ jobs:
|
|||||||
|
|
||||||
# See https://github.com/helm/chart-releaser-action/issues/6
|
# See https://github.com/helm/chart-releaser-action/issues/6
|
||||||
- name: Set up Helm
|
- name: Set up Helm
|
||||||
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
|
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
|
||||||
with:
|
with:
|
||||||
version: v3.6.3
|
version: v3.6.3
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/imaginary-update.yml
vendored
2
.github/workflows/imaginary-update.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
sed -i "s|^ENV IMAGINARY_HASH.*$|ENV IMAGINARY_HASH=$imaginary_version|" ./Containers/imaginary/Dockerfile
|
sed -i "s|^ENV IMAGINARY_HASH.*$|ENV IMAGINARY_HASH=$imaginary_version|" ./Containers/imaginary/Dockerfile
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commit-message: imaginary-update automated change
|
commit-message: imaginary-update automated change
|
||||||
|
|||||||
2
.github/workflows/lint-helm.yml
vendored
2
.github/workflows/lint-helm.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Helm
|
- name: Install Helm
|
||||||
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
|
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
|
||||||
with:
|
with:
|
||||||
version: v3.11.1
|
version: v3.11.1
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/lint-php.yml
vendored
2
.github/workflows/lint-php.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
- name: Set up php ${{ matrix.php-versions }}
|
||||||
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
|
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2.36.0
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
coverage: none
|
coverage: none
|
||||||
|
|||||||
2
.github/workflows/lint-yaml.yml
vendored
2
.github/workflows/lint-yaml.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
line-length: warning
|
line-length: warning
|
||||||
|
|
||||||
- name: Install the latest version of uv
|
- name: Install the latest version of uv
|
||||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
||||||
|
|
||||||
- name: Check GitHub actions
|
- name: Check GitHub actions
|
||||||
run: uvx zizmor --min-severity medium .github/workflows/*.yml
|
run: uvx zizmor --min-severity medium .github/workflows/*.yml
|
||||||
|
|||||||
2
.github/workflows/nextcloud-update.yml
vendored
2
.github/workflows/nextcloud-update.yml
vendored
@@ -79,7 +79,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commit-message: nextcloud-update automated change
|
commit-message: nextcloud-update automated change
|
||||||
|
|||||||
18
.github/workflows/playwright-on-push.yml
vendored
18
.github/workflows/playwright-on-push.yml
vendored
@@ -4,15 +4,11 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'php/**'
|
- 'php/**'
|
||||||
- 'Containers/mastercontainer/*.Caddyfile'
|
|
||||||
- 'Containers/mastercontainer/start.sh'
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'php/**'
|
- 'php/**'
|
||||||
- 'Containers/mastercontainer/*.Caddyfile'
|
|
||||||
- 'Containers/mastercontainer/start.sh'
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: playwright-${{ github.head_ref || github.run_id }}
|
group: playwright-${{ github.head_ref || github.run_id }}
|
||||||
@@ -30,7 +26,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
|
|
||||||
@@ -41,7 +37,7 @@ jobs:
|
|||||||
run: cd php/tests && npx playwright install --with-deps chromium
|
run: cd php/tests && npx playwright install --with-deps chromium
|
||||||
|
|
||||||
- name: Set up php 8.5
|
- name: Set up php 8.5
|
||||||
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
|
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2.36.0
|
||||||
with:
|
with:
|
||||||
extensions: apcu
|
extensions: apcu
|
||||||
php-version: 8.5
|
php-version: 8.5
|
||||||
@@ -57,7 +53,7 @@ jobs:
|
|||||||
rm -r ./session
|
rm -r ./session
|
||||||
composer install --no-dev
|
composer install --no-dev
|
||||||
composer clear-cache
|
composer clear-cache
|
||||||
sudo chmod 777 -R ../
|
sudo chmod 777 -R ./
|
||||||
|
|
||||||
- name: Start fresh development server
|
- name: Start fresh development server
|
||||||
run: |
|
run: |
|
||||||
@@ -72,9 +68,6 @@ jobs:
|
|||||||
--publish 8080:8080 \
|
--publish 8080:8080 \
|
||||||
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
|
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
|
||||||
--volume ./php:/var/www/docker-aio/php \
|
--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 \
|
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||||
--env SKIP_DOMAIN_VALIDATION=true \
|
--env SKIP_DOMAIN_VALIDATION=true \
|
||||||
--env APACHE_PORT=11000 \
|
--env APACHE_PORT=11000 \
|
||||||
@@ -104,9 +97,6 @@ jobs:
|
|||||||
--publish 8080:8080 \
|
--publish 8080:8080 \
|
||||||
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
|
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
|
||||||
--volume ./php:/var/www/docker-aio/php \
|
--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 \
|
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||||
--env SKIP_DOMAIN_VALIDATION=false \
|
--env SKIP_DOMAIN_VALIDATION=false \
|
||||||
--env APACHE_PORT=11000 \
|
--env APACHE_PORT=11000 \
|
||||||
@@ -124,7 +114,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
with:
|
with:
|
||||||
name: playwright-report
|
name: playwright-report
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
with:
|
with:
|
||||||
name: playwright-report
|
name: playwright-report
|
||||||
|
|||||||
2
.github/workflows/psalm-update-baseline.yml
vendored
2
.github/workflows/psalm-update-baseline.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commit-message: Update psalm baseline
|
commit-message: Update psalm baseline
|
||||||
|
|||||||
2
.github/workflows/psalm.yml
vendored
2
.github/workflows/psalm.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Set up php
|
- name: Set up php
|
||||||
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
|
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2.36.0
|
||||||
with:
|
with:
|
||||||
php-version: 8.5
|
php-version: 8.5
|
||||||
extensions: apcu
|
extensions: apcu
|
||||||
|
|||||||
140
.github/workflows/sync-workflow-templates.yml
vendored
140
.github/workflows/sync-workflow-templates.yml
vendored
@@ -1,140 +0,0 @@
|
|||||||
# This workflow is provided via the organization template repository
|
|
||||||
#
|
|
||||||
# https://github.com/nextcloud/.github
|
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
# This workflow will update all workflow templates
|
|
||||||
# Additionally it will reapply `workflow.yml.patch` files after syncing and only then commit the result
|
|
||||||
name: Update workflows
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: "5 2 * * 0"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
dispatch:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
branches:
|
|
||||||
- ${{ github.event.repository.default_branch }}
|
|
||||||
- 'stable33'
|
|
||||||
- 'stable32'
|
|
||||||
|
|
||||||
name: Update workflows in ${{ matrix.branches }}
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check actor permission
|
|
||||||
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0
|
|
||||||
with:
|
|
||||||
require: admin
|
|
||||||
|
|
||||||
- name: Checkout workflow repository
|
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
path: source
|
|
||||||
repository: nextcloud/.github
|
|
||||||
|
|
||||||
- name: Checkout app
|
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
path: target
|
|
||||||
ref: ${{ matrix.branches }}
|
|
||||||
|
|
||||||
- name: Copy all workflow templates
|
|
||||||
run: |
|
|
||||||
echo 'SUMMARY<<EOF' >> $GITHUB_ENV
|
|
||||||
draft_only=0
|
|
||||||
for workflow in ./source/workflow-templates/*.yml; do
|
|
||||||
echo "❓ Looking for $workflow"
|
|
||||||
if [ -f "$workflow" ]; then
|
|
||||||
filename=$(basename "$workflow")
|
|
||||||
target_file="./target/.github/workflows/$filename"
|
|
||||||
|
|
||||||
# Only copy if the file exists in the target repository
|
|
||||||
if [ -f "$target_file" ]; then
|
|
||||||
if [ -f "./target/.github/actions-lock.txt" ]; then
|
|
||||||
locked_version=$(grep " $filename" ./target/.github/actions-lock.txt | cat)
|
|
||||||
else
|
|
||||||
echo "# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors" >> ./target/.github/actions-lock.txt
|
|
||||||
echo "# SPDX-License""-Identifier: MIT" >> ./target/.github/actions-lock.txt
|
|
||||||
locked_version=""
|
|
||||||
fi
|
|
||||||
locked_version=$(echo $locked_version | cut -f 1 -d " ")
|
|
||||||
new_version=$(md5sum $workflow | cut -f 1 -d " ")
|
|
||||||
|
|
||||||
# Only update if the action changes
|
|
||||||
if [[ "$locked_version" != "$new_version" ]]; then
|
|
||||||
echo "ℹ️ Locked version: $locked_version"
|
|
||||||
echo "ℹ️ Current version: $new_version"
|
|
||||||
echo "🆙 Updating existing workflow: $filename"
|
|
||||||
echo "- 🆙 Updated [$filename](https://github.com/nextcloud/.github/commits/master/workflow-templates/$filename)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
cp "$workflow" "$target_file"
|
|
||||||
|
|
||||||
# Apply patch if one exists
|
|
||||||
if [ -f "$target_file.patch" ]; then
|
|
||||||
echo "🩹 Applying patch"
|
|
||||||
cd ./target
|
|
||||||
set +e
|
|
||||||
patch -p1 < ".github/workflows/$filename.patch"
|
|
||||||
patch_worked=$?
|
|
||||||
set -e
|
|
||||||
cd -
|
|
||||||
if [[ "$patch_worked" == "0" ]]; then
|
|
||||||
echo " - Patch applied" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo " - [ ] ❌ Patch failed" >> $GITHUB_ENV
|
|
||||||
draft_only=1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$locked_version" != "" ]]; then
|
|
||||||
sed -i "s/$locked_version $filename/$new_version $filename/" ./target/.github/actions-lock.txt
|
|
||||||
else
|
|
||||||
echo "$new_version $filename" >> ./target/.github/actions-lock.txt
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "✅ Skipping $filename: already up to date"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "⏭️ Skipping $filename: does not exist in target repository"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo 'EOF' >> $GITHUB_ENV
|
|
||||||
echo "DRAFT_ONLY=${draft_only}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.COMMAND_BOT_WORKFLOWS }} # zizmor: ignore[secrets-outside-env]
|
|
||||||
commit-message: 'ci(actions): Update workflow templates from organization template repository'
|
|
||||||
committer: GitHub <noreply@github.com>
|
|
||||||
author: nextcloud-command <nextcloud-command@users.noreply.github.com>
|
|
||||||
path: target
|
|
||||||
signoff: true
|
|
||||||
branch: 'automated/noid/${{ matrix.branches }}-update-workflows'
|
|
||||||
title: '[${{ matrix.branches }}] ci(actions): Update workflow templates from organization template repository'
|
|
||||||
draft: ${{ env.DRAFT_ONLY == 1 }}
|
|
||||||
add-paths: .github/workflows/*.yml,.github/actions-lock.txt
|
|
||||||
body: |
|
|
||||||
Automated update of all workflow templates from [nextcloud/.github](https://github.com/nextcloud/.github)
|
|
||||||
${{ env.SUMMARY }}
|
|
||||||
labels: |
|
|
||||||
dependencies
|
|
||||||
3. to review
|
|
||||||
2
.github/workflows/talk.yml
vendored
2
.github/workflows/talk.yml
vendored
@@ -45,7 +45,7 @@ jobs:
|
|||||||
sed -i "s|^ARG JANUS_VERSION=.*$|ARG JANUS_VERSION=$janus_version|" ./Containers/talk/Dockerfile
|
sed -i "s|^ARG JANUS_VERSION=.*$|ARG JANUS_VERSION=$janus_version|" ./Containers/talk/Dockerfile
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commit-message: talk-update automated change
|
commit-message: talk-update automated change
|
||||||
|
|||||||
2
.github/workflows/update-helm.yml
vendored
2
.github/workflows/update-helm.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
sudo bash nextcloud-aio-helm-chart/update-helm.sh "$DOCKER_TAG"
|
sudo bash nextcloud-aio-helm-chart/update-helm.sh "$DOCKER_TAG"
|
||||||
fi
|
fi
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
|
||||||
with:
|
with:
|
||||||
commit-message: Helm Chart updates
|
commit-message: Helm Chart updates
|
||||||
signoff: true
|
signoff: true
|
||||||
|
|||||||
2
.github/workflows/update-yaml.yml
vendored
2
.github/workflows/update-yaml.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo bash manual-install/update-yaml.sh
|
sudo bash manual-install/update-yaml.sh
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
|
||||||
with:
|
with:
|
||||||
commit-message: Yaml updates
|
commit-message: Yaml updates
|
||||||
signoff: true
|
signoff: true
|
||||||
|
|||||||
2
.github/workflows/watchtower-update.yml
vendored
2
.github/workflows/watchtower-update.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
sed -i "s|\$WATCHTOWER_COMMIT_HASH.*$|\$WATCHTOWER_COMMIT_HASH # $watchtower_version|" ./Containers/watchtower/Dockerfile
|
sed -i "s|\$WATCHTOWER_COMMIT_HASH.*$|\$WATCHTOWER_COMMIT_HASH # $watchtower_version|" ./Containers/watchtower/Dockerfile
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commit-message: watchtower-update automated change
|
commit-message: watchtower-update automated change
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM alpine:3.23.4
|
FROM alpine:3.23.3
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk upgrade --no-cache -a
|
apk upgrade --no-cache -a
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Alpine for Nextcloud AIO" \
|
LABEL org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Minimal Alpine Linux image for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -17,13 +17,8 @@
|
|||||||
https://{$ADDITIONAL_TRUSTED_DOMAIN}:443,
|
https://{$ADDITIONAL_TRUSTED_DOMAIN}:443,
|
||||||
http://{$APACHE_HOST}.nextcloud-aio:23973, # For Collabora callback and WOPI requests, see containers.json
|
http://{$APACHE_HOST}.nextcloud-aio:23973, # For Collabora callback and WOPI requests, see containers.json
|
||||||
{$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} {
|
{$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} {
|
||||||
header {
|
header -Server
|
||||||
Strict-Transport-Security max-age=31536000;
|
header -X-Powered-By
|
||||||
|
|
||||||
-Server
|
|
||||||
-X-Powered-By
|
|
||||||
-Via
|
|
||||||
}
|
|
||||||
|
|
||||||
# Collabora
|
# Collabora
|
||||||
route /browser/* {
|
route /browser/* {
|
||||||
@@ -70,6 +65,7 @@ http://{$APACHE_HOST}.nextcloud-aio:23973, # For Collabora callback and WOPI req
|
|||||||
|
|
||||||
# Nextcloud
|
# Nextcloud
|
||||||
route {
|
route {
|
||||||
|
header Strict-Transport-Security max-age=31536000;
|
||||||
reverse_proxy 127.0.0.1:8000
|
reverse_proxy 127.0.0.1:8000
|
||||||
}
|
}
|
||||||
redir /.well-known/carddav /remote.php/dav/ 301
|
redir /.well-known/carddav /remote.php/dav/ 301
|
||||||
@@ -78,9 +74,6 @@ http://{$APACHE_HOST}.nextcloud-aio:23973, # For Collabora callback and WOPI req
|
|||||||
# TLS options
|
# TLS options
|
||||||
tls {
|
tls {
|
||||||
issuer acme {
|
issuer acme {
|
||||||
profile shortlived
|
|
||||||
# Disable HTTP challenge because that would require port 80, which we don't get (it's exposed to the mastercontainer).
|
|
||||||
# This container by default only exposes port 443 if not configured otherwise via APACHE_PORT.
|
|
||||||
disable_http_challenge
|
disable_http_challenge
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM caddy:2.11.3-alpine AS caddy
|
FROM caddy:2.11.2-alpine AS caddy
|
||||||
|
|
||||||
# From https://github.com/docker-library/httpd/blob/master/2.4/alpine/Dockerfile
|
# From https://github.com/docker-library/httpd/blob/master/2.4/alpine/Dockerfile
|
||||||
FROM httpd:2.4.67-alpine3.23
|
FROM httpd:2.4.66-alpine3.23
|
||||||
|
|
||||||
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
|
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
|
||||||
|
|
||||||
@@ -60,19 +60,6 @@ RUN set -ex; \
|
|||||||
grep -q '<IfModule mpm_event_module>' /usr/local/apache2/conf/extra/httpd-mpm.conf; \
|
grep -q '<IfModule mpm_event_module>' /usr/local/apache2/conf/extra/httpd-mpm.conf; \
|
||||||
# ServerLimit needs to be set to MaxRequestWorkers divided by ThreadsPerChild which is set to 25 by default
|
# ServerLimit needs to be set to MaxRequestWorkers divided by ThreadsPerChild which is set to 25 by default
|
||||||
sed -i '/<IfModule mpm_event_module>/a\ \ \ \ ServerLimit 200' /usr/local/apache2/conf/extra/httpd-mpm.conf; \
|
sed -i '/<IfModule mpm_event_module>/a\ \ \ \ ServerLimit 200' /usr/local/apache2/conf/extra/httpd-mpm.conf; \
|
||||||
# Pin ThreadsPerChild so the value is deterministic regardless of the httpd base-image
|
|
||||||
# defaults; 25 threads per process balances concurrency against per-process memory use.
|
|
||||||
sed -i 's|ThreadsPerChild.*|ThreadsPerChild 25|' /usr/local/apache2/conf/extra/httpd-mpm.conf; \
|
|
||||||
# Start two server processes on boot to absorb the first requests without spawning
|
|
||||||
# new processes on the critical path, while avoiding unnecessary memory overhead.
|
|
||||||
sed -i 's|StartServers.*|StartServers 2|' /usr/local/apache2/conf/extra/httpd-mpm.conf; \
|
|
||||||
# Keep at least 25 idle threads (one full process worth) so traffic bursts can be
|
|
||||||
# absorbed immediately without triggering new process creation.
|
|
||||||
sed -i 's|MinSpareThreads.*|MinSpareThreads 25|' /usr/local/apache2/conf/extra/httpd-mpm.conf; \
|
|
||||||
# Retire idle threads above 50 to reclaim memory during quiet periods. 50 is the
|
|
||||||
# minimum valid value (MinSpareThreads + ThreadsPerChild = 25 + 25) and is enough
|
|
||||||
# to absorb typical bursts without respawning a new process.
|
|
||||||
sed -i 's|MaxSpareThreads.*|MaxSpareThreads 50|' /usr/local/apache2/conf/extra/httpd-mpm.conf; \
|
|
||||||
\
|
\
|
||||||
rm -rf /usr/local/apache2/conf/original /var/www; \
|
rm -rf /usr/local/apache2/conf/original /var/www; \
|
||||||
mkdir -p /var/www; \
|
mkdir -p /var/www; \
|
||||||
@@ -103,9 +90,4 @@ CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
|||||||
HEALTHCHECK CMD /healthcheck.sh
|
HEALTHCHECK CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Apache and Caddy for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Apache HTTP server with Caddy for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
nc -z "$NEXTCLOUD_HOST" 9000 || exit 0
|
nc -z "$NEXTCLOUD_HOST" 9000 || exit 0
|
||||||
nc -z 127.0.0.1 8000 || exit 1
|
nc -z 127.0.0.1 8000 || exit 1
|
||||||
nc -z 127.0.0.1 "$APACHE_PORT" || exit 1
|
nc -z 127.0.0.1 "$APACHE_PORT" || exit 1
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Listen 8000
|
|||||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
|
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
|
||||||
ErrorLog /proc/self/fd/2
|
ErrorLog /proc/self/fd/2
|
||||||
ErrorLogFormat "[%t] [%l] [%E] [client: %{X-Forwarded-For}i] [%M] [%{User-Agent}i]"
|
ErrorLogFormat "[%t] [%l] [%E] [client: %{X-Forwarded-For}i] [%M] [%{User-Agent}i]"
|
||||||
LogLevel ${AIO_LOG_LEVEL}
|
LogLevel warn
|
||||||
|
|
||||||
# PHP match
|
# PHP match
|
||||||
<FilesMatch "\.php$">
|
<FilesMatch "\.php$">
|
||||||
@@ -17,9 +17,7 @@ Listen 8000
|
|||||||
<Proxy "fcgi://${NEXTCLOUD_HOST}:9000" flushpackets=on>
|
<Proxy "fcgi://${NEXTCLOUD_HOST}:9000" flushpackets=on>
|
||||||
</Proxy>
|
</Proxy>
|
||||||
|
|
||||||
# Compress JS, CSS and SVG responses with Brotli.
|
# Enable Brotli compression for js, css and svg files - other plain files are compressed by Nextcloud by default
|
||||||
# Other plain-text files are already compressed by Nextcloud itself.
|
|
||||||
# Desktop and mobile sync clients never request JS/CSS/SVG assets.
|
|
||||||
<IfModule mod_brotli.c>
|
<IfModule mod_brotli.c>
|
||||||
AddOutputFilterByType BROTLI_COMPRESS text/javascript application/javascript application/x-javascript text/css image/svg+xml
|
AddOutputFilterByType BROTLI_COMPRESS text/javascript application/javascript application/x-javascript text/css image/svg+xml
|
||||||
BrotliCompressionQuality 0
|
BrotliCompressionQuality 0
|
||||||
@@ -28,9 +26,11 @@ Listen 8000
|
|||||||
# Nextcloud dir
|
# Nextcloud dir
|
||||||
DocumentRoot /var/www/html/
|
DocumentRoot /var/www/html/
|
||||||
<Directory /var/www/html/>
|
<Directory /var/www/html/>
|
||||||
Options FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks
|
||||||
Require all granted
|
Require all granted
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
|
Options FollowSymLinks MultiViews
|
||||||
|
Satisfy Any
|
||||||
<IfModule mod_dav.c>
|
<IfModule mod_dav.c>
|
||||||
Dav off
|
Dav off
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$NC_DOMAIN" ]; then
|
if [ -z "$NC_DOMAIN" ]; then
|
||||||
echo "NC_DOMAIN and NEXTCLOUD_HOST need to be provided. Exiting!"
|
echo "NC_DOMAIN and NEXTCLOUD_HOST need to be provided. Exiting!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
export SUPERVISORD_STDOUT=/dev/stdout
|
|
||||||
else
|
|
||||||
export SUPERVISORD_STDOUT=NONE
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Need write access to /mnt/data
|
# Need write access to /mnt/data
|
||||||
if ! [ -w /mnt/data ]; then
|
if ! [ -w /mnt/data ]; then
|
||||||
echo "Cannot write to /mnt/data"
|
echo "Cannot write to /mnt/data"
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
[supervisord]
|
[supervisord]
|
||||||
nodaemon=true
|
nodaemon=true
|
||||||
|
nodaemon=true
|
||||||
logfile=/var/log/supervisord/supervisord.log
|
logfile=/var/log/supervisord/supervisord.log
|
||||||
pidfile=/var/run/supervisord/supervisord.pid
|
pidfile=/var/run/supervisord/supervisord.pid
|
||||||
childlogdir=/var/log/supervisord/
|
childlogdir=/var/log/supervisord/
|
||||||
logfile_maxbytes=50MB
|
logfile_maxbytes=50MB
|
||||||
logfile_backups=10
|
logfile_backups=10
|
||||||
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
loglevel=error
|
||||||
|
|
||||||
[program:apache]
|
[program:apache]
|
||||||
# Stdout logging is disabled as otherwise the logs are spammed
|
# Stdout logging is disabled as otherwise the logs are spammed
|
||||||
stdout_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
stdout_logfile=NONE
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=httpd -DFOREGROUND
|
command=apachectl -DFOREGROUND
|
||||||
|
|
||||||
[program:caddy]
|
[program:caddy]
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM alpine:3.23.4
|
FROM alpine:3.23.3
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
@@ -25,11 +25,5 @@ USER root
|
|||||||
|
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Borgbackup for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="BorgBackup-based backup service for Nextcloud All-in-One" \
|
ENV BORG_RETENTION_POLICY="--keep-within=7d --keep-weekly=4 --keep-monthly=6"
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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" \
|
|
||||||
AIO_LOG_LEVEL="warn"
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
get_start_time(){
|
get_start_time(){
|
||||||
START_TIME=$(date +%s)
|
START_TIME=$(date +%s)
|
||||||
@@ -44,7 +40,7 @@ if [ -z "$BORG_REMOTE_REPO" ] && ! mountpoint -q "$MOUNT_DIR"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if repo is uninitialized
|
# Check if repo is uninitialized
|
||||||
if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != test ] && ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != test ] && ! borg info > /dev/null; then
|
||||||
if [ -n "$BORG_REMOTE_REPO" ]; then
|
if [ -n "$BORG_REMOTE_REPO" ]; then
|
||||||
echo "The repository is uninitialized or cannot connect to remote. Cannot perform check or restore."
|
echo "The repository is uninitialized or cannot connect to remote. Cannot perform check or restore."
|
||||||
else
|
else
|
||||||
@@ -127,7 +123,7 @@ if [ "$BORG_MODE" = backup ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Initialize the repository if can't get info from target
|
# Initialize the repository if can't get info from target
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
if ! borg info > /dev/null; then
|
||||||
# Don't initialize if already initialized
|
# Don't initialize if already initialized
|
||||||
if [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" ]; then
|
if [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" ]; then
|
||||||
if [ -n "$BORG_REMOTE_REPO" ]; then
|
if [ -n "$BORG_REMOTE_REPO" ]; then
|
||||||
@@ -144,14 +140,14 @@ if [ "$BORG_MODE" = backup ]; then
|
|||||||
|
|
||||||
echo "Initializing repository..."
|
echo "Initializing repository..."
|
||||||
NEW_REPOSITORY=1
|
NEW_REPOSITORY=1
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" init --encryption=repokey-blake2; then
|
if ! borg init --debug --encryption=repokey-blake2; then
|
||||||
echo "Could not initialize borg repository."
|
echo "Could not initialize borg repository."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$BORG_REMOTE_REPO" ]; then
|
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 only works for local repos; it's up to the remote to ensure the disk isn't full
|
||||||
borg "$BORG_LOG_LEVEL_FLAG" config :: additional_free_space 2G
|
borg config :: additional_free_space 2G
|
||||||
|
|
||||||
# Fix too large Borg cache
|
# 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
|
# https://borgbackup.readthedocs.io/en/stable/faq.html#the-borg-cache-eats-way-too-much-disk-space-what-can-i-do
|
||||||
@@ -160,7 +156,7 @@ if [ "$BORG_MODE" = backup ]; then
|
|||||||
touch "/root/.cache/borg/$BORG_ID/chunks.archive.d"
|
touch "/root/.cache/borg/$BORG_ID/chunks.archive.d"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
if ! borg info > /dev/null; then
|
||||||
echo "Borg can't get info from the repo it created. Something is wrong."
|
echo "Borg can't get info from the repo it created. Something is wrong."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -220,9 +216,9 @@ if [ "$BORG_MODE" = backup ]; then
|
|||||||
# Create the backup
|
# Create the backup
|
||||||
echo "Starting the backup..."
|
echo "Starting the backup..."
|
||||||
get_start_time
|
get_start_time
|
||||||
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
|
if ! borg 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..."
|
echo "Deleting the failed backup archive..."
|
||||||
borg "$BORG_LOG_LEVEL_FLAG" delete --stats "::$CURRENT_DATE-nextcloud-aio"
|
borg delete --stats "::$CURRENT_DATE-nextcloud-aio"
|
||||||
echo "Backup failed!"
|
echo "Backup failed!"
|
||||||
echo "You might want to check the backup integrity via the AIO interface."
|
echo "You might want to check the backup integrity via the AIO interface."
|
||||||
if [ "$NEW_REPOSITORY" = 1 ]; then
|
if [ "$NEW_REPOSITORY" = 1 ]; then
|
||||||
@@ -241,14 +237,14 @@ if [ "$BORG_MODE" = backup ]; then
|
|||||||
|
|
||||||
# Prune archives
|
# Prune archives
|
||||||
echo "Pruning the archives..."
|
echo "Pruning the archives..."
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" prune --stats --glob-archives '*_*-nextcloud-aio' "${BORG_PRUNE_OPTS[@]}"; then
|
if ! borg prune --stats --glob-archives '*_*-nextcloud-aio' "${BORG_PRUNE_OPTS[@]}"; then
|
||||||
echo "Failed to prune archives!"
|
echo "Failed to prune archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Compact archives
|
# Compact archives
|
||||||
echo "Compacting the archives..."
|
echo "Compacting the archives..."
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" compact; then
|
if ! borg compact; then
|
||||||
echo "Failed to compact archives!"
|
echo "Failed to compact archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -265,19 +261,19 @@ if [ "$BORG_MODE" = backup ]; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "Starting the backup for additional volumes..."
|
echo "Starting the backup for additional volumes..."
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" create "${BORG_OPTS[@]}" "::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then
|
if ! borg create "${BORG_OPTS[@]}" "::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then
|
||||||
echo "Deleting the failed backup archive..."
|
echo "Deleting the failed backup archive..."
|
||||||
borg "$BORG_LOG_LEVEL_FLAG" delete --stats "::$CURRENT_DATE-additional-docker-volumes"
|
borg delete --stats "::$CURRENT_DATE-additional-docker-volumes"
|
||||||
echo "Backup of additional docker-volumes failed!"
|
echo "Backup of additional docker-volumes failed!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Pruning additional volumes..."
|
echo "Pruning additional volumes..."
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" prune --stats --glob-archives '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then
|
if ! borg prune --stats --glob-archives '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then
|
||||||
echo "Failed to prune additional docker-volumes archives!"
|
echo "Failed to prune additional docker-volumes archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Compacting additional volumes..."
|
echo "Compacting additional volumes..."
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" compact; then
|
if ! borg compact; then
|
||||||
echo "Failed to compact additional docker-volume archives!"
|
echo "Failed to compact additional docker-volume archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -295,19 +291,19 @@ if [ "$BORG_MODE" = backup ]; then
|
|||||||
EXCLUDE_DIRS+=(--exclude "/host_mounts/$directory/")
|
EXCLUDE_DIRS+=(--exclude "/host_mounts/$directory/")
|
||||||
done
|
done
|
||||||
echo "Starting the backup for additional host mounts..."
|
echo "Starting the backup for additional host mounts..."
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then
|
if ! borg create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then
|
||||||
echo "Deleting the failed backup archive..."
|
echo "Deleting the failed backup archive..."
|
||||||
borg "$BORG_LOG_LEVEL_FLAG" delete --stats "::$CURRENT_DATE-additional-host-mounts"
|
borg delete --stats "::$CURRENT_DATE-additional-host-mounts"
|
||||||
echo "Backup of additional host-mounts failed!"
|
echo "Backup of additional host-mounts failed!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Pruning additional host mounts..."
|
echo "Pruning additional host mounts..."
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" prune --stats --glob-archives '*_*-additional-host-mounts' "${BORG_PRUNE_OPTS[@]}"; then
|
if ! borg prune --stats --glob-archives '*_*-additional-host-mounts' "${BORG_PRUNE_OPTS[@]}"; then
|
||||||
echo "Failed to prune additional host-mount archives!"
|
echo "Failed to prune additional host-mount archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Compacting additional host mounts..."
|
echo "Compacting additional host mounts..."
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" compact; then
|
if ! borg compact; then
|
||||||
echo "Failed to compact additional host-mount archives!"
|
echo "Failed to compact additional host-mount archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -389,7 +385,7 @@ if [ "$BORG_MODE" = restore ]; then
|
|||||||
|
|
||||||
if [ -z "$BORG_REMOTE_REPO" ]; then
|
if [ -z "$BORG_REMOTE_REPO" ]; then
|
||||||
mkdir -p /tmp/borg
|
mkdir -p /tmp/borg
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" mount "::$SELECTED_ARCHIVE" /tmp/borg; then
|
if ! borg mount "::$SELECTED_ARCHIVE" /tmp/borg; then
|
||||||
echo "Could not mount the backup!"
|
echo "Could not mount the backup!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -436,7 +432,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.
|
# 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
|
cd / # borg extract has no destination arg and extracts to CWD
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" extract "::$SELECTED_ARCHIVE" --progress --exclude-from /borg_excludes "${ADDITIONAL_BORG_EXCLUDES[@]}" --pattern '+nextcloud_aio_volumes/**'
|
if ! borg extract "::$SELECTED_ARCHIVE" --progress --exclude-from /borg_excludes "${ADDITIONAL_BORG_EXCLUDES[@]}" --pattern '+nextcloud_aio_volumes/**'
|
||||||
then
|
then
|
||||||
RESTORE_FAILED=1
|
RESTORE_FAILED=1
|
||||||
echo "Failed to extract backup archive."
|
echo "Failed to extract backup archive."
|
||||||
@@ -468,7 +464,7 @@ if [ "$BORG_MODE" = restore ]; then
|
|||||||
\) \
|
\) \
|
||||||
| LC_ALL=C sort \
|
| LC_ALL=C sort \
|
||||||
| LC_ALL=C comm -23 - \
|
| LC_ALL=C comm -23 - \
|
||||||
<(borg "$BORG_LOG_LEVEL_FLAG" list "::$SELECTED_ARCHIVE" --short --exclude-from /borg_excludes --pattern '+nextcloud_aio_volumes/**' | LC_ALL=C sort) \
|
<(borg list "::$SELECTED_ARCHIVE" --short --exclude-from /borg_excludes --pattern '+nextcloud_aio_volumes/**' | LC_ALL=C sort) \
|
||||||
> /tmp/local_files_not_in_backup
|
> /tmp/local_files_not_in_backup
|
||||||
then
|
then
|
||||||
RESTORE_FAILED=1
|
RESTORE_FAILED=1
|
||||||
@@ -556,7 +552,7 @@ if [ "$BORG_MODE" = check ]; then
|
|||||||
echo "Checking the backup integrity..."
|
echo "Checking the backup integrity..."
|
||||||
|
|
||||||
# Perform the check
|
# Perform the check
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" check -v --verify-data; then
|
if ! borg check -v --verify-data; then
|
||||||
echo "Some errors were found while checking the backup integrity!"
|
echo "Some errors were found while checking the backup integrity!"
|
||||||
echo "Check the AIO interface for advice on how to proceed now!"
|
echo "Check the AIO interface for advice on how to proceed now!"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -574,7 +570,7 @@ if [ "$BORG_MODE" = "check-repair" ]; then
|
|||||||
echo "Checking the backup integrity and repairing it..."
|
echo "Checking the backup integrity and repairing it..."
|
||||||
|
|
||||||
# Perform the check-repair
|
# Perform the check-repair
|
||||||
if ! echo YES | borg "$BORG_LOG_LEVEL_FLAG" check -v --repair; then
|
if ! echo YES | borg check -v --repair; then
|
||||||
echo "Some errors were found while checking and repairing the backup integrity!"
|
echo "Some errors were found while checking and repairing the backup integrity!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -588,7 +584,7 @@ fi
|
|||||||
# Do the backup test
|
# Do the backup test
|
||||||
if [ "$BORG_MODE" = test ]; then
|
if [ "$BORG_MODE" = test ]; then
|
||||||
if [ -n "$BORG_REMOTE_REPO" ]; then
|
if [ -n "$BORG_REMOTE_REPO" ]; then
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
if ! borg info > /dev/null; then
|
||||||
echo "Borg could not get info from the remote repo."
|
echo "Borg could not get info from the remote repo."
|
||||||
echo "See the above borg info output for details."
|
echo "See the above borg info output for details."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -609,12 +605,12 @@ if [ "$BORG_MODE" = test ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" list >/dev/null; then
|
if ! borg list >/dev/null; then
|
||||||
echo "The entered path seems to be valid but could not open the backup archive."
|
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!"
|
echo "Most likely the entered password was wrong so please adjust it accordingly!"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" list | grep "nextcloud-aio"; then
|
if ! borg list | grep "nextcloud-aio"; then
|
||||||
echo "The backup archive does not contain a valid Nextcloud AIO backup."
|
echo "The backup archive does not contain a valid Nextcloud AIO backup."
|
||||||
echo "Most likely was the archive not created via Nextcloud AIO."
|
echo "Most likely was the archive not created via Nextcloud AIO."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -627,7 +623,7 @@ fi
|
|||||||
|
|
||||||
if [ "$BORG_MODE" = list ]; then
|
if [ "$BORG_MODE" = list ]; then
|
||||||
echo "Updating backup list..."
|
echo "Updating backup list..."
|
||||||
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
if ! borg info > /dev/null; then
|
||||||
echo "Could not update the backup list."
|
echo "Could not update the backup list."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# Variables
|
||||||
export MOUNT_DIR="/mnt/borgbackup"
|
export MOUNT_DIR="/mnt/borgbackup"
|
||||||
export BORG_BACKUP_DIRECTORY="$MOUNT_DIR/borg" # necessary even when remote to store the aio-lockfile
|
export BORG_BACKUP_DIRECTORY="$MOUNT_DIR/borg" # necessary even when remote to store the aio-lockfile
|
||||||
@@ -59,7 +48,7 @@ fi
|
|||||||
rm -f "/nextcloud_aio_volumes/nextcloud_aio_database_dump/backup-is-running"
|
rm -f "/nextcloud_aio_volumes/nextcloud_aio_database_dump/backup-is-running"
|
||||||
|
|
||||||
# Get a list of all available borg archives
|
# Get a list of all available borg archives
|
||||||
if borg "$BORG_LOG_LEVEL_FLAG" list &>/dev/null; then
|
if borg 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"
|
borg list | grep "nextcloud-aio" | awk -F " " '{print $1","$3,$4}' > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
|
||||||
else
|
else
|
||||||
echo "" > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
|
echo "" > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM alpine:3.23.4
|
FROM alpine:3.23.3
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk upgrade --no-cache -a; \
|
apk upgrade --no-cache -a; \
|
||||||
@@ -13,15 +13,6 @@ RUN set -ex; \
|
|||||||
sed -i "s|#\?PCREMaxFileSize.*|PCREMaxFileSize 2000M|g" /etc/clamav/clamd.conf; \
|
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
|
# 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; \
|
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|#\?TCPSocket|TCPSocket|g" /etc/clamav/clamd.conf; \
|
||||||
sed -i "s|^LocalSocket .*|LocalSocket /tmp/clamd.sock|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; \
|
sed -i "s|Example| |g" /etc/clamav/clamav-milter.conf; \
|
||||||
@@ -43,10 +34,5 @@ ENTRYPOINT ["/start.sh"]
|
|||||||
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="ClamAV for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="ClamAV antivirus scanner for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
|
HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$(echo "PING" | nc 127.0.0.1 3310)" != "PONG" ]; then
|
if [ "$(echo "PING" | nc 127.0.0.1 3310)" != "PONG" ]; then
|
||||||
echo "ERROR: Unable to contact server"
|
echo "ERROR: Unable to contact server"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Print out clamav version for compliance reasons
|
# Print out clamav version for compliance reasons
|
||||||
clamscan --version
|
clamscan --version
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
[supervisord]
|
[supervisord]
|
||||||
nodaemon=true
|
nodaemon=true
|
||||||
|
nodaemon=true
|
||||||
logfile=/var/log/supervisord/supervisord.log
|
logfile=/var/log/supervisord/supervisord.log
|
||||||
pidfile=/var/run/supervisord/supervisord.pid
|
pidfile=/var/run/supervisord/supervisord.pid
|
||||||
childlogdir=/var/log/supervisord/
|
childlogdir=/var/log/supervisord/
|
||||||
logfile_maxbytes=50MB
|
logfile_maxbytes=50MB
|
||||||
logfile_backups=10
|
logfile_backups=10
|
||||||
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
loglevel=error
|
||||||
|
|
||||||
[program:freshclam]
|
[program:freshclam]
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
|
|||||||
@@ -13,9 +13,4 @@ USER 1001
|
|||||||
HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
|
HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Collabora Online for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Collabora Online document editor from upstream for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ FROM collabora/code:25.04.9.4.1
|
|||||||
USER root
|
USER root
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
COPY --chmod=775 start.sh /start.sh
|
|
||||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||||
|
|
||||||
USER 1001
|
USER 1001
|
||||||
@@ -13,11 +12,4 @@ USER 1001
|
|||||||
HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
|
HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Collabora for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Collabora CODE document editor for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"]
|
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
#!/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
|
# syntax=docker/dockerfile:latest
|
||||||
FROM haproxy:3.3.10-alpine
|
FROM haproxy:3.3.6-alpine
|
||||||
|
|
||||||
# hadolint ignore=DL3002
|
# hadolint ignore=DL3002
|
||||||
USER root
|
USER root
|
||||||
@@ -20,9 +20,4 @@ ENTRYPOINT ["/start.sh"]
|
|||||||
HEALTHCHECK CMD /healthcheck.sh
|
HEALTHCHECK CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Docker Socket Proxy for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="HAProxy-based Docker socket proxy for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
nc -z "$NEXTCLOUD_HOST" 9001 || exit 0
|
nc -z "$NEXTCLOUD_HOST" 9001 || exit 0
|
||||||
nc -z 127.0.0.1 2375 || exit 1
|
nc -z 127.0.0.1 2375 || exit 1
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Only start container if nextcloud is accessible
|
# Only start container if nextcloud is accessible
|
||||||
while ! nc -z "$NEXTCLOUD_HOST" 9001; do
|
while ! nc -z "$NEXTCLOUD_HOST" 9001; do
|
||||||
echo "Waiting for Nextcloud to start..."
|
echo "Waiting for Nextcloud to start..."
|
||||||
@@ -22,8 +18,6 @@ else
|
|||||||
HAPROXYFILE="$(sed "s# || { src NC_IPV6_PLACEHOLDER }##g" /tmp/haproxy.cfg)"
|
HAPROXYFILE="$(sed "s# || { src NC_IPV6_PLACEHOLDER }##g" /tmp/haproxy.cfg)"
|
||||||
fi
|
fi
|
||||||
echo "$HAPROXYFILE" > /tmp/haproxy.cfg
|
echo "$HAPROXYFILE" > /tmp/haproxy.cfg
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
|
|
||||||
haproxy -f /tmp/haproxy.cfg -db
|
haproxy -f /tmp/haproxy.cfg -db
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM alpine:3.23.4
|
FROM alpine:3.23.3
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk upgrade --no-cache -a; \
|
apk upgrade --no-cache -a; \
|
||||||
apk add --no-cache bash lighttpd netcat-openbsd; \
|
apk add --no-cache bash lighttpd netcat-openbsd; \
|
||||||
@@ -19,9 +19,4 @@ ENTRYPOINT ["/start.sh"]
|
|||||||
HEALTHCHECK CMD nc -z 127.0.0.1 $APACHE_PORT || exit 1
|
HEALTHCHECK CMD nc -z 127.0.0.1 $APACHE_PORT || exit 1
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Domain Check for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Domain validation service for Nextcloud All-in-One setup" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$INSTANCE_ID" ]; then
|
if [ -z "$INSTANCE_ID" ]; then
|
||||||
echo "You need to provide an instance id."
|
echo "You need to provide an instance id."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -18,20 +14,6 @@ fi
|
|||||||
CONF_FILE="$(sed "s|ipv6-placeholder|\[::\]:$APACHE_PORT|" /lighttpd.conf)"
|
CONF_FILE="$(sed "s|ipv6-placeholder|\[::\]:$APACHE_PORT|" /lighttpd.conf)"
|
||||||
echo "$CONF_FILE" > /etc/lighttpd/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
|
# Check config file
|
||||||
lighttpd -tt -f /etc/lighttpd/lighttpd.conf
|
lighttpd -tt -f /etc/lighttpd/lighttpd.conf
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
# Probably from here https://github.com/elastic/dockerfiles/blob/9.3/elasticsearch/Dockerfile
|
# Probably from here https://github.com/elastic/elasticsearch/blob/main/distribution/docker/src/docker/Dockerfile
|
||||||
FROM elasticsearch:9.4.1
|
FROM elasticsearch:8.19.13
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
# hadolint ignore=DL3041
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# hadolint ignore=DL3008
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
microdnf update -y; \
|
apt-get update; \
|
||||||
microdnf install -y --setopt=tsflags=nodocs \
|
apt-get upgrade -y; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
tzdata \
|
tzdata \
|
||||||
; \
|
; \
|
||||||
microdnf clean all;
|
rm -rf /var/lib/apt/lists/*;
|
||||||
|
|
||||||
COPY --chmod=775 start.sh /start.sh
|
|
||||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||||
|
|
||||||
USER 1000:0
|
USER 1000:0
|
||||||
@@ -21,12 +23,5 @@ USER 1000:0
|
|||||||
HEALTHCHECK --interval=10s --timeout=5s --start-period=1m --retries=5 CMD /healthcheck.sh
|
HEALTHCHECK --interval=10s --timeout=5s --start-period=1m --retries=5 CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Full Text Search for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Elasticsearch-based full-text search for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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 ES_JAVA_OPTS="-Xms512M -Xmx512M"
|
ENV ES_JAVA_OPTS="-Xms512M -Xmx512M"
|
||||||
|
|
||||||
ENTRYPOINT ["/start.sh"]
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
nc -z 127.0.0.1 9200 || exit 1
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
curl -fs "http://127.0.0.1:9200/_cluster/health?filter_path=status" | grep -qE '"status":"(green|yellow)"' || exit 1
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/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
|
# syntax=docker/dockerfile:latest
|
||||||
FROM golang:1.26.3-alpine3.23 AS go
|
FROM golang:1.26.1-alpine3.23 AS go
|
||||||
|
|
||||||
ENV IMAGINARY_HASH=6a274b488759a896aff02f52afee6e50b5e3a3ee
|
ENV IMAGINARY_HASH=6a274b488759a896aff02f52afee6e50b5e3a3ee
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ RUN set -ex; \
|
|||||||
build-base; \
|
build-base; \
|
||||||
go install github.com/h2non/imaginary@"$IMAGINARY_HASH";
|
go install github.com/h2non/imaginary@"$IMAGINARY_HASH";
|
||||||
|
|
||||||
FROM alpine:3.23.4
|
FROM alpine:3.23.3
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk upgrade --no-cache -a; \
|
apk upgrade --no-cache -a; \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
@@ -33,8 +33,7 @@ COPY --from=go /go/bin/imaginary /usr/local/bin/imaginary
|
|||||||
COPY --chmod=775 start.sh /start.sh
|
COPY --chmod=775 start.sh /start.sh
|
||||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||||
|
|
||||||
ENV PORT=9000 \
|
ENV PORT=9000
|
||||||
AIO_LOG_LEVEL=warn
|
|
||||||
|
|
||||||
USER 65534
|
USER 65534
|
||||||
|
|
||||||
@@ -45,9 +44,4 @@ ENTRYPOINT ["/start.sh"]
|
|||||||
HEALTHCHECK CMD /healthcheck.sh
|
HEALTHCHECK CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Imaginary for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="High-performance image processing service for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
nc -z 127.0.0.1 "$PORT" || exit 1
|
nc -z 127.0.0.1 "$PORT" || exit 1
|
||||||
|
|||||||
@@ -1,26 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/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"
|
echo "Imaginary has started"
|
||||||
|
if [ -z "$IMAGINARY_SECRET" ]; then
|
||||||
IMAGINARY_ARGS=(-return-size -max-allowed-resolution 222.2)
|
imaginary -return-size -max-allowed-resolution 222.2 "$@"
|
||||||
|
else
|
||||||
if [ -n "$IMAGINARY_SECRET" ]; then
|
imaginary -return-size -max-allowed-resolution 222.2 -key "$IMAGINARY_SECRET" "$@"
|
||||||
IMAGINARY_ARGS+=(-key "$IMAGINARY_SECRET")
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec imaginary "${IMAGINARY_ARGS[@]}" "$@"
|
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
# Docker CLI is a requirement
|
# Docker CLI is a requirement
|
||||||
FROM docker:29.5.2-cli AS docker
|
FROM docker:29.3.1-cli AS docker
|
||||||
|
|
||||||
ARG CADDY_REMOTE_HOST_HASH=e80a9931765a8dbcbb47db415863387f0df0e1b3
|
ARG CADDY_REMOTE_HOST_HASH=b21775afa730ffb52a24ddff310c8a6d1fd37276
|
||||||
|
|
||||||
# Caddy is a requirement
|
# Caddy is a requirement
|
||||||
FROM caddy:2.11.3-builder-alpine AS caddy
|
FROM caddy:2.11.2-builder-alpine AS caddy
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
xcaddy build --with github.com/muety/caddy-remote-host@"$CADDY_REMOTE_HOST_HASH"; \
|
xcaddy build --with github.com/muety/caddy-remote-host@"$CADDY_REMOTE_HOST_HASH"; \
|
||||||
/usr/bin/caddy list-modules
|
/usr/bin/caddy list-modules
|
||||||
|
|
||||||
# From https://github.com/docker-library/php/blob/master/8.5/alpine3.23/fpm/Dockerfile
|
# From https://github.com/docker-library/php/blob/master/8.5/alpine3.23/fpm/Dockerfile
|
||||||
FROM php:8.5.6-fpm-alpine3.23
|
FROM php:8.5.4-fpm-alpine3.23
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
@@ -53,16 +53,6 @@ RUN set -ex; \
|
|||||||
build-base; \
|
build-base; \
|
||||||
pecl install APCu-5.1.28; \
|
pecl install APCu-5.1.28; \
|
||||||
docker-php-ext-enable apcu; \
|
docker-php-ext-enable apcu; \
|
||||||
{ \
|
|
||||||
echo 'apc.shm_size=32M'; \
|
|
||||||
} >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
|
||||||
{ \
|
|
||||||
echo 'opcache.enable=1'; \
|
|
||||||
echo 'opcache.memory_consumption=32'; \
|
|
||||||
echo 'opcache.interned_strings_buffer=8'; \
|
|
||||||
echo 'opcache.max_accelerated_files=4000'; \
|
|
||||||
echo 'opcache.validate_timestamps=0'; \
|
|
||||||
} > /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini; \
|
|
||||||
rm -r /tmp/pear; \
|
rm -r /tmp/pear; \
|
||||||
runDeps="$( \
|
runDeps="$( \
|
||||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
||||||
@@ -100,12 +90,7 @@ RUN set -ex; \
|
|||||||
mkdir /var/run/supervisord;
|
mkdir /var/run/supervisord;
|
||||||
|
|
||||||
# hadolint ignore=DL3048
|
# hadolint ignore=DL3048
|
||||||
LABEL org.opencontainers.image.title="Nextcloud All-in-One Mastercontainer" \
|
LABEL org.label-schema.vendor="Nextcloud" \
|
||||||
org.opencontainers.image.description="Easy deployment and maintenance of a Nextcloud server with all dependencies and optional services" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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" \
|
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
com.docker.compose.project="nextcloud-aio"
|
com.docker.compose.project="nextcloud-aio"
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ http://:80 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
https://:8443 {
|
https://:8443 {
|
||||||
import headers.Caddyfile
|
|
||||||
header Strict-Transport-Security max-age=31536000;
|
|
||||||
|
|
||||||
@denied {
|
@denied {
|
||||||
path /api/auth/login /api/auth/getlogin
|
path /api/auth/login /api/auth/getlogin
|
||||||
remote_host nextcloud-aio-nextcloud
|
remote_host nextcloud-aio-nextcloud
|
||||||
@@ -49,7 +46,6 @@ https://:8443 {
|
|||||||
tls {
|
tls {
|
||||||
on_demand
|
on_demand
|
||||||
issuer acme {
|
issuer acme {
|
||||||
profile shortlived
|
|
||||||
disable_tlsalpn_challenge
|
disable_tlsalpn_challenge
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
restart_process() {
|
restart_process() {
|
||||||
echo "Restarting cron.sh because daily backup time was set, changed or unset."
|
echo "Restarting cron.sh because daily backup time was set, changed or unset."
|
||||||
pkill cron.sh
|
pkill cron.sh
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if [ -f "/mnt/docker-aio-config/data/daily_backup_time" ]; then
|
if [ -f "/mnt/docker-aio-config/data/daily_backup_time" ]; then
|
||||||
set -x
|
set -x
|
||||||
@@ -21,9 +17,7 @@ while true; do
|
|||||||
else
|
else
|
||||||
export SEND_SUCCESS_NOTIFICATIONS=0
|
export SEND_SUCCESS_NOTIFICATIONS=0
|
||||||
fi
|
fi
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
if [ -f "/mnt/docker-aio-config/data/daily_backup_running" ]; then
|
if [ -f "/mnt/docker-aio-config/data/daily_backup_running" ]; then
|
||||||
export LOCK_FILE_PRESENT=1
|
export LOCK_FILE_PRESENT=1
|
||||||
else
|
else
|
||||||
@@ -65,9 +59,8 @@ while true; do
|
|||||||
sudo -E -u www-data docker container remove nextcloud-aio-domaincheck
|
sudo -E -u www-data docker container remove nextcloud-aio-domaincheck
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove dangling images (support both deprecated label-schema and OCI standard vendor label)
|
# Remove dangling images
|
||||||
sudo -E -u www-data docker image prune --filter "label=org.label-schema.vendor=Nextcloud" --force
|
sudo -E -u www-data docker image prune --filter "label=org.label-schema.vendor=Nextcloud" --force
|
||||||
sudo -E -u www-data docker image prune --filter "label=org.opencontainers.image.vendor=Nextcloud" --force
|
|
||||||
|
|
||||||
# Check for available free space
|
# Check for available free space
|
||||||
sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/CheckFreeDiskSpace.php
|
sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/CheckFreeDiskSpace.php
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Daily backup script has started"
|
echo "Daily backup script has started"
|
||||||
|
|
||||||
# Check if initial configuration has been done, otherwise this script should do nothing.
|
# Check if initial configuration has been done, otherwise this script should do nothing.
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
header {
|
|
||||||
# CSP limits which features can be used. By default we allow nothing and only allow required options. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy
|
|
||||||
# default-src 'none'; Allow nothing by default
|
|
||||||
# script-src-elem/style-src-elem 'self'; Only allow loading css/js files from same origin (AIO itself) while blocking all inline css/js
|
|
||||||
# img-src 'self'; Only allow loading images from same origin (from AIO itself)
|
|
||||||
# connect-src 'self'; Allow fetch to only connect same origin (to AIO itself)
|
|
||||||
# frame-src 'self'; Allow AIO to only embed itself "what can be embedded"
|
|
||||||
# base-uri 'none'; This does not fallback to default-src, AIO does not use the html base tag
|
|
||||||
# form-action 'self'; Html forms are only allowed to submit to AIO and not cross origin
|
|
||||||
# frame-ancestors 'self'; Only allow AIO itself to embed it self "who can embed"
|
|
||||||
# upgrade-insecure-requests; Upgrade all http embedings to https
|
|
||||||
# require-trusted-types-for 'script'; trusted-types 'none'; Blocks DOM changes via js
|
|
||||||
Content-Security-Policy "default-src 'none'; script-src-elem 'self'; style-src-elem 'self'; img-src 'self'; connect-src 'self'; frame-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'self'; upgrade-insecure-requests; require-trusted-types-for 'script'; trusted-types 'none';"
|
|
||||||
X-Content-Type-Options "nosniff" # This forces the browser to use the MIME type of the Content-Type header. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Content-Type-Options
|
|
||||||
X-Frame-Options "SAMEORIGIN" # Only allow AIO itself to embed itself, this is also enforced as part of the CSP frame-ancestors. See https://developer.mozilla.org/de/docs/Web/HTTP/Reference/Headers/X-Frame-Options
|
|
||||||
X-Permitted-Cross-Domain-Policies "none" # We block all cross origin request, including ones from Adobe Acrobat or Microsoft Silverlight and Adobe Flash Player. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Permitted-Cross-Domain-Policies
|
|
||||||
X-DNS-Prefetch-Control "off" # Tells the browser to not pre-fetch the DNS of linked pages. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-DNS-Prefetch-Control
|
|
||||||
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
|
|
||||||
|
|
||||||
# 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=(), 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
|
|
||||||
-Via
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "/mnt/docker-aio-config/data/configuration.json" ]; then
|
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 80 || exit 1
|
||||||
nc -z 127.0.0.1 8080 || exit 1
|
nc -z 127.0.0.1 8080 || exit 1
|
||||||
|
|||||||
@@ -24,8 +24,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
https://:8080 {
|
https://:8080 {
|
||||||
import headers.Caddyfile
|
|
||||||
|
|
||||||
@denied {
|
@denied {
|
||||||
path /api/auth/login /api/auth/getlogin
|
path /api/auth/login /api/auth/getlogin
|
||||||
remote_host nextcloud-aio-nextcloud
|
remote_host nextcloud-aio-nextcloud
|
||||||
|
|||||||
@@ -16,10 +16,6 @@ compare_times() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
compare_times
|
compare_times
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|||||||
@@ -20,10 +20,6 @@ case "${1}" in
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if running as root user
|
# Check if running as root user
|
||||||
if [ "$EUID" != "0" ]; then
|
if [ "$EUID" != "0" ]; then
|
||||||
print_red "Container does not run as root user. This is not supported."
|
print_red "Container does not run as root user. This is not supported."
|
||||||
@@ -173,7 +169,7 @@ elif ! sudo -E -u www-data docker volume ls --format "{{.Name}}" | grep -q "^nex
|
|||||||
print_red "It seems like you did not give the mastercontainer volume the correct name? (The 'nextcloud_aio_mastercontainer' volume was not found.)
|
print_red "It seems like you did not give the mastercontainer volume the correct name? (The 'nextcloud_aio_mastercontainer' volume was not found.)
|
||||||
Using a different name is not supported since the built-in backup solution will not work in that case!"
|
Using a different name is not supported since the built-in backup solution will not work in that case!"
|
||||||
exit 1
|
exit 1
|
||||||
elif ! sudo -E -u www-data docker inspect nextcloud-aio-mastercontainer --format '{{.Mounts}}' | grep -q " nextcloud_aio_mastercontainer "; then
|
elif ! sudo -E -u www-data docker inspect nextcloud-aio-mastercontainer | grep -q "nextcloud_aio_mastercontainer"; then
|
||||||
print_red "It seems like you did not attach the 'nextcloud_aio_mastercontainer' volume to the mastercontainer?
|
print_red "It seems like you did not attach the 'nextcloud_aio_mastercontainer' volume to the mastercontainer?
|
||||||
This is not supported since the built-in backup solution will not work in that case!"
|
This is not supported since the built-in backup solution will not work in that case!"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -316,42 +312,6 @@ if [ -n "$AIO_COMMUNITY_CONTAINERS" ]; then
|
|||||||
print_red "You've set AIO_COMMUNITY_CONTAINERS but the option was removed.
|
print_red "You've set AIO_COMMUNITY_CONTAINERS but the option was removed.
|
||||||
The community containers get managed via the AIO interface now."
|
The community containers get managed via the AIO interface now."
|
||||||
fi
|
fi
|
||||||
if [ -n "$NEXTCLOUD_ENABLE_DRI_DEVICE" ]; then
|
|
||||||
print_red "The environmental variable NEXTCLOUD_ENABLE_DRI_DEVICE is deprecated. Please mount the /dev/dri device into the mastercontainer instead and remove NEXTCLOUD_ENABLE_DRI_DEVICE. It will then be set automatically."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Automatically enable the /dev/dri device if it is mounted into the mastercontainer
|
|
||||||
if [ -d "/dev/dri" ]; then
|
|
||||||
export NEXTCLOUD_ENABLE_DRI_DEVICE="true"
|
|
||||||
if [ -e "/dev/dri/renderD128" ]; then
|
|
||||||
NEXTCLOUD_DRI_GID="$(stat -c '%g' /dev/dri/renderD128)"
|
|
||||||
export NEXTCLOUD_DRI_GID
|
|
||||||
else
|
|
||||||
export NEXTCLOUD_DRI_GID=""
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ -z "$NEXTCLOUD_ENABLE_DRI_DEVICE" ]; then
|
|
||||||
# Force the unset of the env if it was not externally overwritten already
|
|
||||||
export NEXTCLOUD_ENABLE_DRI_DEVICE="false"
|
|
||||||
fi
|
|
||||||
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
|
# Check if ghcr.io is reachable
|
||||||
# Solves issues like https://github.com/nextcloud/all-in-one/discussions/5268
|
# Solves issues like https://github.com/nextcloud/all-in-one/discussions/5268
|
||||||
@@ -443,11 +403,5 @@ caddy fmt --overwrite /internal.Caddyfile
|
|||||||
# Fix caddy log
|
# Fix caddy log
|
||||||
chmod 777 /root
|
chmod 777 /root
|
||||||
|
|
||||||
# Create Twig template cache directory (path must match TWIG_CACHE_PATH in php/public/index.php)
|
|
||||||
mkdir -p /tmp/twig-cache
|
|
||||||
rm -rf /tmp/twig-cache/*
|
|
||||||
chown www-data:www-data /tmp/twig-cache
|
|
||||||
chmod 770 /tmp/twig-cache
|
|
||||||
|
|
||||||
# Start supervisord
|
# Start supervisord
|
||||||
exec /usr/bin/supervisord -c /supervisord.conf
|
exec /usr/bin/supervisord -c /supervisord.conf
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ pidfile=/var/run/supervisord/supervisord.pid
|
|||||||
childlogdir=/var/log/supervisord/
|
childlogdir=/var/log/supervisord/
|
||||||
logfile_maxbytes=50MB
|
logfile_maxbytes=50MB
|
||||||
logfile_backups=10
|
logfile_backups=10
|
||||||
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
loglevel=error
|
||||||
user=root
|
user=root
|
||||||
|
|
||||||
[program:php-fpm]
|
[program:php-fpm]
|
||||||
# Stdout logging is disabled as otherwise the logs are spammed
|
# Stdout logging is disabled as otherwise the logs are spammed
|
||||||
stdout_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
stdout_logfile=NONE
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=php-fpm
|
command=php-fpm
|
||||||
@@ -54,11 +54,11 @@ stdout_logfile_maxbytes=0
|
|||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=/session-deduplicator.sh
|
command=/session-deduplicator.sh
|
||||||
user=www-data
|
user=root
|
||||||
|
|
||||||
[program:domain-validator]
|
[program:domain-validator]
|
||||||
# Logging is disabled as otherwise all attempts will be logged which spams the logs
|
# Logging is disabled as otherwise all attempts will be logged which spams the logs
|
||||||
stdout_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
stdout_logfile=NONE
|
||||||
stderr_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
stderr_logfile=NONE
|
||||||
command=php -S 127.0.0.1:9876 /var/www/docker-aio/php/domain-validator.php
|
command=php -S 127.0.0.1:9876 /var/www/docker-aio/php/domain-validator.php
|
||||||
user=www-data
|
user=www-data
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM php:8.3.31-fpm-alpine3.23
|
FROM php:8.3.30-fpm-alpine3.23
|
||||||
|
|
||||||
ENV PHP_MEMORY_LIMIT=512M
|
ENV PHP_MEMORY_LIMIT=512M
|
||||||
ENV PHP_UPLOAD_LIMIT=16G
|
ENV PHP_UPLOAD_LIMIT=16G
|
||||||
@@ -8,7 +8,7 @@ ENV SOURCE_LOCATION=/usr/src/nextcloud
|
|||||||
ENV REDIS_DB_INDEX=0
|
ENV REDIS_DB_INDEX=0
|
||||||
|
|
||||||
# AIO settings start # Do not remove or change this line!
|
# AIO settings start # Do not remove or change this line!
|
||||||
ENV NEXTCLOUD_VERSION=33.0.3
|
ENV NEXTCLOUD_VERSION=32.0.8
|
||||||
ENV AIO_TOKEN=123456
|
ENV AIO_TOKEN=123456
|
||||||
ENV AIO_URL=localhost
|
ENV AIO_URL=localhost
|
||||||
# AIO settings end # Do not remove or change this line!
|
# AIO settings end # Do not remove or change this line!
|
||||||
@@ -114,18 +114,18 @@ RUN set -ex; \
|
|||||||
# set recommended PHP.ini settings
|
# set recommended PHP.ini settings
|
||||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/server_tuning.html#enable-php-opcache and below
|
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/server_tuning.html#enable-php-opcache and below
|
||||||
{ \
|
{ \
|
||||||
echo 'opcache.max_accelerated_files=20000'; \
|
echo 'opcache.max_accelerated_files=10000'; \
|
||||||
echo 'opcache.memory_consumption=256'; \
|
echo 'opcache.memory_consumption=256'; \
|
||||||
echo 'opcache.interned_strings_buffer=64'; \
|
echo 'opcache.interned_strings_buffer=64'; \
|
||||||
echo 'opcache.save_comments=1'; \
|
echo 'opcache.save_comments=1'; \
|
||||||
echo 'opcache.revalidate_freq=60'; \
|
echo 'opcache.revalidate_freq=60'; \
|
||||||
echo 'opcache.jit=1255'; \
|
echo 'opcache.jit=1255'; \
|
||||||
echo 'opcache.jit_buffer_size=128M'; \
|
echo 'opcache.jit_buffer_size=8M'; \
|
||||||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
echo 'apc.enable_cli=1'; \
|
echo 'apc.enable_cli=1'; \
|
||||||
echo 'apc.shm_size=128M'; \
|
echo 'apc.shm_size=64M'; \
|
||||||
} >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
} >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
@@ -135,20 +135,14 @@ RUN set -ex; \
|
|||||||
echo 'max_execution_time=${PHP_MAX_TIME}'; \
|
echo 'max_execution_time=${PHP_MAX_TIME}'; \
|
||||||
echo 'max_input_time=-1'; \
|
echo 'max_input_time=-1'; \
|
||||||
echo 'default_socket_timeout=${PHP_MAX_TIME}'; \
|
echo 'default_socket_timeout=${PHP_MAX_TIME}'; \
|
||||||
echo 'output_buffering=0'; \
|
|
||||||
echo 'realpath_cache_size=8M'; \
|
|
||||||
echo 'realpath_cache_ttl=600'; \
|
|
||||||
} > /usr/local/etc/php/conf.d/nextcloud.ini; \
|
} > /usr/local/etc/php/conf.d/nextcloud.ini; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
echo 'session.save_handler = redis'; \
|
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}&timeout=3.0&read_timeout=10.0"'; \
|
echo 'session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}?database=${REDIS_DB_INDEX}${REDIS_USER_AUTH}&auth[]=${REDIS_HOST_PASSWORD}"'; \
|
||||||
echo 'redis.session.locking_enabled = 1'; \
|
echo 'redis.session.locking_enabled = 1'; \
|
||||||
echo 'redis.session.lock_retries = -1'; \
|
echo 'redis.session.lock_retries = -1'; \
|
||||||
echo '; 100ms in microseconds - prevents timeout on long requests such as large file uploads'; \
|
echo 'redis.session.lock_wait_time = 10000'; \
|
||||||
echo 'redis.session.lock_wait_time = 100000'; \
|
|
||||||
echo '; prevents stale locks from crashed workers (seconds)'; \
|
|
||||||
echo 'redis.session.lock_expire = 60'; \
|
|
||||||
echo 'session.gc_maxlifetime = 86400'; \
|
echo 'session.gc_maxlifetime = 86400'; \
|
||||||
} > /usr/local/etc/php/conf.d/redis-session.ini; \
|
} > /usr/local/etc/php/conf.d/redis-session.ini; \
|
||||||
\
|
\
|
||||||
@@ -250,21 +244,6 @@ RUN set -ex; \
|
|||||||
# We don't actually expect so many children but don't want to limit it artificially because people will report issues otherwise.
|
# 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
|
# 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; \
|
sed -i 's/^pm.max_children =.*/pm.max_children = 5000/' /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; \
|
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; \
|
echo "[ -n \"\$TERM\" ] && [ -f /root.motd ] && cat /root.motd" >> /root/.bashrc; \
|
||||||
@@ -286,9 +265,4 @@ CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
|||||||
HEALTHCHECK CMD /healthcheck.sh
|
HEALTHCHECK CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Nextcloud for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Nextcloud server with all required PHP extensions for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -16,12 +16,6 @@ $CONFIG = array (
|
|||||||
if (getenv('APPS_ALLOWLIST')) {
|
if (getenv('APPS_ALLOWLIST')) {
|
||||||
$CONFIG['appsallowlist'] = explode(" ", getenv('APPS_ALLOWLIST'));
|
$CONFIG['appsallowlist'] = explode(" ", getenv('APPS_ALLOWLIST'));
|
||||||
}
|
}
|
||||||
|
if (getenv('NEXTCLOUD_APP_STORE_URL')) {
|
||||||
$appStoreUrl = getenv('NEXTCLOUD_APP_STORE_URL');
|
$CONFIG['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,6 @@ if (getenv('REDIS_MODE') !== 'rediscluster') {
|
|||||||
|
|
||||||
if (getenv('REDIS_HOST')) {
|
if (getenv('REDIS_HOST')) {
|
||||||
$CONFIG['redis']['host'] = (string) getenv('REDIS_HOST');
|
$CONFIG['redis']['host'] = (string) getenv('REDIS_HOST');
|
||||||
$CONFIG['redis']['timeout'] = 3.0;
|
|
||||||
$CONFIG['redis']['read_timeout'] = 10.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getenv('REDIS_HOST_PASSWORD')) {
|
if (getenv('REDIS_HOST_PASSWORD')) {
|
||||||
@@ -23,10 +21,6 @@ if (getenv('REDIS_MODE') !== 'rediscluster') {
|
|||||||
$CONFIG['redis']['dbindex'] = (int) getenv('REDIS_DB_INDEX');
|
$CONFIG['redis']['dbindex'] = (int) getenv('REDIS_DB_INDEX');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getenv('REDIS_PREFIX')) {
|
|
||||||
$CONFIG['redis']['memcache_customprefix'] = getenv('REDIS_PREFIX');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (getenv('REDIS_USER_AUTH')) {
|
if (getenv('REDIS_USER_AUTH')) {
|
||||||
$CONFIG['redis']['user'] = str_replace("&auth[]=", "", getenv('REDIS_USER_AUTH'));
|
$CONFIG['redis']['user'] = str_replace("&auth[]=", "", getenv('REDIS_USER_AUTH'));
|
||||||
}
|
}
|
||||||
@@ -64,10 +58,6 @@ if (getenv('REDIS_MODE') !== 'rediscluster') {
|
|||||||
$CONFIG['redis.cluster']['user'] = str_replace("&auth[]=", "", getenv('REDIS_USER_AUTH'));
|
$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')) {
|
if (getenv('NEXTCLOUD_TRUSTED_CERTIFICATES_REDIS')) {
|
||||||
$CONFIG['redis.cluster']['ssl_context']['cafile'] = '/var/www/html/data/certificates/ca-bundle.crt';
|
$CONFIG['redis.cluster']['ssl_context']['cafile'] = '/var/www/html/data/certificates/ca-bundle.crt';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
<?php
|
|
||||||
$CONFIG = array (
|
|
||||||
'serverid' => hexdec(hash('xxh32', gethostname())) & 0x1FF,
|
|
||||||
);
|
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
wait_for_cron() {
|
wait_for_cron() {
|
||||||
set -x
|
set -x
|
||||||
while [ -n "$(pgrep -f /var/www/html/cron.php)" ]; do
|
while [ -n "$(pgrep -f /var/www/html/cron.php)" ]; do
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ directory_empty() {
|
|||||||
[ -z "$(ls -A "$1/")" ]
|
[ -z "$(ls -A "$1/")" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
run_upgrade_if_needed_due_to_app_update() {
|
run_upgrade_if_needed_due_to_app_update() {
|
||||||
if php /var/www/html/occ status | grep maintenance | grep -q true; then
|
if php /var/www/html/occ status | grep maintenance | grep -q true; then
|
||||||
php /var/www/html/occ maintenance:mode --off
|
php /var/www/html/occ maintenance:mode --off
|
||||||
@@ -24,14 +20,6 @@ run_upgrade_if_needed_due_to_app_update() {
|
|||||||
fi
|
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
|
# Create cert bundle
|
||||||
if env | grep -q NEXTCLOUD_TRUSTED_CERTIFICATES_; then
|
if env | grep -q NEXTCLOUD_TRUSTED_CERTIFICATES_; then
|
||||||
|
|
||||||
@@ -87,9 +75,7 @@ if env | grep -q NEXTCLOUD_TRUSTED_CERTIFICATES_; then
|
|||||||
cat "$CERTIFICATE_BUNDLE"
|
cat "$CERTIFICATE_BUNDLE"
|
||||||
|
|
||||||
# Disable debug mode
|
# Disable debug mode
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Adjust DATABASE_TYPE to by Nextcloud supported value
|
# Adjust DATABASE_TYPE to by Nextcloud supported value
|
||||||
@@ -129,11 +115,6 @@ rm -f "$test_file"
|
|||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
|
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
|
else
|
||||||
installed_version="0.0.0.0"
|
installed_version="0.0.0.0"
|
||||||
fi
|
fi
|
||||||
@@ -236,9 +217,7 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
|
|||||||
if grep -q appstoreurl /var/www/html/config/config.php; then
|
if grep -q appstoreurl /var/www/html/config/config.php; then
|
||||||
set -x
|
set -x
|
||||||
APPSTORE_URL="$(grep appstoreurl /var/www/html/config/config.php | grep -oP 'https://.*v[0-9]+')"
|
APPSTORE_URL="$(grep appstoreurl /var/www/html/config/config.php | grep -oP 'https://.*v[0-9]+')"
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
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
|
# 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)"
|
CURL_STATUS="$(curl -LI "$APPSTORE_URL"/apps.json -o /dev/null -w '%{http_code}\n' -s)"
|
||||||
@@ -305,9 +284,7 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
|
|||||||
"$SOURCE_LOCATION/custom_apps/" \
|
"$SOURCE_LOCATION/custom_apps/" \
|
||||||
/var/www/html/custom_apps/
|
/var/www/html/custom_apps/
|
||||||
done
|
done
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy these from Nextcloud archive if they don't exist yet (i.e. new install)
|
# Copy these from Nextcloud archive if they don't exist yet (i.e. new install)
|
||||||
@@ -460,20 +437,12 @@ EOF
|
|||||||
# Apply log settings
|
# Apply log settings
|
||||||
echo "Applying default settings..."
|
echo "Applying default settings..."
|
||||||
mkdir -p /var/www/html/data
|
mkdir -p /var/www/html/data
|
||||||
php /var/www/html/occ config:system:set loglevel --value="$NEXTCLOUD_LOG_LEVEL" --type=integer
|
php /var/www/html/occ config:system:set loglevel --value="2" --type=integer
|
||||||
if [ "$NEXTCLOUD_LOG_TYPE" = "errorlog" ]; then
|
php /var/www/html/occ config:system:set log_type --value="file"
|
||||||
php /var/www/html/occ config:system:set log_type --value="errorlog"
|
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
|
||||||
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 config:system:set log_rotate_size --value="10485760" --type=integer
|
||||||
php /var/www/html/occ app:enable admin_audit
|
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"
|
php /var/www/html/occ config:system:set log.condition apps 0 --value="admin_audit"
|
||||||
|
|
||||||
# Apply preview settings
|
# Apply preview settings
|
||||||
@@ -671,18 +640,8 @@ fi
|
|||||||
# Adjusting log files to be stored on a volume
|
# Adjusting log files to be stored on a volume
|
||||||
echo "Adjusting log files..."
|
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 upgrade.cli-upgrade-link --value="https://github.com/nextcloud/all-in-one/discussions/2726"
|
||||||
php /var/www/html/occ config:system:set loglevel --value="$NEXTCLOUD_LOG_LEVEL" --type=integer
|
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
|
||||||
if [ "$NEXTCLOUD_LOG_TYPE" = "errorlog" ]; then
|
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_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"
|
php /var/www/html/occ config:system:set updatedirectory --value="/nc-updater"
|
||||||
if [ -n "$NEXTCLOUD_SKELETON_DIRECTORY" ]; then
|
if [ -n "$NEXTCLOUD_SKELETON_DIRECTORY" ]; then
|
||||||
if [ "$NEXTCLOUD_SKELETON_DIRECTORY" = "empty" ]; then
|
if [ "$NEXTCLOUD_SKELETON_DIRECTORY" = "empty" ]; then
|
||||||
@@ -783,9 +742,7 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then
|
|||||||
if echo "$COLLABORA_HOST" | grep -q "nextcloud-.*-collabora"; then
|
if echo "$COLLABORA_HOST" | grep -q "nextcloud-.*-collabora"; then
|
||||||
COLLABORA_HOST="$NC_DOMAIN"
|
COLLABORA_HOST="$NC_DOMAIN"
|
||||||
fi
|
fi
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
# Remove richdcoumentscode if it should be incorrectly installed
|
# Remove richdcoumentscode if it should be incorrectly installed
|
||||||
if [ -d "/var/www/html/custom_apps/richdocumentscode" ]; then
|
if [ -d "/var/www/html/custom_apps/richdocumentscode" ]; then
|
||||||
php /var/www/html/occ app:remove richdocumentscode
|
php /var/www/html/occ app:remove richdocumentscode
|
||||||
@@ -906,9 +863,7 @@ if [ "$TALK_ENABLED" = 'yes' ]; then
|
|||||||
if [ -z "$TURN_DOMAIN" ]; then
|
if [ -z "$TURN_DOMAIN" ]; then
|
||||||
TURN_DOMAIN="$TALK_HOST"
|
TURN_DOMAIN="$TALK_HOST"
|
||||||
fi
|
fi
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
if ! [ -d "/var/www/html/custom_apps/spreed" ]; then
|
if ! [ -d "/var/www/html/custom_apps/spreed" ]; then
|
||||||
php /var/www/html/occ app:install spreed
|
php /var/www/html/occ app:install spreed
|
||||||
elif [ "$(php /var/www/html/occ config:app:get spreed enabled)" != "yes" ]; then
|
elif [ "$(php /var/www/html/occ config:app:get spreed enabled)" != "yes" ]; then
|
||||||
@@ -916,20 +871,16 @@ if [ "$TALK_ENABLED" = 'yes' ]; then
|
|||||||
elif [ "$SKIP_UPDATE" != 1 ]; then
|
elif [ "$SKIP_UPDATE" != 1 ]; then
|
||||||
php /var/www/html/occ app:update spreed
|
php /var/www/html/occ app:update spreed
|
||||||
fi
|
fi
|
||||||
# Add turn server
|
# Based on https://github.com/nextcloud/spreed/issues/960#issuecomment-416993435
|
||||||
# shellcheck disable=SC2153
|
if [ -z "$(php /var/www/html/occ talk:turn:list --output="plain")" ]; then
|
||||||
if ! php /var/www/html/occ talk:turn:list --output="plain" | grep server | grep -q " $TURN_DOMAIN:$TALK_PORT"; then
|
# shellcheck disable=SC2153
|
||||||
php /var/www/html/occ talk:turn:add turn "$TURN_DOMAIN:$TALK_PORT" "udp,tcp" --secret="$TURN_SECRET"
|
php /var/www/html/occ talk:turn:add turn "$TURN_DOMAIN:$TALK_PORT" "udp,tcp" --secret="$TURN_SECRET"
|
||||||
fi
|
fi
|
||||||
# Add stun server
|
|
||||||
STUN_SERVER="$(php /var/www/html/occ talk:stun:list --output="plain")"
|
STUN_SERVER="$(php /var/www/html/occ talk:stun:list --output="plain")"
|
||||||
if ! echo "$STUN_SERVER" | grep -q " $TURN_DOMAIN:$TALK_PORT"; then
|
|
||||||
php /var/www/html/occ talk:stun:add "$TURN_DOMAIN:$TALK_PORT"
|
|
||||||
fi
|
|
||||||
if [ -z "$STUN_SERVER" ] || echo "$STUN_SERVER" | grep -oP '[a-zA-Z.:0-9]+' | grep -q "^stun.nextcloud.com:443$"; then
|
if [ -z "$STUN_SERVER" ] || echo "$STUN_SERVER" | grep -oP '[a-zA-Z.:0-9]+' | grep -q "^stun.nextcloud.com:443$"; then
|
||||||
|
php /var/www/html/occ talk:stun:add "$TURN_DOMAIN:$TALK_PORT"
|
||||||
php /var/www/html/occ talk:stun:delete "stun.nextcloud.com:443"
|
php /var/www/html/occ talk:stun:delete "stun.nextcloud.com:443"
|
||||||
fi
|
fi
|
||||||
# Add HPB
|
|
||||||
if ! php /var/www/html/occ talk:signaling:list --output="plain" | grep -q "https://$TALK_HOST$HPB_PATH"; then
|
if ! php /var/www/html/occ talk:signaling:list --output="plain" | grep -q "https://$TALK_HOST$HPB_PATH"; then
|
||||||
php /var/www/html/occ talk:signaling:add "https://$TALK_HOST$HPB_PATH" "$SIGNALING_SECRET" --verify
|
php /var/www/html/occ talk:signaling:add "https://$TALK_HOST$HPB_PATH" "$SIGNALING_SECRET" --verify
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set a default value for POSTGRES_PORT
|
# Set a default value for POSTGRES_PORT
|
||||||
if [ -z "$POSTGRES_PORT" ]; then
|
if [ -z "$POSTGRES_PORT" ]; then
|
||||||
POSTGRES_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$EUID" = 0 ]]; then
|
if [[ "$EUID" = 0 ]]; then
|
||||||
COMMAND=(sudo -E -u www-data php /var/www/html/occ)
|
COMMAND=(sudo -E -u www-data php /var/www/html/occ)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$EUID" = 0 ]]; then
|
if [[ "$EUID" = 0 ]]; then
|
||||||
COMMAND=(sudo -E -u www-data php /var/www/html/occ)
|
COMMAND=(sudo -E -u www-data php /var/www/html/occ)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Wait until the apache container is ready
|
# Wait until the apache container is ready
|
||||||
while ! nc -z "$APACHE_HOST" "$APACHE_PORT"; do
|
while ! nc -z "$APACHE_HOST" "$APACHE_PORT"; do
|
||||||
echo "Waiting for $APACHE_HOST to become available..."
|
echo "Waiting for $APACHE_HOST to become available..."
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set a default value for POSTGRES_PORT
|
# Set a default value for POSTGRES_PORT
|
||||||
if [ -z "$POSTGRES_PORT" ]; then
|
if [ -z "$POSTGRES_PORT" ]; then
|
||||||
POSTGRES_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
@@ -29,7 +25,7 @@ fi
|
|||||||
# Fix false database connection on old instances
|
# Fix false database connection on old instances
|
||||||
if [ -f "/var/www/html/config/config.php" ]; then
|
if [ -f "/var/www/html/config/config.php" ]; then
|
||||||
sleep 2
|
sleep 2
|
||||||
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
|
while ! sudo -E -u www-data psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB" -c "select now()"; do
|
||||||
echo "Waiting for the database to start..."
|
echo "Waiting for the database to start..."
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
@@ -57,9 +53,7 @@ if ! [ -f "/dev-dri-group-was-added" ] && [ -n "$(find /dev -maxdepth 1 -mindept
|
|||||||
usermod -aG "$GROUP" www-data
|
usermod -aG "$GROUP" www-data
|
||||||
touch "/dev-dri-group-was-added"
|
touch "/dev-dri-group-was-added"
|
||||||
fi
|
fi
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check datadir permissions
|
# Check datadir permissions
|
||||||
sudo -E -u www-data touch "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" &>/dev/null
|
sudo -E -u www-data touch "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" &>/dev/null
|
||||||
@@ -176,8 +170,6 @@ if [ "$THIS_IS_AIO" = "true" ] && [ "$APACHE_PORT" = 443 ]; then
|
|||||||
sed -i "/^listen.allowed_clients/s/,$//" /usr/local/etc/php-fpm.d/www.conf
|
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
|
grep listen.allowed_clients /usr/local/etc/php-fpm.d/www.conf
|
||||||
fi
|
fi
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ pidfile=/var/run/supervisord/supervisord.pid
|
|||||||
childlogdir=/var/log/supervisord/
|
childlogdir=/var/log/supervisord/
|
||||||
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
||||||
logfile_backups=10 ; number of backed up logfiles
|
logfile_backups=10 ; number of backed up logfiles
|
||||||
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
loglevel=error
|
||||||
user=root
|
user=root
|
||||||
|
|
||||||
[program:php-fpm]
|
[program:php-fpm]
|
||||||
@@ -25,14 +25,6 @@ stderr_logfile_maxbytes=0
|
|||||||
command=/cron.sh
|
command=/cron.sh
|
||||||
user=www-data
|
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]
|
[program:run-exec-commands]
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM alpine:3.23.4
|
FROM alpine:3.23.3
|
||||||
|
|
||||||
COPY --chmod=775 start.sh /start.sh
|
COPY --chmod=775 start.sh /start.sh
|
||||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||||
@@ -23,9 +23,4 @@ ENTRYPOINT ["/start.sh"]
|
|||||||
HEALTHCHECK CMD /healthcheck.sh
|
HEALTHCHECK CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Notify Push for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Nextcloud notify_push high-performance backend for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! nc -z "$NEXTCLOUD_HOST" 9001; then
|
if ! nc -z "$NEXTCLOUD_HOST" 9001; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
export RUST_LOG="$AIO_LOG_LEVEL"
|
|
||||||
|
|
||||||
if [ -z "$NEXTCLOUD_HOST" ]; then
|
if [ -z "$NEXTCLOUD_HOST" ]; then
|
||||||
echo "NEXTCLOUD_HOST needs to be provided. Exiting!"
|
echo "NEXTCLOUD_HOST needs to be provided. Exiting!"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -28,7 +22,7 @@ elif [ "$CPU_ARCH" != "x86_64" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Add warning
|
# Add warning
|
||||||
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
|
if ! [ -f /var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push ]; then
|
||||||
echo "The notify_push binary was not found."
|
echo "The notify_push binary was not found."
|
||||||
echo "Most likely is DNS resolution not working correctly."
|
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."
|
echo "You can try to fix this by configuring a DNS server globally in dockers daemon.json."
|
||||||
@@ -42,24 +36,11 @@ if ! [ -f /var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push ] &&
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
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
|
# Run it
|
||||||
exec "$PUSH_PATH" \
|
/var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push \
|
||||||
--port 7867 \
|
--port 7867 \
|
||||||
/var/www/html/config/config.php
|
/var/www/html/config/config.php
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
|
|||||||
@@ -9,9 +9,4 @@ COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
|||||||
HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
|
HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="OnlyOffice for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="OnlyOffice Document Server for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
nc -z 127.0.0.1 80 || exit 1
|
nc -z 127.0.0.1 80 || exit 1
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
# From https://github.com/docker-library/postgres/blob/master/18/alpine3.23/Dockerfile
|
# From https://github.com/docker-library/postgres/blob/master/17/alpine3.23/Dockerfile
|
||||||
FROM postgres:18.4-alpine
|
FROM postgres:17.9-alpine
|
||||||
|
|
||||||
ENV PGDATA=/var/lib/postgresql/data
|
|
||||||
|
|
||||||
COPY --chmod=775 start.sh /start.sh
|
COPY --chmod=775 start.sh /start.sh
|
||||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||||
@@ -14,7 +12,6 @@ RUN set -ex; \
|
|||||||
bash \
|
bash \
|
||||||
openssl \
|
openssl \
|
||||||
shadow \
|
shadow \
|
||||||
netcat-openbsd \
|
|
||||||
grep; \
|
grep; \
|
||||||
\
|
\
|
||||||
# We need to use the same gid and uid as on old installations
|
# We need to use the same gid and uid as on old installations
|
||||||
@@ -25,7 +22,6 @@ RUN set -ex; \
|
|||||||
apk del --no-cache shadow; \
|
apk del --no-cache shadow; \
|
||||||
\
|
\
|
||||||
# Fix default permissions
|
# Fix default permissions
|
||||||
mkdir -p /var/lib/postgresql/data; \
|
|
||||||
chown -R postgres:postgres /var/lib/postgresql; \
|
chown -R postgres:postgres /var/lib/postgresql; \
|
||||||
chown -R postgres:postgres /var/run/postgresql; \
|
chown -R postgres:postgres /var/run/postgresql; \
|
||||||
chmod -R 777 /var/run/postgresql; \
|
chmod -R 777 /var/run/postgresql; \
|
||||||
@@ -49,9 +45,4 @@ ENTRYPOINT ["/start.sh"]
|
|||||||
HEALTHCHECK CMD /healthcheck.sh
|
HEALTHCHECK CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="PostgreSQL for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="PostgreSQL database for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
test -f "/mnt/data/backup-is-running" && exit 0
|
test -f "/mnt/data/backup-is-running" && exit 0
|
||||||
|
|
||||||
# If database import is running, do not continue with the health check
|
psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@127.0.0.1:11000/$POSTGRES_DB" -c "select now()" && exit 0
|
||||||
if nc -z 127.0.0.1 11000; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
PGPASSWORD="$POSTGRES_PASSWORD" psql -h 127.0.0.1 -p 5432 -U "oc_$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()" || exit 1
|
psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@127.0.0.1:5432/$POSTGRES_DB" -c "select now()" || exit 1
|
||||||
|
|||||||
@@ -1,16 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
touch "$DUMP_DIR/initialization.failed"
|
touch "$DUMP_DIR/initialization.failed"
|
||||||
|
|
||||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" \
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
-v "pg_new_password=$POSTGRES_PASSWORD" <<-EOSQL
|
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
|
||||||
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD :'pg_new_password' CREATEDB;
|
|
||||||
ALTER DATABASE "$POSTGRES_DB" OWNER TO "oc_$POSTGRES_USER";
|
ALTER DATABASE "$POSTGRES_DB" OWNER TO "oc_$POSTGRES_USER";
|
||||||
GRANT ALL PRIVILEGES ON DATABASE "$POSTGRES_DB" 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";
|
GRANT ALL PRIVILEGES ON SCHEMA public TO "oc_$POSTGRES_USER";
|
||||||
|
|||||||
@@ -1,17 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# Variables
|
||||||
DATADIR="/var/lib/postgresql/data"
|
DATADIR="/var/lib/postgresql/data"
|
||||||
export DUMP_DIR="/mnt/data"
|
export DUMP_DIR="/mnt/data"
|
||||||
@@ -97,7 +85,7 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
|
|||||||
exec docker-entrypoint.sh postgres &
|
exec docker-entrypoint.sh postgres &
|
||||||
|
|
||||||
# Wait for creation
|
# Wait for creation
|
||||||
while ! psql -h 127.0.0.1 -p 11000 -U "oc_$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()"; do
|
while ! psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@127.0.0.1:11000/$POSTGRES_DB" -c "select now()"; do
|
||||||
echo "Waiting for the database to start."
|
echo "Waiting for the database to start."
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
@@ -119,9 +107,8 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
|
|||||||
exit 1
|
exit 1
|
||||||
elif [ "$DB_OWNER" != "oc_$POSTGRES_USER" ]; then
|
elif [ "$DB_OWNER" != "oc_$POSTGRES_USER" ]; then
|
||||||
DIFFERENT_DB_OWNER=1
|
DIFFERENT_DB_OWNER=1
|
||||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" \
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
-v "pg_new_password=$POSTGRES_PASSWORD" <<-EOSQL
|
CREATE USER "$DB_OWNER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
|
||||||
CREATE USER "$DB_OWNER" WITH PASSWORD :'pg_new_password' CREATEDB;
|
|
||||||
ALTER DATABASE "$POSTGRES_DB" OWNER TO "$DB_OWNER";
|
ALTER DATABASE "$POSTGRES_DB" OWNER TO "$DB_OWNER";
|
||||||
GRANT ALL PRIVILEGES ON DATABASE "$POSTGRES_DB" TO "$DB_OWNER";
|
GRANT ALL PRIVILEGES ON DATABASE "$POSTGRES_DB" TO "$DB_OWNER";
|
||||||
GRANT ALL PRIVILEGES ON SCHEMA public TO "$DB_OWNER";
|
GRANT ALL PRIVILEGES ON SCHEMA public TO "$DB_OWNER";
|
||||||
@@ -164,71 +151,23 @@ fi
|
|||||||
# Modify postgresql.conf
|
# Modify postgresql.conf
|
||||||
if [ -f "/var/lib/postgresql/data/postgresql.conf" ]; then
|
if [ -f "/var/lib/postgresql/data/postgresql.conf" ]; then
|
||||||
echo "Setting postgres values..."
|
echo "Setting postgres values..."
|
||||||
PGCONF="/var/lib/postgresql/data/postgresql.conf"
|
|
||||||
|
|
||||||
# Sync this with max pm.max_children and MaxRequestWorkers
|
# Sync this with max pm.max_children and MaxRequestWorkers
|
||||||
# 5000 connections is apparently the highest possible value with postgres so set it to that so that we don't run into a limit here.
|
# 5000 connections is apparently the highest possible value with postgres so set it to that so that we don't run into a limit here.
|
||||||
# We don't actually expect so many connections but don't want to limit it artificially because people will report issues otherwise
|
# We don't actually expect so many connections but don't want to limit it artificially because people will report issues otherwise
|
||||||
# Also connections should usually be closed again after the process is done
|
# Also connections should usually be closed again after the process is done
|
||||||
# If we should actually exceed this limit, it is definitely a bug in Nextcloud server or some of its apps that does not close connections correctly and not a bug in AIO
|
# If we should actually exceed this limit, it is definitely a bug in Nextcloud server or some of its apps that does not close connections correctly and not a bug in AIO
|
||||||
sed -i "s|^max_connections =.*|max_connections = 5000|" "$PGCONF"
|
sed -i "s|^max_connections =.*|max_connections = 5000|" "/var/lib/postgresql/data/postgresql.conf"
|
||||||
|
|
||||||
# Do not log checkpoints
|
# Do not log checkpoints
|
||||||
if grep -q "#log_checkpoints" "$PGCONF"; then
|
if grep -q "#log_checkpoints" /var/lib/postgresql/data/postgresql.conf; then
|
||||||
sed -i 's|#log_checkpoints.*|log_checkpoints = off|' "$PGCONF"
|
sed -i 's|#log_checkpoints.*|log_checkpoints = off|' /var/lib/postgresql/data/postgresql.conf
|
||||||
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
|
fi
|
||||||
|
|
||||||
# Closing idling connections automatically seems to break any logic so was reverted again to default where it is disabled
|
# 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
|
if grep -q "^idle_session_timeout" /var/lib/postgresql/data/postgresql.conf; then
|
||||||
sed -i 's|^idle_session_timeout.*|#idle_session_timeout|' "$PGCONF"
|
sed -i 's|^idle_session_timeout.*|#idle_session_timeout|' /var/lib/postgresql/data/postgresql.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase shared_buffers from the 128MB default for better data caching
|
|
||||||
sed -i "s|^#shared_buffers = .*|shared_buffers = 256MB|" "$PGCONF"
|
|
||||||
sed -i "s|^shared_buffers = .*|shared_buffers = 256MB|" "$PGCONF"
|
|
||||||
|
|
||||||
# Hint to the query planner about available OS page cache (does not allocate memory)
|
|
||||||
sed -i "s|^#effective_cache_size = .*|effective_cache_size = 1GB|" "$PGCONF"
|
|
||||||
sed -i "s|^effective_cache_size = .*|effective_cache_size = 1GB|" "$PGCONF"
|
|
||||||
|
|
||||||
# Increase per-operation sort/hash memory to reduce disk spills for file listing and share queries.
|
|
||||||
# Note: this is allocated per sort/hash operation, not per connection, so the theoretical worst-case
|
|
||||||
# (max_connections × work_mem) is rarely approached in practice.
|
|
||||||
sed -i "s|^#work_mem = .*|work_mem = 16MB|" "$PGCONF"
|
|
||||||
sed -i "s|^work_mem = .*|work_mem = 16MB|" "$PGCONF"
|
|
||||||
|
|
||||||
# Increase memory for VACUUM, CREATE INDEX, and other maintenance operations
|
|
||||||
sed -i "s|^#maintenance_work_mem = .*|maintenance_work_mem = 256MB|" "$PGCONF"
|
|
||||||
sed -i "s|^maintenance_work_mem = .*|maintenance_work_mem = 256MB|" "$PGCONF"
|
|
||||||
|
|
||||||
# Increase WAL buffers to reduce WAL write latency under concurrent write load
|
|
||||||
sed -i "s|^#wal_buffers = .*|wal_buffers = 16MB|" "$PGCONF"
|
|
||||||
sed -i "s|^wal_buffers = .*|wal_buffers = 16MB|" "$PGCONF"
|
|
||||||
|
|
||||||
# Spread checkpoint I/O over a longer window to reduce spikes
|
|
||||||
sed -i "s|^#checkpoint_timeout = .*|checkpoint_timeout = 15min|" "$PGCONF"
|
|
||||||
sed -i "s|^checkpoint_timeout = .*|checkpoint_timeout = 15min|" "$PGCONF"
|
|
||||||
|
|
||||||
# Tune for SSD storage: random reads are nearly as fast as sequential reads
|
|
||||||
sed -i "s|^#random_page_cost = .*|random_page_cost = 1.1|" "$PGCONF"
|
|
||||||
sed -i "s|^random_page_cost = .*|random_page_cost = 1.1|" "$PGCONF"
|
|
||||||
|
|
||||||
# Allow the kernel to issue more concurrent I/O prefetch requests (suitable for SSDs)
|
|
||||||
sed -i "s|^#effective_io_concurrency = .*|effective_io_concurrency = 200|" "$PGCONF"
|
|
||||||
sed -i "s|^effective_io_concurrency = .*|effective_io_concurrency = 200|" "$PGCONF"
|
|
||||||
|
|
||||||
# Trigger autovacuum earlier on large Nextcloud tables (e.g. oc_filecache, oc_activity)
|
|
||||||
# to prevent table bloat accumulating before the default 20% threshold is reached
|
|
||||||
sed -i "s|^#autovacuum_vacuum_scale_factor = .*|autovacuum_vacuum_scale_factor = 0.05|" "$PGCONF"
|
|
||||||
sed -i "s|^autovacuum_vacuum_scale_factor = .*|autovacuum_vacuum_scale_factor = 0.05|" "$PGCONF"
|
|
||||||
sed -i "s|^#autovacuum_analyze_scale_factor = .*|autovacuum_analyze_scale_factor = 0.02|" "$PGCONF"
|
|
||||||
sed -i "s|^autovacuum_analyze_scale_factor = .*|autovacuum_analyze_scale_factor = 0.02|" "$PGCONF"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
do_database_dump() {
|
do_database_dump() {
|
||||||
@@ -241,16 +180,12 @@ do_database_dump() {
|
|||||||
pg_ctl stop -m fast
|
pg_ctl stop -m fast
|
||||||
rm "$DUMP_DIR/export.failed"
|
rm "$DUMP_DIR/export.failed"
|
||||||
echo 'Database dump successful!'
|
echo 'Database dump successful!'
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
pg_ctl stop -m fast
|
pg_ctl stop -m fast
|
||||||
echo "Database dump unsuccessful!"
|
echo "Database dump unsuccessful!"
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
# From https://github.com/redis/docker-library-redis/blob/release/8.2/alpine/Dockerfile
|
# From https://github.com/redis/docker-library-redis/blob/release/8.2/alpine/Dockerfile
|
||||||
FROM redis:8.6.3-alpine
|
FROM redis:8.6.2-alpine
|
||||||
|
|
||||||
COPY --chmod=775 start.sh /start.sh
|
COPY --chmod=775 start.sh /start.sh
|
||||||
|
|
||||||
@@ -23,9 +23,4 @@ ENTRYPOINT ["/start.sh"]
|
|||||||
HEALTHCHECK CMD /healthcheck.sh
|
HEALTHCHECK CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Redis for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Redis cache server for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
redis-cli -a "$REDIS_HOST_PASSWORD" PING || exit 1
|
redis-cli -a "$REDIS_HOST_PASSWORD" PING || exit 1
|
||||||
|
|||||||
@@ -1,50 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# Show wiki if vm.overcommit is disabled
|
||||||
if [ "$(sysctl -n vm.overcommit_memory)" != "1" ]; then
|
if [ "$(sysctl -n vm.overcommit_memory)" != "1" ]; then
|
||||||
echo "Memory overcommit is disabled but necessary for safe operation"
|
echo "Memory overcommit is disabled but necessary for safe operation"
|
||||||
echo "See https://github.com/nextcloud/all-in-one/discussions/1731 how to enable overcommit"
|
echo "See https://github.com/nextcloud/all-in-one/discussions/1731 how to enable overcommit"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Warn if Transparent Huge Pages are enabled (causes latency spikes)
|
|
||||||
if [ -f /sys/kernel/mm/transparent_hugepage/enabled ]; then
|
|
||||||
if grep -q '\[always\]' /sys/kernel/mm/transparent_hugepage/enabled; then
|
|
||||||
echo "WARNING: Transparent Huge Pages (THP) are enabled. This can cause latency and memory issues with Redis."
|
|
||||||
echo "Consider disabling THP by running: echo never > /sys/kernel/mm/transparent_hugepage/enabled"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build the redis-server argument list.
|
|
||||||
REDIS_ARGS=(
|
|
||||||
--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
|
|
||||||
--lazyfree-lazy-expire yes # Expire keys in a background thread
|
|
||||||
--lazyfree-lazy-server-del yes # DEL/UNLINK in background thread
|
|
||||||
--replica-lazy-flush yes # Flush replica dataset in background thread
|
|
||||||
--activedefrag yes # Reclaim fragmented memory without restart
|
|
||||||
--hz 15 # Run background tasks 15×/s (default 10) for faster key expiry
|
|
||||||
)
|
|
||||||
|
|
||||||
if [ -n "$REDIS_HOST_PASSWORD" ]; then
|
|
||||||
REDIS_ARGS+=(--requirepass "$REDIS_HOST_PASSWORD")
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run redis with a password if provided
|
# Run redis with a password if provided
|
||||||
echo "Redis has started"
|
echo "Redis has started"
|
||||||
exec redis-server "${REDIS_ARGS[@]}"
|
if [ -n "$REDIS_HOST_PASSWORD" ]; then
|
||||||
|
exec redis-server --requirepass "$REDIS_HOST_PASSWORD" --loglevel warning
|
||||||
|
else
|
||||||
|
exec redis-server --loglevel warning
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM python:3.14.5-alpine3.23
|
FROM python:3.14.3-alpine3.23
|
||||||
|
|
||||||
COPY --chmod=775 start.sh /start.sh
|
COPY --chmod=775 start.sh /start.sh
|
||||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||||
|
|
||||||
ENV RECORDING_VERSION=v0.2.1
|
ENV RECORDING_VERSION=v0.2.1
|
||||||
ENV ALLOW_ALL=false \
|
ENV ALLOW_ALL=false
|
||||||
HPB_PROTOCOL=https \
|
ENV HPB_PROTOCOL=https
|
||||||
NC_PROTOCOL=https \
|
ENV NC_PROTOCOL=https
|
||||||
SKIP_VERIFY=false \
|
ENV SKIP_VERIFY=false
|
||||||
HPB_PATH=/standalone-signaling/ \
|
ENV HPB_PATH=/standalone-signaling/
|
||||||
AIO_LOG_LEVEL=warn
|
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk upgrade --no-cache -a; \
|
apk upgrade --no-cache -a; \
|
||||||
@@ -20,7 +19,6 @@ RUN set -ex; \
|
|||||||
bash \
|
bash \
|
||||||
xvfb \
|
xvfb \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
mesa-va-gallium \
|
|
||||||
firefox \
|
firefox \
|
||||||
font-noto-all \
|
font-noto-all \
|
||||||
font-noto-cjk \
|
font-noto-cjk \
|
||||||
@@ -35,9 +33,6 @@ RUN set -ex; \
|
|||||||
build-base \
|
build-base \
|
||||||
linux-headers \
|
linux-headers \
|
||||||
geckodriver; \
|
geckodriver; \
|
||||||
if [ "$(apk --print-arch)" = "x86_64" ]; then \
|
|
||||||
apk add --no-cache intel-media-driver; \
|
|
||||||
fi; \
|
|
||||||
useradd -d /tmp --system recording -u 122; \
|
useradd -d /tmp --system recording -u 122; \
|
||||||
# Give root a random password
|
# Give root a random password
|
||||||
echo "root:$(openssl rand -base64 12)" | chpasswd; \
|
echo "root:$(openssl rand -base64 12)" | chpasswd; \
|
||||||
@@ -67,9 +62,4 @@ CMD ["python", "-m", "nextcloud.talk.recording", "--config", "/conf/recording.co
|
|||||||
HEALTHCHECK CMD /healthcheck.sh
|
HEALTHCHECK CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Talk Recording for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Nextcloud Talk recording service for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
nc -z 127.0.0.1 1234 || exit 1
|
nc -z 127.0.0.1 1234 || exit 1
|
||||||
|
|||||||
@@ -1,17 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# Variables
|
||||||
if [ -z "$NC_DOMAIN" ]; then
|
if [ -z "$NC_DOMAIN" ]; then
|
||||||
echo "You need to provide the NC_DOMAIN."
|
echo "You need to provide the NC_DOMAIN."
|
||||||
@@ -31,37 +19,10 @@ fi
|
|||||||
# Delete all contents on startup to start fresh
|
# Delete all contents on startup to start fresh
|
||||||
rm -fr /tmp/{*,.*}
|
rm -fr /tmp/{*,.*}
|
||||||
|
|
||||||
# Detect available hardware for transcoding and build the [ffmpeg] config section accordingly
|
|
||||||
FFMPEG_SECTION="[ffmpeg]
|
|
||||||
# common = ffmpeg -loglevel level+warning -n
|
|
||||||
# outputaudio = -c:a libopus
|
|
||||||
# outputvideo = -c:v libvpx -deadline:v realtime -crf 10 -b:v 1M
|
|
||||||
extensionaudio = .ogg
|
|
||||||
extensionvideo = .webm"
|
|
||||||
|
|
||||||
# Check for NVIDIA GPU hardware encoding (NVENC)
|
|
||||||
if [ -e "/dev/nvidia0" ] && ffmpeg -hide_banner -encoders 2>/dev/null | grep -q "h264_nvenc"; then
|
|
||||||
echo "NVIDIA GPU detected, enabling h264_nvenc hardware transcoding"
|
|
||||||
FFMPEG_SECTION="[ffmpeg]
|
|
||||||
outputvideo = -c:v h264_nvenc -preset p4
|
|
||||||
outputaudio = -c:a aac
|
|
||||||
extensionaudio = .m4a
|
|
||||||
extensionvideo = .mp4"
|
|
||||||
# Check for VA-API render node (Intel/AMD open source drivers)
|
|
||||||
elif [ -r "/dev/dri/renderD128" ] && ffmpeg -hide_banner -encoders 2>/dev/null | grep -q "h264_vaapi"; then
|
|
||||||
echo "DRI device detected, enabling h264_vaapi hardware transcoding"
|
|
||||||
FFMPEG_SECTION="[ffmpeg]
|
|
||||||
common = ffmpeg -loglevel level+warning -n -vaapi_device /dev/dri/renderD128
|
|
||||||
outputvideo = -vf format=nv12,hwupload -c:v h264_vaapi
|
|
||||||
outputaudio = -c:a aac
|
|
||||||
extensionaudio = .m4a
|
|
||||||
extensionvideo = .mp4"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat << RECORDING_CONF > "/conf/recording.conf"
|
cat << RECORDING_CONF > "/conf/recording.conf"
|
||||||
[logs]
|
[logs]
|
||||||
# 30 means Warning
|
# 30 means Warning
|
||||||
level = ${TALK_RECORDING_LOG_LEVEL}
|
level = 30
|
||||||
|
|
||||||
[http]
|
[http]
|
||||||
listen = 0.0.0.0:1234
|
listen = 0.0.0.0:1234
|
||||||
@@ -89,7 +50,12 @@ signalings = signaling-1
|
|||||||
url = ${HPB_PROTOCOL}://${HPB_DOMAIN}${HPB_PATH}
|
url = ${HPB_PROTOCOL}://${HPB_DOMAIN}${HPB_PATH}
|
||||||
internalsecret = ${INTERNAL_SECRET}
|
internalsecret = ${INTERNAL_SECRET}
|
||||||
|
|
||||||
${FFMPEG_SECTION}
|
[ffmpeg]
|
||||||
|
# common = ffmpeg -loglevel level+warning -n
|
||||||
|
# outputaudio = -c:a libopus
|
||||||
|
# outputvideo = -c:v libvpx -deadline:v realtime -crf 10 -b:v 1M
|
||||||
|
extensionaudio = .ogg
|
||||||
|
extensionvideo = .webm
|
||||||
|
|
||||||
[recording]
|
[recording]
|
||||||
browser = firefox
|
browser = firefox
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM nats:2.14.1-scratch AS nats
|
FROM nats:2.12.6-scratch AS nats
|
||||||
FROM eturnal/eturnal:1.12.2-alpine AS eturnal
|
FROM eturnal/eturnal:1.12.2-alpine AS eturnal
|
||||||
FROM strukturag/nextcloud-spreed-signaling:2.1.1 AS signaling
|
FROM strukturag/nextcloud-spreed-signaling:2.1.1 AS signaling
|
||||||
FROM alpine:3.23.4 AS janus
|
FROM alpine:3.23.3 AS janus
|
||||||
|
|
||||||
ARG JANUS_VERSION=v1.4.1
|
ARG JANUS_VERSION=v1.4.0
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk upgrade --no-cache -a; \
|
apk upgrade --no-cache -a; \
|
||||||
@@ -35,10 +35,9 @@ RUN set -ex; \
|
|||||||
make configs; \
|
make configs; \
|
||||||
rename -v ".jcfg.sample" ".jcfg" /usr/local/etc/janus/*.jcfg.sample
|
rename -v ".jcfg.sample" ".jcfg" /usr/local/etc/janus/*.jcfg.sample
|
||||||
|
|
||||||
FROM alpine:3.23.4
|
FROM alpine:3.23.3
|
||||||
ENV ETURNAL_ETC_DIR="/conf"
|
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=janus --chmod=777 --chown=1000:1000 /usr/local /usr/local
|
||||||
COPY --from=eturnal --chmod=777 --chown=1000:1000 /opt/eturnal /opt/eturnal
|
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
|
COPY --from=nats --chmod=777 --chown=1000:1000 /nats-server /usr/local/bin/nats-server
|
||||||
@@ -83,9 +82,7 @@ RUN set -ex; \
|
|||||||
touch \
|
touch \
|
||||||
/etc/nats.conf \
|
/etc/nats.conf \
|
||||||
/etc/eturnal.yml; \
|
/etc/eturnal.yml; \
|
||||||
# write_deadline: "10s" — without a write deadline, a lagging subscriber can stall the broker indefinitely, blocking all other signaling messages.
|
echo "listen: 127.0.0.1:4222" | tee /etc/nats.conf; \
|
||||||
# max_payload: 8MB — the default is 1 MB; signaling payloads in large meetings (many participants, ICE candidates) can exceed this, causing dropped messages.
|
|
||||||
printf 'listen: 127.0.0.1:4222\nwrite_deadline: "10s"\nmax_payload: 8MB\n' | tee /etc/nats.conf; \
|
|
||||||
mkdir -p \
|
mkdir -p \
|
||||||
/var/tmp \
|
/var/tmp \
|
||||||
/conf \
|
/conf \
|
||||||
@@ -112,9 +109,4 @@ CMD ["supervisord", "-c", "/supervisord.conf"]
|
|||||||
HEALTHCHECK CMD /healthcheck.sh
|
HEALTHCHECK CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Talk for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Nextcloud Talk with NATS, Janus, eturnal, and signaling server for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/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 8081 || exit 1
|
||||||
nc -z 127.0.0.1 8188 || exit 1
|
nc -z 127.0.0.1 8188 || exit 1
|
||||||
nc -z 127.0.0.1 4222 || exit 1
|
nc -z 127.0.0.1 4222 || exit 1
|
||||||
nc -z 127.0.0.1 "$TALK_PORT" || exit 1
|
nc -z 127.0.0.1 "$TALK_PORT" || exit 1
|
||||||
eturnalctl status || exit 1
|
eturnalctl status || exit 1
|
||||||
# Verify that the signaling server is actually serving requests, not just
|
|
||||||
# listening on the TCP port (which nc -z above only tests for open port).
|
|
||||||
wget -q -O /dev/null http://127.0.0.1:8081/api/v1/stats || exit 1
|
|
||||||
|
|||||||
@@ -1,23 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# Variables
|
||||||
if [ -z "$NC_DOMAIN" ]; then
|
if [ -z "$NC_DOMAIN" ]; then
|
||||||
echo "You need to provide the NC_DOMAIN."
|
echo "You need to provide the NC_DOMAIN."
|
||||||
@@ -49,9 +31,7 @@ if mountpoint -q /usr/local/share/ca-certificates; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
export SSL_CERT_FILE=/tmp/ca-certificates.crt
|
export SSL_CERT_FILE=/tmp/ca-certificates.crt
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
@@ -60,9 +40,7 @@ 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)"
|
IPv4_ADDRESS_TALK="$(dig "$TALK_HOST" IN A +short +search | grep '^[0-9.]\+$' | sort | head -n1)"
|
||||||
# shellcheck disable=SC2153
|
# shellcheck disable=SC2153
|
||||||
IPv6_ADDRESS_TALK="$(dig "$TALK_HOST" AAAA +short +search | grep '^[0-9a-f:]\+$' | sort | head -n1)"
|
IPv6_ADDRESS_TALK="$(dig "$TALK_HOST" AAAA +short +search | grep '^[0-9a-f:]\+$' | sort | head -n1)"
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$IPv4_ADDRESS_TALK" ] && [ "$IPv4_ADDRESS_TALK_RELAY" = "$IPv4_ADDRESS_TALK" ]; then
|
if [ -n "$IPv4_ADDRESS_TALK" ] && [ "$IPv4_ADDRESS_TALK_RELAY" = "$IPv4_ADDRESS_TALK" ]; then
|
||||||
IPv4_ADDRESS_TALK=""
|
IPv4_ADDRESS_TALK=""
|
||||||
@@ -75,9 +53,7 @@ if grep -q "1" /sys/module/ipv6/parameters/disable \
|
|||||||
|| grep -q "1" /proc/sys/net/ipv6/conf/default/disable_ipv6; then
|
|| grep -q "1" /proc/sys/net/ipv6/conf/default/disable_ipv6; then
|
||||||
IP_BINDING="0.0.0.0"
|
IP_BINDING="0.0.0.0"
|
||||||
fi
|
fi
|
||||||
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
set +x
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Turn
|
# Turn
|
||||||
cat << TURN_CONF > "/conf/eturnal.yml"
|
cat << TURN_CONF > "/conf/eturnal.yml"
|
||||||
@@ -90,7 +66,7 @@ eturnal:
|
|||||||
port: $TALK_PORT
|
port: $TALK_PORT
|
||||||
transport: tcp
|
transport: tcp
|
||||||
log_dir: stdout
|
log_dir: stdout
|
||||||
log_level: ${ETURNAL_LOG_LEVEL}
|
log_level: warning
|
||||||
secret: "$TURN_SECRET"
|
secret: "$TURN_SECRET"
|
||||||
relay_ipv4_addr: "$IPv4_ADDRESS_TALK_RELAY"
|
relay_ipv4_addr: "$IPv4_ADDRESS_TALK_RELAY"
|
||||||
relay_ipv6_addr: "$IPv6_ADDRESS_TALK"
|
relay_ipv6_addr: "$IPv6_ADDRESS_TALK"
|
||||||
@@ -115,12 +91,10 @@ if [ -z "$TALK_MAX_SCREEN_BITRATE" ]; then
|
|||||||
TALK_MAX_SCREEN_BITRATE=2097152
|
TALK_MAX_SCREEN_BITRATE=2097152
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Signaling
|
# Signling
|
||||||
cat << SIGNALING_CONF > "/conf/signaling.conf"
|
cat << SIGNALING_CONF > "/conf/signaling.conf"
|
||||||
[http]
|
[http]
|
||||||
listen = 0.0.0.0:8081
|
listen = 0.0.0.0:8081
|
||||||
readtimeout = 15
|
|
||||||
writetimeout = 30
|
|
||||||
|
|
||||||
[app]
|
[app]
|
||||||
debug = false
|
debug = false
|
||||||
@@ -136,9 +110,7 @@ internalsecret = ${INTERNAL_SECRET}
|
|||||||
backends = backend-1
|
backends = backend-1
|
||||||
allowall = false
|
allowall = false
|
||||||
timeout = 10
|
timeout = 10
|
||||||
# connectionsperhost: This is the HTTP keep-alive connection pool size from the signaling server to the Nextcloud backend.
|
connectionsperhost = 8
|
||||||
# Under load (many concurrent calls joining/leaving simultaneously) a pool of 8 creates a queue bottleneck for backend authentication and session lookups, thus increasing to 32.
|
|
||||||
connectionsperhost = 32
|
|
||||||
skipverify = ${SKIP_CERT_VERIFY}
|
skipverify = ${SKIP_CERT_VERIFY}
|
||||||
|
|
||||||
[backend-1]
|
[backend-1]
|
||||||
@@ -157,34 +129,4 @@ maxstreambitrate = ${TALK_MAX_STREAM_BITRATE}
|
|||||||
maxscreenbitrate = ${TALK_MAX_SCREEN_BITRATE}
|
maxscreenbitrate = ${TALK_MAX_SCREEN_BITRATE}
|
||||||
SIGNALING_CONF
|
SIGNALING_CONF
|
||||||
|
|
||||||
# Configure Janus to use the local TURN server for its own relay candidates.
|
|
||||||
# Ephemeral TURN credentials (TURN REST API pattern):
|
|
||||||
# username = "<expiry_unix_timestamp>:<random_hex>" (valid for 3 months)
|
|
||||||
# password = base64(HMAC-SHA1(TURN_SECRET, username))
|
|
||||||
# eturnal validates both the HMAC and the embedded expiry on every Allocate,
|
|
||||||
# so a captured credential stops working after at most 3 months.
|
|
||||||
JANUS_TURN_USER="$(( $(date +%s) + 7776000 )):$(openssl rand -hex 16)"
|
|
||||||
JANUS_TURN_PWD="$(printf '%s' "$JANUS_TURN_USER" | openssl dgst -sha1 -hmac "$TURN_SECRET" -binary | openssl base64)"
|
|
||||||
|
|
||||||
if [ -z "$TURN_DOMAIN" ]; then
|
|
||||||
TURN_DOMAIN="$NC_DOMAIN"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build janus.jcfg: strip the entire nat block from the original and append a
|
|
||||||
# clean minimal one that points at the TURN server.
|
|
||||||
{
|
|
||||||
sed '/^nat:/,/^}/d' /usr/local/etc/janus/janus.jcfg
|
|
||||||
cat << NAT_CONF
|
|
||||||
nat: {
|
|
||||||
turn_server = "$TURN_DOMAIN"
|
|
||||||
turn_port = $TALK_PORT
|
|
||||||
turn_type = "udp"
|
|
||||||
turn_user = "$JANUS_TURN_USER"
|
|
||||||
turn_pwd = "$JANUS_TURN_PWD"
|
|
||||||
# The ice ignore list is set by janus by default, so also do this here
|
|
||||||
ice_ignore_list = "vmnet"
|
|
||||||
}
|
|
||||||
NAT_CONF
|
|
||||||
} > /conf/janus.jcfg
|
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
@@ -5,16 +5,7 @@ pidfile=/var/run/supervisord/supervisord.pid
|
|||||||
childlogdir=/var/log/supervisord/
|
childlogdir=/var/log/supervisord/
|
||||||
logfile_maxbytes=50MB
|
logfile_maxbytes=50MB
|
||||||
logfile_backups=10
|
logfile_backups=10
|
||||||
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
loglevel=error
|
||||||
|
|
||||||
[program:nats-server]
|
|
||||||
stdout_logfile=/dev/stdout
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/stderr
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
command=nats-server -c /etc/nats.conf
|
|
||||||
# Start first: signaling depends on NATS being available
|
|
||||||
priority=10
|
|
||||||
|
|
||||||
[program:eturnal]
|
[program:eturnal]
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
@@ -22,17 +13,21 @@ stdout_logfile_maxbytes=0
|
|||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=eturnalctl foreground
|
command=eturnalctl foreground
|
||||||
# Start alongside Janus; independent of signaling
|
|
||||||
priority=20
|
[program:nats-server]
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
command=nats-server -c /etc/nats.conf
|
||||||
|
|
||||||
[program:janus]
|
[program:janus]
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=janus --config=/conf/janus.jcfg --disable-colors --log-stdout --full-trickle --debug-level %(ENV_JANUS_LOG_LEVEL)s
|
# debug-level 3 means warning
|
||||||
# Start alongside eturnal; signaling connects to Janus via WebSocket
|
command=janus --config=/usr/local/etc/janus/janus.jcfg --disable-colors --log-stdout --full-trickle --debug-level 3
|
||||||
priority=20
|
|
||||||
|
|
||||||
[program:signaling]
|
[program:signaling]
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
@@ -40,5 +35,3 @@ stdout_logfile_maxbytes=0
|
|||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=nextcloud-spreed-signaling -config /conf/signaling.conf
|
command=nextcloud-spreed-signaling -config /conf/signaling.conf
|
||||||
# Start last: depends on NATS (priority=10) and Janus (priority=20) being up
|
|
||||||
priority=30
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM golang:1.26.3-alpine3.23 AS go
|
FROM golang:1.26.1-alpine3.23 AS go
|
||||||
|
|
||||||
ENV WATCHTOWER_COMMIT_HASH=652c89577076f6bc6f2af4465217589641216ee3
|
ENV WATCHTOWER_COMMIT_HASH=5a33e3c0aa3b2770c648a114b4a9d32e0a5b55ba
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk upgrade --no-cache -a; \
|
apk upgrade --no-cache -a; \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
build-base; \
|
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.14.4
|
||||||
|
|
||||||
FROM alpine:3.23.4
|
FROM alpine:3.23.3
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk upgrade --no-cache -a; \
|
apk upgrade --no-cache -a; \
|
||||||
@@ -22,14 +22,7 @@ COPY --chmod=775 start.sh /start.sh
|
|||||||
# hadolint ignore=DL3002
|
# hadolint ignore=DL3002
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ENV AIO_LOG_LEVEL="warn"
|
|
||||||
|
|
||||||
ENTRYPOINT ["/start.sh"]
|
ENTRYPOINT ["/start.sh"]
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Watchtower for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Watchtower auto-update service for Nextcloud All-in-One containers" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if socket is available and readable
|
# Check if socket is available and readable
|
||||||
if ! [ -e "/var/run/docker.sock" ]; then
|
if ! [ -e "/var/run/docker.sock" ]; then
|
||||||
echo "Docker socket is not available. Cannot continue."
|
echo "Docker socket is not available. Cannot continue."
|
||||||
@@ -21,7 +17,7 @@ if [ -f /run/.containerenv ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$CONTAINER_TO_UPDATE" ]; then
|
if [ -n "$CONTAINER_TO_UPDATE" ]; then
|
||||||
exec /watchtower --cleanup --log-level "$AIO_LOG_LEVEL" --run-once "$CONTAINER_TO_UPDATE"
|
exec /watchtower --cleanup --debug --run-once "$CONTAINER_TO_UPDATE"
|
||||||
else
|
else
|
||||||
echo "'CONTAINER_TO_UPDATE' is not set. Cannot update anything."
|
echo "'CONTAINER_TO_UPDATE' is not set. Cannot update anything."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
# Probably from this file: https://github.com/nextcloud/whiteboard/blob/main/Dockerfile
|
# Probably from this file: https://github.com/nextcloud/whiteboard/blob/main/Dockerfile
|
||||||
FROM ghcr.io/nextcloud-releases/whiteboard:v1.5.8
|
FROM ghcr.io/nextcloud-releases/whiteboard:v1.5.7
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
@@ -24,9 +24,4 @@ ENTRYPOINT ["/start.sh"]
|
|||||||
|
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
org.opencontainers.image.title="Whiteboard for Nextcloud AIO" \
|
org.label-schema.vendor="Nextcloud"
|
||||||
org.opencontainers.image.description="Collaborative whiteboard service for Nextcloud All-in-One" \
|
|
||||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
|
||||||
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"
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
nc -z "$REDIS_HOST" "$REDIS_PORT" || exit 0
|
nc -z "$REDIS_HOST" "$REDIS_PORT" || exit 0
|
||||||
nc -z 127.0.0.1 3002 || exit 1
|
nc -z 127.0.0.1 3002 || exit 1
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
export LOG_LEVEL="$AIO_LOG_LEVEL"
|
|
||||||
|
|
||||||
# Only start container if nextcloud is accessible
|
# Only start container if nextcloud is accessible
|
||||||
while ! nc -z "$REDIS_HOST" "$REDIS_PORT"; do
|
while ! nc -z "$REDIS_HOST" "$REDIS_PORT"; do
|
||||||
echo "Waiting for redis to start..."
|
echo "Waiting for redis to start..."
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
# https://editorconfig.org
|
# https://editorconfig.org
|
||||||
|
|
||||||
# note: the files in ./composer actually use 4 spaces instead of tabs
|
|
||||||
|
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.feature]
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<category>monitoring</category>
|
<category>monitoring</category>
|
||||||
<bugs>https://github.com/nextcloud/all-in-one/issues</bugs>
|
<bugs>https://github.com/nextcloud/all-in-one/issues</bugs>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<nextcloud min-version="32" max-version="33"/>
|
<nextcloud min-version="31" max-version="32"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<settings>
|
<settings>
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
# 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?
|
## 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`.
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ This container bundles caddy and auto-configures it for you. It also covers [vau
|
|||||||
- If you want to use this with [nextcloud-exporter](https://github.com/nextcloud/all-in-one/tree/main/community-containers/nextcloud-exporter), make sure that you point `metrics.your-nc-domain.com` to your server using a cname record so that caddy can get a certificate automatically for nextcloud-exporter.
|
- If you want to use this with [nextcloud-exporter](https://github.com/nextcloud/all-in-one/tree/main/community-containers/nextcloud-exporter), make sure that you point `metrics.your-nc-domain.com` to your server using a cname record so that caddy can get a certificate automatically for nextcloud-exporter.
|
||||||
- If you want to use this with [local AI](https://github.com/nextcloud/all-in-one/tree/main/community-containers/local-ai), make sure that you point `ai.your-nc-domain.com` to your server using a cname record so that caddy can get a certificate automatically for local AI.
|
- If you want to use this with [local AI](https://github.com/nextcloud/all-in-one/tree/main/community-containers/local-ai), make sure that you point `ai.your-nc-domain.com` to your server using a cname record so that caddy can get a certificate automatically for local AI.
|
||||||
- After the container was started the first time, you should see a new `nextcloud-aio-caddy` folder and inside there an `allowed-countries.txt` file when you open the files app with the default `admin` user. In there you can adjust the allowed country codes for caddy by adding them to the first line, e.g. `IT FR` would allow access from italy and france. Private ip-ranges are always allowed. Additionally, in order to activate this config, you need to get an account at https://dev.maxmind.com/geoip/geolite2-free-geolocation-data and download the `GeoLite2-Country.mmdb` and upload it with this exact name into the `nextcloud-aio-caddy` folder. Afterwards restart all containers from the AIO interface and your new config should be active!
|
- After the container was started the first time, you should see a new `nextcloud-aio-caddy` folder and inside there an `allowed-countries.txt` file when you open the files app with the default `admin` user. In there you can adjust the allowed country codes for caddy by adding them to the first line, e.g. `IT FR` would allow access from italy and france. Private ip-ranges are always allowed. Additionally, in order to activate this config, you need to get an account at https://dev.maxmind.com/geoip/geolite2-free-geolocation-data and download the `GeoLite2-Country.mmdb` and upload it with this exact name into the `nextcloud-aio-caddy` folder. Afterwards restart all containers from the AIO interface and your new config should be active!
|
||||||
- You can add your own Caddy configurations in the folder `nextcloud-aio-caddy/caddy-imports` in the files app of the default `admin` user. You need to create that folder manually. These will be imported on container startup.
|
- You can add your own Caddy configurations in `/data/caddy-imports/` inside the Caddy container (`sudo docker exec -it nextcloud-aio-caddy bash`). These will be imported on container startup. **Please note:** If you do not have CLI access to the server, you can now run docker commands via a web session by using this community container: https://github.com/nextcloud/all-in-one/tree/main/community-containers/container-management
|
||||||
- You can alternatively add your own Caddy configurations in `/data/caddy-imports/` inside the Caddy container (`sudo docker exec -it nextcloud-aio-caddy bash`). These will be imported on container startup. **Please note:** If you do not have CLI access to the server use the previous option or run docker commands via a web session by using this community container: https://github.com/nextcloud/all-in-one/tree/main/community-containers/container-management
|
|
||||||
- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack
|
- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack
|
||||||
- If you want to remove the container again and revert back to the default, you need to disable the container via the AIO-interface and follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#8-removing-the-reverse-proxy
|
- If you want to remove the container again and revert back to the default, you need to disable the container via the AIO-interface and follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#8-removing-the-reverse-proxy
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
{
|
|
||||||
"aio_services_v1": [
|
|
||||||
{
|
|
||||||
"container_name": "nextcloud-aio-home-assistant",
|
|
||||||
"display_name": "Home Assistant",
|
|
||||||
"documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/home-assistant",
|
|
||||||
"image": "ghcr.io/home-assistant/home-assistant",
|
|
||||||
"image_tag": "stable",
|
|
||||||
"internal_port": "host",
|
|
||||||
"restart": "unless-stopped",
|
|
||||||
"init": false,
|
|
||||||
"environment": [
|
|
||||||
"TZ=%TIMEZONE%",
|
|
||||||
"DISABLE_JEMALLOC=true"
|
|
||||||
],
|
|
||||||
"cap_add": [
|
|
||||||
"NET_ADMIN",
|
|
||||||
"NET_RAW"
|
|
||||||
],
|
|
||||||
"volumes": [
|
|
||||||
{
|
|
||||||
"source": "nextcloud_aio_home_assistant",
|
|
||||||
"destination": "/config",
|
|
||||||
"writeable": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"backup_volumes": [
|
|
||||||
"nextcloud_aio_home_assistant"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
## Home Assistant
|
|
||||||
This container bundles Home Assistant and auto-configures it for you.
|
|
||||||
|
|
||||||
### Notes
|
|
||||||
- This container should only be run in home networks since Home Assistant is designed for local home automation.
|
|
||||||
- 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
|
|
||||||
https://github.com/home-assistant/core
|
|
||||||
|
|
||||||
### Maintainer
|
|
||||||
https://github.com/szaimen
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user