mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-06-10 16:38:18 +00:00
Compare commits
373 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b5db690518 | |||
| 9b981918b0 | |||
| 4bbd561aba | |||
| aa56b603ab | |||
| 4a35fda9d2 | |||
| 3a6ffcd9e9 | |||
| e659d3e047 | |||
| 7c2d0128ff | |||
| 3de2d79cd6 | |||
| 5b17e9368e | |||
| f22ed12c4b | |||
| e30f416d55 | |||
| 0ca4307bcb | |||
| 313c39d2bc | |||
| f7f107a3e5 | |||
| fe1ad77a45 | |||
| 8018fc9802 | |||
| 0c80e3071e | |||
| bec4f533cb | |||
| d6c6601b29 | |||
| 851cc26663 | |||
| d6644fd6a3 | |||
| 4c998aff73 | |||
| 99b5c181b1 | |||
| bc5ca59675 | |||
| 5a7f543754 | |||
| e2380aa521 | |||
| 39f4808376 | |||
| aadadf4460 | |||
| 52f8dc9043 | |||
| e96f5b43fa | |||
| 1f91919dca | |||
| 9c276df668 | |||
| 95f1691352 | |||
| 6cbf5eeefb | |||
| 25c7b8f7ef | |||
| 5393ffbb81 | |||
| 3cee8b2dda | |||
| 6375921282 | |||
| 792549c904 | |||
| 50eea8421b | |||
| 9ea710ba0e | |||
| 4940ece62a | |||
| eed6c74e0c | |||
| ee7d639a0e | |||
| 7fc2a134b7 | |||
| bd1d52b220 | |||
| d8e42d2fd8 | |||
| 8b6ff83c19 | |||
| 82f2e9dca1 | |||
| 414ef03706 | |||
| f668767765 | |||
| 2b8de735dc | |||
| 21250f8ea8 | |||
| dc69f69e74 | |||
| f28b2a7c1e | |||
| 1b1a15edba | |||
| 1f94bc8af0 | |||
| 335db2aac2 | |||
| f5f19a488f | |||
| a78622e69a | |||
| 01e3f8247d | |||
| 1937bf9690 | |||
| 517543babd | |||
| 751cc9e16f | |||
| a9f722b453 | |||
| cbeb056e08 | |||
| da5490b662 | |||
| 99307a0ebe | |||
| f73bfa6283 | |||
| 34aec1c790 | |||
| e17415591a | |||
| 28c8faf997 | |||
| 54b9817061 | |||
| 4f9725c5d4 | |||
| 71b2ae78c4 | |||
| 66adab1ac0 | |||
| 3ceb97c173 | |||
| 4f4420c713 | |||
| dd0e4269a1 | |||
| 32a0b97ce3 | |||
| a0e7a80ac9 | |||
| 62295caa39 | |||
| a529bac3b4 | |||
| 660f7cec08 | |||
| bf4c721fe0 | |||
| b7317a4db6 | |||
| 052c0e6ff3 | |||
| 0722cf95be | |||
| b6ddc024fe | |||
| acbfffd361 | |||
| b1ca6f4997 | |||
| b4057096ac | |||
| 62396eee0d | |||
| e31a493785 | |||
| fb3ff3acbf | |||
| 1a4093220f | |||
| a5cc10295d | |||
| e9716690de | |||
| 5d10dcb284 | |||
| 1a7d50463a | |||
| cfd8f7f47d | |||
| 6cef8a1bfc | |||
| 69afd5c857 | |||
| 7a499f3d0a | |||
| e52f3944ee | |||
| 2f7b98ddff | |||
| a50f28424d | |||
| 26c74fd556 | |||
| d2d59eb207 | |||
| 21649225d0 | |||
| 9cfaad674c | |||
| 0b0f848377 | |||
| 79b24149dc | |||
| 24c88f3fd2 | |||
| 2082fb6bbc | |||
| f976c55726 | |||
| 1514c05435 | |||
| 55c08cab00 | |||
| 2b1ec334e8 | |||
| 99704807d0 | |||
| dabb7d0224 | |||
| 1a2d168a7f | |||
| abaea7b4c2 | |||
| a1c818bc38 | |||
| f178b49cc1 | |||
| 1d546bbb59 | |||
| 5a474d92d9 | |||
| 795baf903b | |||
| b4c0266461 | |||
| 3a988938b2 | |||
| 7c0df4f701 | |||
| 1d27e165e6 | |||
| 22d2db35b1 | |||
| a75d1c48bf | |||
| 74b98b369e | |||
| 74dee77fac | |||
| 70100ba5ef | |||
| de72608519 | |||
| 02c9a7475b | |||
| c2e48d3524 | |||
| b615acf413 | |||
| 379b3d9e5a | |||
| abbe6a85cf | |||
| 20835baa0c | |||
| a32568cc9c | |||
| c6748dc450 | |||
| 4c73a123ca | |||
| b0c4f97ba2 | |||
| 6288665170 | |||
| 3517ba3039 | |||
| a3d84cce7b | |||
| 535a0ffbd2 | |||
| 1d947355ab | |||
| fdfd479db7 | |||
| d4da301c9a | |||
| 4c0b28f70d | |||
| 34429865fe | |||
| 1b696a1242 | |||
| aa115110d5 | |||
| 01365c817f | |||
| 774bd38f79 | |||
| 82fc4635a2 | |||
| e8b9e25cf8 | |||
| d6a06f9e79 | |||
| 8e19b7165d | |||
| 7ae8f729fb | |||
| e6c340779f | |||
| e9a2076a9c | |||
| a571faa4a5 | |||
| cdda9ea637 | |||
| dca9c6b2e2 | |||
| af7c1d02fd | |||
| 1a70a9e9fd | |||
| 0837266f86 | |||
| ea9eca44c2 | |||
| 3fc84ee784 | |||
| bf445e699f | |||
| a03df48865 | |||
| cbea0730d3 | |||
| 6c33a96980 | |||
| 6a07493f4d | |||
| e510e14550 | |||
| 1c5169c9e4 | |||
| b0c00866d4 | |||
| ba48b8134f | |||
| 0a553459ab | |||
| f42e669704 | |||
| 483d562b20 | |||
| 5a77d4e842 | |||
| c5b853e50b | |||
| 2a757d3d66 | |||
| 19b94f40d5 | |||
| 33f40632dd | |||
| ff7443b566 | |||
| fedb0a65df | |||
| 574a408d10 | |||
| 79dd1286e9 | |||
| 96002b185d | |||
| 3828b1ae3d | |||
| cdad9614cd | |||
| c55ae87002 | |||
| 3021f256ce | |||
| 124a6d295b | |||
| 0c6c1caa90 | |||
| 889096ab2b | |||
| cf2fb5f58d | |||
| 76c03d11f0 | |||
| 1bc3896314 | |||
| d86ff57d2f | |||
| a93e9ff0c6 | |||
| b25b0e1075 | |||
| e4d92bdea6 | |||
| d9332ef966 | |||
| 9d53188df3 | |||
| acb18004de | |||
| 70a0a4a361 | |||
| aa7ff451b8 | |||
| 5eb6850d92 | |||
| 78b4bea957 | |||
| 0af08104f5 | |||
| df14efa1ef | |||
| f5d35f0197 | |||
| 901cd8ccef | |||
| 9ed2b32d3e | |||
| 5c1d85b27d | |||
| 55a4ffab63 | |||
| 846bc06bc5 | |||
| 441a2a28e3 | |||
| df9971b249 | |||
| 15ae285d9f | |||
| 1fa4f3b6a3 | |||
| 654c39ff1e | |||
| 91d59af4dc | |||
| 5091f27e87 | |||
| c74d08902e | |||
| 216c73d3aa | |||
| 6c1c33e069 | |||
| f0949a8746 | |||
| 79eccd576d | |||
| 323a34a437 | |||
| f2076fa56b | |||
| 5bb2778fb7 | |||
| 3b3c8ba25c | |||
| 0be797a531 | |||
| 490a1811c8 | |||
| 99ea91c5ef | |||
| 7b2de0683e | |||
| f7b677fb51 | |||
| ee8a5a185c | |||
| 2b0cb13f35 | |||
| 1e064fed8a | |||
| a1eaea85ed | |||
| bc2105d668 | |||
| c545bffc53 | |||
| dc27f8078f | |||
| 9f9846461e | |||
| 8e3141ab75 | |||
| f060a334d3 | |||
| 4417d1ca7a | |||
| cdc617d0b7 | |||
| 71dbf98d48 | |||
| 42e2d88b3e | |||
| 4682355bfe | |||
| 13ac536b68 | |||
| 9b9b3b638d | |||
| 7b6bda1f60 | |||
| 764314524d | |||
| 4910c3f012 | |||
| 55790da3eb | |||
| 035e270245 | |||
| 4e8292b922 | |||
| 50643afd6a | |||
| 4f4ef8f1d6 | |||
| 4acc5b87e3 | |||
| 753ea8d3fd | |||
| dbda18b67d | |||
| 461f9e14c1 | |||
| 457a0d9fef | |||
| ffd9dd2da8 | |||
| 2bc3c4e7ec | |||
| 46eb2dfc7d | |||
| 0dd6ab3f2c | |||
| 119f68b6ee | |||
| cd2d06fca6 | |||
| 6c3403d95d | |||
| 8b40127b0e | |||
| 8d77f3340a | |||
| dac2ccd195 | |||
| c7d980e7bc | |||
| 024e404c8d | |||
| aa831bc8a5 | |||
| 8727df147d | |||
| a747ab1c5e | |||
| f28d94c30c | |||
| 6dc1cd6ebd | |||
| 1f813aacc3 | |||
| 670e38969c | |||
| ae5a21eadf | |||
| d772c14f55 | |||
| 172c72f735 | |||
| 39f30a6609 | |||
| 5cf4580a86 | |||
| 47307b37f8 | |||
| da88c7d25b | |||
| f113f2c155 | |||
| f1dacad6b3 | |||
| 30cb79bb62 | |||
| f80f888d6c | |||
| 95f70d2082 | |||
| d69939f010 | |||
| ab167fe665 | |||
| 02eae0f5ed | |||
| 60231f09eb | |||
| 38996ddb29 | |||
| e30742904e | |||
| 6185478b21 | |||
| d1a677909e | |||
| 14c4ff7809 | |||
| d837898ade | |||
| 2c0461d223 | |||
| 498c4bda12 | |||
| 81878f669e | |||
| 49234b77fe | |||
| 07bd520b77 | |||
| 995b5cc27a | |||
| d8aa83f4e0 | |||
| 74ec1b6baa | |||
| c20bae5a0f | |||
| e76ccf4f3c | |||
| 14dc5b7729 | |||
| d46b222c4e | |||
| 5e0ee16b9e | |||
| fadbdc5c78 | |||
| f8274028ea | |||
| e05bdaeca0 | |||
| 7699ac9c12 | |||
| 84d8d78106 | |||
| 546474346f | |||
| 54ca36ec46 | |||
| 8a5440134b | |||
| 177c093dd9 | |||
| 2eee2eac53 | |||
| 7bf5b18d5e | |||
| 9d33eb29d2 | |||
| b2e02da46b | |||
| 954f250ac8 | |||
| 0cea791a64 | |||
| 49afd85adc | |||
| 9f6b0c2fe9 | |||
| 8de44cf6aa | |||
| 45a1cd73b6 | |||
| 304dc97ad6 | |||
| 0af87295a6 | |||
| b71408af98 | |||
| d6e4b83c51 | |||
| 563a047a9a | |||
| 7c40f57f36 | |||
| f91d26115b | |||
| 180ea67cbb | |||
| ce2b4c6b87 | |||
| 953a5fdf1e | |||
| bce78168e4 | |||
| 7031310257 | |||
| 301f42d2a0 | |||
| 5fe6adc62a | |||
| 5c016d5d35 | |||
| fed44e0010 | |||
| 47733776b9 | |||
| 44148ba4a3 | |||
| f99a59fb58 | |||
| a79f637251 | |||
| 640b5b7d6d |
@@ -0,0 +1,20 @@
|
|||||||
|
# https://editorconfig.org
|
||||||
|
|
||||||
|
# Tip: to find files violating the rules set out here, run `docker run --rm --volume=$PWD:/check mstruebing/editorconfig-checker`
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.yaml]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_size = 2
|
||||||
@@ -31,12 +31,12 @@ updates:
|
|||||||
- "/Containers/collabora"
|
- "/Containers/collabora"
|
||||||
- "/Containers/docker-socket-proxy"
|
- "/Containers/docker-socket-proxy"
|
||||||
- "/Containers/domaincheck"
|
- "/Containers/domaincheck"
|
||||||
|
- "/Containers/eurooffice"
|
||||||
- "/Containers/fulltextsearch"
|
- "/Containers/fulltextsearch"
|
||||||
- "/Containers/imaginary"
|
- "/Containers/imaginary"
|
||||||
- "/Containers/mastercontainer"
|
- "/Containers/mastercontainer"
|
||||||
- "/Containers/nextcloud"
|
- "/Containers/nextcloud"
|
||||||
- "/Containers/notify-push"
|
- "/Containers/notify-push"
|
||||||
- "/Containers/onlyoffice"
|
|
||||||
- "/Containers/postgresql"
|
- "/Containers/postgresql"
|
||||||
- "/Containers/redis"
|
- "/Containers/redis"
|
||||||
- "/Containers/talk"
|
- "/Containers/talk"
|
||||||
|
|||||||
@@ -3,3 +3,8 @@
|
|||||||
-
|
-
|
||||||
- Before sending a pull request that fixes a security issue please report it via our HackerOne page (https://hackerone.com/nextcloud) following our security policy (https://nextcloud.com/security/). This allows us to coordinate the fix and release without potentially exposing all Nextcloud servers and users in the meantime.
|
- Before sending a pull request that fixes a security issue please report it via our HackerOne page (https://hackerone.com/nextcloud) following our security policy (https://nextcloud.com/security/). This allows us to coordinate the fix and release without potentially exposing all Nextcloud servers and users in the meantime.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- Please check the below checkmarks if applicable -->
|
||||||
|
|
||||||
|
- [ ] The PR was tested and verified that it works locally
|
||||||
|
- [ ] The PR was completely or partially created with AI
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: Check spelling
|
- name: Check spelling
|
||||||
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2
|
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
name: update collabora
|
name: update collabora
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: Run collabora-profile-update
|
- name: Run collabora-profile-update
|
||||||
run: |
|
run: |
|
||||||
rm -f php/cool-seccomp-profile.json
|
rm -f php/cool-seccomp-profile.json
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: Validate structure
|
- name: Validate structure
|
||||||
run: |
|
run: |
|
||||||
CONTAINERS="$(find ./community-containers -mindepth 1 -maxdepth 1 -type d)"
|
CONTAINERS="$(find ./community-containers -mindepth 1 -maxdepth 1 -type d)"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
name: Run dependency update script
|
name: Run dependency update script
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
- uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
||||||
with:
|
with:
|
||||||
php-version: 8.5
|
php-version: 8.5
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
|
|
||||||
- name: Install hadolint
|
- name: Install hadolint
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -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@ed597411d8f924073f98dfc5c65a23a2325f34cd # v6
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const tags = await github.rest.repos.listTags({
|
const tags = await github.rest.repos.listTags({
|
||||||
|
|||||||
@@ -10,13 +10,16 @@ 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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
|
|
||||||
- name: Turnstyle
|
- name: Turnstyle
|
||||||
uses: softprops/turnstyle@e565d2d86403c5d23533937e95980570545e5586 # v2
|
uses: softprops/turnstyle@e15e934b3f69ee283ba389ea05c8886baa656d93 # v2
|
||||||
with:
|
with:
|
||||||
continue-after-seconds: 180
|
continue-after-seconds: 180
|
||||||
env:
|
env:
|
||||||
@@ -32,7 +35,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@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
|
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
|
||||||
with:
|
with:
|
||||||
version: v3.6.3
|
version: v3.6.3
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
name: update to latest imaginary commit on master branch
|
name: update to latest imaginary commit on master branch
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: Run imaginary-update
|
- name: Run imaginary-update
|
||||||
run: |
|
run: |
|
||||||
# Imaginary
|
# Imaginary
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: Validate Json
|
- name: Validate Json
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Helm
|
- name: Install Helm
|
||||||
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
|
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
|
||||||
with:
|
with:
|
||||||
version: v3.11.1
|
version: v3.11.1
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.1
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.1
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -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@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.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
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
action:
|
action:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@7266a7ce5c1df01b1c6db85bf8cd86c737dadbe7 # v5
|
- uses: dessant/lock-threads@89ae32b08ed1a541efecbab17912962a5e38981c # v5
|
||||||
with:
|
with:
|
||||||
issue-inactive-days: '14'
|
issue-inactive-days: '14'
|
||||||
process-only: 'issues'
|
process-only: 'issues'
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ jobs:
|
|||||||
name: Run nextcloud-update script
|
name: Run nextcloud-update script
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: Run nextcloud-update script
|
- name: Run nextcloud-update script
|
||||||
run: |
|
run: |
|
||||||
# Inspired by https://github.com/nextcloud/docker/blob/master/update.sh
|
# Inspired by https://github.com/nextcloud/docker/blob/master/update.sh
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
name: PHP Deprecation Detector
|
name: PHP Deprecation Detector
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: Set up php
|
- name: Set up php
|
||||||
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -5,12 +5,14 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'php/**'
|
- 'php/**'
|
||||||
- 'Containers/mastercontainer/*.Caddyfile'
|
- 'Containers/mastercontainer/*.Caddyfile'
|
||||||
|
- 'Containers/mastercontainer/start.sh'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'php/**'
|
- 'php/**'
|
||||||
- 'Containers/mastercontainer/*.Caddyfile'
|
- '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 }}
|
||||||
@@ -26,11 +28,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
|
|
||||||
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: 24.15.0
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: cd php/tests && npm ci
|
run: cd php/tests && npm ci
|
||||||
@@ -55,7 +57,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,6 +74,7 @@ jobs:
|
|||||||
--volume ./php:/var/www/docker-aio/php \
|
--volume ./php:/var/www/docker-aio/php \
|
||||||
--volume ./Containers/mastercontainer/internal.Caddyfile:/internal.Caddyfile \
|
--volume ./Containers/mastercontainer/internal.Caddyfile:/internal.Caddyfile \
|
||||||
--volume ./Containers/mastercontainer/headers.Caddyfile:/headers.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 \
|
||||||
@@ -103,6 +106,7 @@ jobs:
|
|||||||
--volume ./php:/var/www/docker-aio/php \
|
--volume ./php:/var/www/docker-aio/php \
|
||||||
--volume ./Containers/mastercontainer/internal.Caddyfile:/internal.Caddyfile \
|
--volume ./Containers/mastercontainer/internal.Caddyfile:/internal.Caddyfile \
|
||||||
--volume ./Containers/mastercontainer/headers.Caddyfile:/headers.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 \
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
|
|
||||||
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: 24.15.0
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: cd php/tests && npm ci
|
run: cd php/tests && npm ci
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
|
|
||||||
- name: Set up php
|
- name: Set up php
|
||||||
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
name: static-psalm-analysis
|
name: static-psalm-analysis
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
name: Check Shell
|
name: Check Shell
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: Run Shellcheck
|
- name: Run Shellcheck
|
||||||
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0
|
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -42,14 +42,14 @@ jobs:
|
|||||||
require: admin
|
require: admin
|
||||||
|
|
||||||
- name: Checkout workflow repository
|
- name: Checkout workflow repository
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
path: source
|
path: source
|
||||||
repository: nextcloud/.github
|
repository: nextcloud/.github
|
||||||
|
|
||||||
- name: Checkout app
|
- name: Checkout app
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
path: target
|
path: target
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
name: update talk
|
name: update talk
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: Run talk-container-update
|
- name: Run talk-container-update
|
||||||
run: |
|
run: |
|
||||||
# Recording
|
# Recording
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
- name: Set up php ${{ matrix.php-versions }}
|
||||||
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ jobs:
|
|||||||
name: update copyright
|
name: update copyright
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: update helm chart
|
- name: update helm chart
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: update yaml files
|
- name: update yaml files
|
||||||
run: |
|
run: |
|
||||||
sudo bash manual-install/update-yaml.sh
|
sudo bash manual-install/update-yaml.sh
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
name: update watchtower
|
name: update watchtower
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- name: Run watchtower-container-update
|
- name: Run watchtower-container-update
|
||||||
run: |
|
run: |
|
||||||
# Watchtower
|
# Watchtower
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<!--
|
||||||
|
- SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
|
||||||
|
- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
-->
|
||||||
|
|
||||||
|
# Agent Guidelines for Nextcloud All-in-one
|
||||||
|
|
||||||
|
This file provides instructions for AI coding agents (Claude Code, GitHub Copilot, Cursor, Windsurf, and others) operating on this repository. Read it before generating any code, commits, or pull requests.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Nextcloud Contribution Policy
|
||||||
|
|
||||||
|
All contributions generated or assisted by this agent must fully comply with:
|
||||||
|
|
||||||
|
- **[AI Contribution Policy](https://github.com/nextcloud/.github/blob/master/AI_POLICY.md)** - the primary reference for AI-specific rules, covering disclosure, author accountability, communication, security, licensing, code quality, and autonomous agent behavior.
|
||||||
|
- **[Contribution Guidelines](https://github.com/nextcloud/.github/blob/master/CONTRIBUTING.md)** - covering testing requirements, the Developer Certificate of Origin (DCO), license headers, conventional commits, and translations. These apply in full to all contributions regardless of how they were produced.
|
||||||
|
|
||||||
|
### What this agent must always do
|
||||||
|
|
||||||
|
- Add an `Assisted-by: AGENT_NAME:MODEL_VERSION` git trailer to every commit containing AI-assisted content.
|
||||||
|
- Ensure every pull request includes a disclosure of AI tool use in the PR description.
|
||||||
|
- Produce focused, scoped pull requests that address exactly one concern. Do not touch unrelated files or introduce incidental refactors.
|
||||||
|
- Verify all dependencies against actual package registries before suggesting them. Do not use hallucinated or unverified package names.
|
||||||
|
- Explicitly inform the contributor when any action they are about to take, or have taken, would violate the AI Contribution Policy or the Contribution Guidelines. Do not silently proceed. State which rule is at risk and what the contributor should do instead.
|
||||||
|
- Warn the contributor if a pull request is growing too large. A PR approaching several thousand lines of changed code is a signal that it should be split into smaller, focused PRs. Suggest a logical split before the PR is opened, not after.
|
||||||
|
- Recommend opening a ticket for discussion before starting implementation whenever a feature or change is sufficiently complex - for example when it touches multiple subsystems, requires architectural decisions, or the right approach is not yet clear. A ticket allows maintainers and the contributor to align on direction before code is written, avoiding wasted effort on a PR that may be rejected or require fundamental rework.
|
||||||
|
|
||||||
|
### What this agent must never do
|
||||||
|
|
||||||
|
- Open issues, submit pull requests, post review comments, or send security reports autonomously. Every contribution must be reviewed and submitted by a human.
|
||||||
|
- Add `Signed-off-by` tags to commits. Only the human contributor can certify the Developer Certificate of Origin.
|
||||||
|
- Generate or submit security reports without independent human verification. Report verified vulnerabilities via [HackerOne](https://hackerone.com/nextcloud), not as GitHub issues.
|
||||||
|
- Write PR descriptions, review comments, or issue reports on behalf of the contributor. These must be in the contributor's own words.
|
||||||
|
- Submit code that has not been reviewed and cleaned up by the contributor. Dead code, redundant logic, excessive comments, and unrelated changes must be removed before submission.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Repository-Specific Requirements
|
||||||
|
|
||||||
|
### Commit format
|
||||||
|
|
||||||
|
Use [Conventional Commits](https://www.conventionalcommits.org) for all commit messages:
|
||||||
|
|
||||||
|
```
|
||||||
|
<type>(<scope>): <short description>
|
||||||
|
|
||||||
|
[optional body]
|
||||||
|
|
||||||
|
Assisted-by: AGENT_NAME:MODEL_VERSION
|
||||||
|
```
|
||||||
|
|
||||||
|
Common types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `perf`, `build`, `ci`.
|
||||||
|
The scope should match the affected component or app (e.g. `files_sharing`, `core`, `encryption`).
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
feat(files_sharing): allow sharing with contacts
|
||||||
|
|
||||||
|
Assisted-by: ClaudeCode:claude-sonnet-4-6
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Every changed or added code segment must be covered by unit tests. Pull requests without tests for new or modified logic will not be accepted.
|
||||||
|
- In areas where unit testing is currently difficult, refactoring to enable testability is encouraged alongside the bug fix.
|
||||||
|
- New features must be manually tested on a live Nextcloud instance by the human contributor before submission. Providing test steps for an agent to execute is not a substitute.
|
||||||
|
|
||||||
|
### Developer Certificate of Origin (DCO)
|
||||||
|
|
||||||
|
The project uses the DCO as an additional safeguard. Only the human contributor may add the `Signed-off-by` trailer - agents must not add it:
|
||||||
|
|
||||||
|
```
|
||||||
|
Signed-off-by: Random J Developer <random@developer.example.org>
|
||||||
|
```
|
||||||
|
|
||||||
|
Contributors can sign automatically with `git commit -s` after configuring `user.name` and `user.email`.
|
||||||
|
|
||||||
|
### License headers
|
||||||
|
|
||||||
|
Every new file must include the correct SPDX license header. For AGPL-3.0-or-later (the default for this repository):
|
||||||
|
|
||||||
|
```php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: <year> <name>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
See [HowToApplyALicense.md](https://github.com/nextcloud/server/blob/master/contribute/HowToApplyALicense.md) for details on per-language formats. AI-generated code must not include material from sources incompatible with AGPL-3.0-or-later.
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
- Do not open GitHub issues for potential vulnerabilities. Report them via [HackerOne](https://hackerone.com/nextcloud) following the [security policy](https://nextcloud.com/security/).
|
||||||
|
- AI-generated security reports must be independently verified by the human contributor before submission.
|
||||||
|
- Manually verify all access control logic, authentication patterns, and dependency names - AI tools are known to hallucinate package names and reproduce vulnerable patterns.
|
||||||
|
|
||||||
|
### Scope of this repository
|
||||||
|
|
||||||
|
This repository covers the Nextcloud all-in-one and all its included containers and features. Issues and changes for other components belong in their respective repositories under the [Nextcloud GitHub organization](https://github.com/nextcloud/).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Further Reading
|
||||||
|
|
||||||
|
- [Local CONTRIBUTING.md](CONTRIBUTING.md)
|
||||||
|
- [Nextcloud Contribution Guidelines](https://github.com/nextcloud/all-in-one/blob/main/CONTRIBUTING.md)
|
||||||
|
- [AI Contribution Policy](https://github.com/nextcloud/all-in-one/blob/main/AI_POLICY.md)
|
||||||
|
- [Developer Certificate of Origin](https://github.com/nextcloud/server/blob/master/contribute/developer-certificate-of-origin)
|
||||||
|
- [How to Apply a License](https://github.com/nextcloud/server/blob/master/contribute/HowToApplyALicense.md)
|
||||||
|
- [Developer Manual](https://github.com/nextcloud/all-in-one/blob/main/develop.md)
|
||||||
|
- [Security Vulnerability Reporting (HackerOne)](https://hackerone.com/nextcloud)
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
<!--
|
||||||
|
- SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
|
||||||
|
- SPDX-License-Identifier: MIT
|
||||||
|
-->
|
||||||
|
|
||||||
|
# AI Contribution Policy
|
||||||
|
|
||||||
|
This document provides guidance for AI tools and developers using AI assistance when contributing to Nextcloud. It applies to all repositories under the [Nextcloud GitHub organization](https://github.com/nextcloud/), including the server, clients, apps, and the community app ecosystem.
|
||||||
|
|
||||||
|
This policy complements the existing [Contribution Guidelines](CONTRIBUTING.md). The requirements around testing, the Developer Certificate of Origin, license headers, and security reporting described there continue to apply in full - this document addresses how they extend to AI-assisted contributions.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
### Disclosure
|
||||||
|
|
||||||
|
Every pull request containing AI-assisted code, documentation, or tests must declare this in the PR description. PRs found to have undisclosed AI use might be closed.
|
||||||
|
|
||||||
|
For full traceability at the commit level, each commit containing AI-assisted content must include an `Assisted-by:` git trailer:
|
||||||
|
|
||||||
|
```
|
||||||
|
Assisted-by: AGENT_NAME:MODEL_VERSION
|
||||||
|
```
|
||||||
|
|
||||||
|
The agent name and model version identify the AI tool. Basic development tools such as git, compilers, editors, and static analyzers are not listed - these are standard parts of any development workflow regardless of AI involvement.
|
||||||
|
|
||||||
|
The PR description disclosure explains how AI was used; the commit trailer ensures that provenance is permanently recorded in version history and available to future contributors, auditors, and tooling.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
```
|
||||||
|
Assisted-by: Devstral:devstral-small-2507
|
||||||
|
Assisted-by: ClaudeCode:claude-sonnet-4-6
|
||||||
|
Assisted-by: Qwen:qwen3-coder-32b
|
||||||
|
Assisted-by: Copilot:gpt-4o
|
||||||
|
```
|
||||||
|
|
||||||
|
### Author Accountability
|
||||||
|
|
||||||
|
The contributor is the legal and moral author of every line they submit. If a reviewer asks "why does this work this way?" and the answer is "the AI wrote it," the PR will be closed. This applies to code, comments, documentation, and tests alike. You must be able to explain, defend, and modify any content you submit.
|
||||||
|
|
||||||
|
### Human-Written Communication
|
||||||
|
|
||||||
|
Issues, PR descriptions, and review comments must be in the contributor's own words. Translation assistance and grammar/spelling help are acceptable exceptions and do not need to be disclosed - the intent of this rule is to ensure that the ideas, reasoning, and decisions in community communication come from the contributor.
|
||||||
|
|
||||||
|
This requirement extends through the entire review process. Contributors must respond to reviewer questions and implement requested changes themselves. Passing maintainer feedback into an AI and posting whatever comes out is not an acceptable substitute for genuine engagement. If a contributor cannot explain or implement a requested change because they do not understand their own submission, the PR will be closed.
|
||||||
|
|
||||||
|
### Security and Dependency Scrutiny
|
||||||
|
|
||||||
|
AI tools hallucinate package names, produce subtly broken access controls, and may reproduce vulnerable patterns from their training data. Contributors must manually verify all dependencies, access control logic, authentication patterns, and security implications in AI-generated code before submitting - the risk of undetected errors is higher than with hand-written code and warrants extra care.
|
||||||
|
|
||||||
|
For general security requirements applicable to all contributions, see the [Contribution Guidelines](CONTRIBUTING.md). Security vulnerabilities must be reported via [HackerOne](https://hackerone.com/nextcloud) following Nextcloud's [security policy](https://nextcloud.com/security/), not via public issues. AI-generated security reports must be independently verified before submission; unverified reports might be closed without response.
|
||||||
|
|
||||||
|
### No Autonomous Agent Submissions
|
||||||
|
|
||||||
|
AI agents must not open issues, submit pull requests, post review comments, or send security reports autonomously. Every contribution must be composed, reviewed, and submitted by a human. This includes agentic workflows where an AI browses the codebase, plans changes across multiple files, and generates commits - the human contributor remains responsible for reviewing all output before anything is submitted.
|
||||||
|
|
||||||
|
AI agents must not add `Signed-off-by` tags: only humans can legally certify the [Developer Certificate of Origin](https://github.com/nextcloud/server/blob/master/contribute/developer-certificate-of-origin).
|
||||||
|
|
||||||
|
### Licensing and Copyright Compliance
|
||||||
|
|
||||||
|
Contributors must ensure AI-generated code contains no material from sources incompatible with the license of the repository or app they are contributing to. Each Nextcloud repository and app carries its own license - contributors are responsible for knowing which applies. For guidance on license headers, see [HowToApplyALicense.md](https://github.com/nextcloud/server/blob/master/contribute/HowToApplyALicense.md).
|
||||||
|
|
||||||
|
The applicable test has three parts: the AI tool's terms must permit open-source use of its output; no third-party copyrighted material may be reproduced; and any included material must use a compatible open-source license. If generated code appears identical or suspiciously similar to code from an incompatible source, it must be removed or replaced with an original implementation. Ignorance of AI-generated provenance is not a defense.
|
||||||
|
|
||||||
|
### Code Quality and Cleanup
|
||||||
|
|
||||||
|
AI output must be cleaned before submission. Dead code, redundant logic, excessive comments, inconsistent style, unused variables, structural drift, and unrelated file changes must all be removed. Submitting large AI code blobs without meaningful oversight - sometimes called "vibe coding" or "prompt dumping" - is prohibited.
|
||||||
|
|
||||||
|
Signs of a disallowed submission include: large unreviewed AI blobs; obvious mechanical mistakes a human would fix in minutes; code that has clearly never been executed; and pull requests that shift debugging and cleanup work onto maintainers rather than the contributor. As required by the [Contribution Guidelines](CONTRIBUTING.md), all changed and added code must be unit tested - AI-generated code is not exempt from this requirement.
|
||||||
|
|
||||||
|
New features must be tested on a live Nextcloud instance by the contributor before submission. Providing test instructions for an AI agent to execute is not a substitute for human testing.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Guidelines
|
||||||
|
|
||||||
|
### Focused and Scoped Pull Requests
|
||||||
|
|
||||||
|
A pull request should address exactly one thing. AI-generated code frequently drifts in scope due to imprecise prompting, touching unrelated files or introducing incidental refactors. If a PR description does not match its diff, that is a signal the contributor did not review their own changes. Large changes must be broken into multiple focused commits or separate PRs.
|
||||||
|
|
||||||
|
### Maintainer Discretion
|
||||||
|
|
||||||
|
Maintainers have unreviewable authority to close AI-assisted contributions for quality, complexity, scope, or community-fit reasons. A contribution that costs reviewers more time than it returns value to the project is extractive and will be closed, regardless of how many rounds of review it has already received. The golden rule applies: a contribution should be worth more to the project than the time it takes to review.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Scope and Updates
|
||||||
|
|
||||||
|
This policy applies to all contributions to repositories and apps under the Nextcloud GitHub organization, by all contributors. It will be reviewed and updated as AI tooling, open-source best practices, and applicable law evolve. Suggested changes are welcome via pull requests.
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
||||||
|
SPDX-License-Identifier: MIT
|
||||||
|
-->
|
||||||
|
|
||||||
|
## Submitting issues
|
||||||
|
|
||||||
|
If you have questions about how to install or use Nextcloud, please direct these to our [forum][forum].
|
||||||
|
|
||||||
|
### Guidelines
|
||||||
|
* Please search the existing issues first, it's likely that your issue was already reported or even fixed.
|
||||||
|
- Go to one of the repositories, click "issues" and type any word in the top search/command bar.
|
||||||
|
- More info on [search syntax within github](https://help.github.com/articles/searching-issues)
|
||||||
|
* __SECURITY__: Report any potential security bug to us via [our HackerOne page](https://hackerone.com/nextcloud) following our [security policy](https://nextcloud.com/security/) instead of filing an issue in our bug tracker.
|
||||||
|
* The issues in other components should be reported in their respective repositories: You will find them in our [GitHub Organization](https://github.com/nextcloud/)
|
||||||
|
* Report the issue using one of our templates, they include all the information we need to track down the issue.
|
||||||
|
|
||||||
|
Help us to maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues.
|
||||||
|
|
||||||
|
[forum]: https://help.nextcloud.com/
|
||||||
|
|
||||||
|
## Contributing to Source Code
|
||||||
|
|
||||||
|
Thanks for wanting to contribute source code to Nextcloud. That's great!
|
||||||
|
|
||||||
|
Please read the [Developer Manuals][devmanual] to learn how to create your first application or how to test the Nextcloud code.
|
||||||
|
|
||||||
|
### AI-assisted contributions
|
||||||
|
|
||||||
|
Nextcloud allows contributions made with the help of AI tools. You are the author of everything you submit - AI assistance does not change that responsibility.
|
||||||
|
|
||||||
|
* **Disclosure:** Declare AI tool use in the PR description and add an `Assisted-by: AGENT_NAME:MODEL_VERSION` git trailer to each affected commit.
|
||||||
|
|
||||||
|
* **Accountability:** You must be able to explain, defend, and modify every line you submit. If a reviewer asks why something works a certain way, "the AI wrote it" is not an answer.
|
||||||
|
|
||||||
|
* **Communication:** PR descriptions, review comments, and issue reports must be written in your own words. This applies throughout the review process - passing reviewer feedback to an AI and posting whatever comes out is not acceptable.
|
||||||
|
|
||||||
|
* **Quality:** AI output must be quality assured by the human, i.e. reviewed, cleaned up, and tested before submission. New features must be tested on a live instance by you, not by an agent. Code that has never been executed, or that shifts debugging work onto maintainers, will not be accepted.
|
||||||
|
|
||||||
|
* **Licensing:** Ensure AI-generated code contains no material incompatible with the license of the repository you are contributing to.
|
||||||
|
|
||||||
|
For the full policy including autonomous agent rules, security reports, and beginner issues, read the [AI Contribution Policy][aipolicy].
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
In order to constantly increase the quality of our software we can no longer accept pull request which submit un-tested code.
|
||||||
|
It is a must have that changed and added code segments are unit tested.
|
||||||
|
In some areas unit testing is hard (aka almost impossible) as of today - in these areas refactoring WHILE fixing a bug is encouraged to enable unit testing.
|
||||||
|
|
||||||
|
### Sign your work
|
||||||
|
|
||||||
|
We use the Developer Certificate of Origin (DCO) as a additional safeguard
|
||||||
|
for the Nextcloud project. This is a well established and widely used
|
||||||
|
mechanism to assure contributors have confirmed their right to license
|
||||||
|
their contribution under the project's license.
|
||||||
|
Please read [contribute/developer-certificate-of-origin][dcofile].
|
||||||
|
If you can certify it, then just add a line to every git commit message:
|
||||||
|
|
||||||
|
````
|
||||||
|
Signed-off-by: Random J Developer <random@developer.example.org>
|
||||||
|
````
|
||||||
|
|
||||||
|
Use your real name (sorry, no pseudonyms or anonymous contributions).
|
||||||
|
If you set your `user.name` and `user.email` git configs, you can sign your
|
||||||
|
commit automatically with `git commit -s`. You can also use git [aliases](https://git-scm.com/book/tr/v2/Git-Basics-Git-Aliases)
|
||||||
|
like `git config --global alias.ci 'commit -s'`. Now you can commit with
|
||||||
|
`git ci` and the commit will be signed.
|
||||||
|
|
||||||
|
### Apply a license
|
||||||
|
|
||||||
|
In case you are not sure how to add or update the license header correctly please have a look at [contribute/HowToApplyALicense.md][applyalicense]
|
||||||
|
|
||||||
|
[devmanual]: https://github.com/nextcloud/all-in-one/blob/main/develop.md
|
||||||
|
[dcofile]: https://github.com/nextcloud/server/blob/master/contribute/developer-certificate-of-origin
|
||||||
|
[applyalicense]: https://github.com/nextcloud/server/blob/master/contribute/HowToApplyALicense.md
|
||||||
|
[aipolicy]: https://github.com/nextcloud/all-in-one/blob/main/AI_POLICY.md
|
||||||
@@ -47,7 +47,14 @@ http://{$APACHE_HOST}.nextcloud-aio:23973, # For Collabora callback and WOPI req
|
|||||||
uri strip_prefix /onlyoffice
|
uri strip_prefix /onlyoffice
|
||||||
reverse_proxy {$ONLYOFFICE_HOST}:80 {
|
reverse_proxy {$ONLYOFFICE_HOST}:80 {
|
||||||
header_up X-Forwarded-Host {http.request.hostport}/onlyoffice
|
header_up X-Forwarded-Host {http.request.hostport}/onlyoffice
|
||||||
header_up X-Forwarded-Proto https
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# EuroOffice
|
||||||
|
route /eurooffice/* {
|
||||||
|
uri strip_prefix /eurooffice
|
||||||
|
reverse_proxy {$EUROOFFICE_HOST}:80 {
|
||||||
|
header_up X-Forwarded-Prefix /eurooffice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +85,7 @@ http://{$APACHE_HOST}.nextcloud-aio:23973, # For Collabora callback and WOPI req
|
|||||||
# TLS options
|
# TLS options
|
||||||
tls {
|
tls {
|
||||||
issuer acme {
|
issuer acme {
|
||||||
profile shortlived
|
profile tlsserver
|
||||||
# Disable HTTP challenge because that would require port 80, which we don't get (it's exposed to the mastercontainer).
|
# 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.
|
# 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.2-alpine AS caddy
|
FROM caddy:2.11.4-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.66-alpine3.23
|
FROM httpd:2.4.68-alpine3.23
|
||||||
|
|
||||||
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
|
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
|
||||||
|
|
||||||
@@ -103,6 +103,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Apache and Caddy for Nextcloud AIO" \
|
org.opencontainers.image.title="Apache and Caddy for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="Apache HTTP server with Caddy for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/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,35 +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 warn
|
LogLevel ${AIO_LOG_LEVEL}
|
||||||
|
|
||||||
# KeepAlive On: allow the same TCP connection to carry multiple HTTP requests.
|
|
||||||
# Without this each asset (JS, CSS, image) would require a full TCP handshake,
|
|
||||||
# which is especially expensive on TLS connections and noticeably slows down
|
|
||||||
# Nextcloud's login page and file manager that load dozens of resources at once.
|
|
||||||
KeepAlive On
|
|
||||||
# KeepAliveTimeout: close an idle keep-alive connection after 5 seconds.
|
|
||||||
# A short timeout frees Apache worker threads quickly so they are available
|
|
||||||
# for new requests; 5 s is long enough to cover the gap between requests
|
|
||||||
# that a browser issues while rendering a page (typically < 1 s), yet short
|
|
||||||
# enough to avoid holding threads open for idle or slow clients.
|
|
||||||
KeepAliveTimeout 5
|
|
||||||
# MaxKeepAliveRequests: allow at most 500 requests per persistent connection.
|
|
||||||
# 100 (the Apache default) is too low for Nextcloud: the desktop and mobile
|
|
||||||
# sync clients issue many small API calls (PROPFIND, GET, PUT, checksums …)
|
|
||||||
# per sync cycle and routinely exceed 100 requests on a single connection.
|
|
||||||
# Hitting the limit forces a new TCP/TLS handshake, adding latency and CPU
|
|
||||||
# overhead. 500 gives sync clients enough headroom while still periodically
|
|
||||||
# recycling threads to contain per-process memory growth.
|
|
||||||
MaxKeepAliveRequests 500
|
|
||||||
|
|
||||||
# sendfile(2) is disabled because it bypasses Apache's output-filter chain: with
|
|
||||||
# it enabled, mod_brotli is silently skipped for static files (JS, CSS, SVG),
|
|
||||||
# negating the compression configured below. MMAP is also
|
|
||||||
# disabled because files can be replaced by Nextcloud at any time and mmap'd
|
|
||||||
# pages could serve stale data.
|
|
||||||
EnableSendfile Off
|
|
||||||
EnableMMAP Off
|
|
||||||
|
|
||||||
# PHP match
|
# PHP match
|
||||||
<FilesMatch "\.php$">
|
<FilesMatch "\.php$">
|
||||||
@@ -45,17 +17,12 @@ 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 (quality 4 gives good
|
# Compress JS, CSS and SVG responses with Brotli.
|
||||||
# compression with reasonable CPU cost; the default of 0 barely compresses).
|
|
||||||
# Other plain-text files are already compressed by Nextcloud itself.
|
# Other plain-text files are already compressed by Nextcloud itself.
|
||||||
# No deflate fallback is needed: every browser that Nextcloud supports
|
|
||||||
# (Chrome 49+, Firefox 44+, Safari 11+, Edge 15+ — all from 2016-2017)
|
|
||||||
# supports Brotli. Internet Explorer, the only browser that never gained
|
|
||||||
# Brotli support, was dropped by Nextcloud with NC15 (2019).
|
|
||||||
# Desktop and mobile sync clients never request JS/CSS/SVG assets.
|
# 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 4
|
BrotliCompressionQuality 0
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
# Nextcloud dir
|
# Nextcloud dir
|
||||||
|
|||||||
@@ -1,10 +1,20 @@
|
|||||||
#!/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"
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ 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=error
|
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
||||||
|
|
||||||
[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=NONE
|
stdout_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=apachectl -DFOREGROUND
|
command=httpd -DFOREGROUND
|
||||||
|
|
||||||
[program:caddy]
|
[program:caddy]
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
|
|||||||
@@ -25,10 +25,12 @@ USER root
|
|||||||
|
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Borgbackup for Nextcloud AIO" \
|
org.opencontainers.image.title="Borgbackup for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="BorgBackup-based backup service for Nextcloud All-in-One" \
|
org.opencontainers.image.description="BorgBackup-based backup service for Nextcloud All-in-One" \
|
||||||
org.opencontainers.image.url="https://github.com/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.source="https://github.com/nextcloud/all-in-one" \
|
||||||
org.opencontainers.image.vendor="Nextcloud" \
|
org.opencontainers.image.vendor="Nextcloud" \
|
||||||
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md"
|
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md"
|
||||||
ENV BORG_RETENTION_POLICY="--keep-within=7d --keep-weekly=4 --keep-monthly=6"
|
ENV BORG_RETENTION_POLICY="--keep-within=7d --keep-weekly=4 --keep-monthly=6" \
|
||||||
|
AIO_LOG_LEVEL="warn"
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/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)
|
||||||
@@ -40,7 +44,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 info > /dev/null; then
|
if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != test ] && ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
||||||
if [ -n "$BORG_REMOTE_REPO" ]; then
|
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
|
||||||
@@ -123,7 +127,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 info > /dev/null; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" 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
|
||||||
@@ -140,14 +144,14 @@ if [ "$BORG_MODE" = backup ]; then
|
|||||||
|
|
||||||
echo "Initializing repository..."
|
echo "Initializing repository..."
|
||||||
NEW_REPOSITORY=1
|
NEW_REPOSITORY=1
|
||||||
if ! borg init --debug --encryption=repokey-blake2; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" init --encryption=repokey-blake2; then
|
||||||
echo "Could not initialize borg repository."
|
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 config :: additional_free_space 2G
|
borg "$BORG_LOG_LEVEL_FLAG" 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
|
||||||
@@ -156,7 +160,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 info > /dev/null; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
||||||
echo "Borg can't get info from the repo it created. Something is wrong."
|
echo "Borg can't get info from the repo it created. Something is wrong."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -216,9 +220,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 create "${BORG_OPTS[@]}" "${BORG_INCLUDE[@]}" "${BORG_EXCLUDE[@]}" "::$CURRENT_DATE-nextcloud-aio" "/nextcloud_aio_volumes/" --exclude-from /borg_excludes; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" create "${BORG_OPTS[@]}" "${BORG_INCLUDE[@]}" "${BORG_EXCLUDE[@]}" "::$CURRENT_DATE-nextcloud-aio" "/nextcloud_aio_volumes/" --exclude-from /borg_excludes; then
|
||||||
echo "Deleting the failed backup archive..."
|
echo "Deleting the failed backup archive..."
|
||||||
borg delete --stats "::$CURRENT_DATE-nextcloud-aio"
|
borg "$BORG_LOG_LEVEL_FLAG" delete --stats "::$CURRENT_DATE-nextcloud-aio"
|
||||||
echo "Backup failed!"
|
echo "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
|
||||||
@@ -237,14 +241,14 @@ if [ "$BORG_MODE" = backup ]; then
|
|||||||
|
|
||||||
# Prune archives
|
# Prune archives
|
||||||
echo "Pruning the archives..."
|
echo "Pruning the archives..."
|
||||||
if ! borg prune --stats --glob-archives '*_*-nextcloud-aio' "${BORG_PRUNE_OPTS[@]}"; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" prune --stats --glob-archives '*_*-nextcloud-aio' "${BORG_PRUNE_OPTS[@]}"; then
|
||||||
echo "Failed to prune archives!"
|
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 compact; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" compact; then
|
||||||
echo "Failed to compact archives!"
|
echo "Failed to compact archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -261,19 +265,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 create "${BORG_OPTS[@]}" "::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" create "${BORG_OPTS[@]}" "::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then
|
||||||
echo "Deleting the failed backup archive..."
|
echo "Deleting the failed backup archive..."
|
||||||
borg delete --stats "::$CURRENT_DATE-additional-docker-volumes"
|
borg "$BORG_LOG_LEVEL_FLAG" delete --stats "::$CURRENT_DATE-additional-docker-volumes"
|
||||||
echo "Backup of additional docker-volumes failed!"
|
echo "Backup of additional docker-volumes failed!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Pruning additional volumes..."
|
echo "Pruning additional volumes..."
|
||||||
if ! borg prune --stats --glob-archives '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" prune --stats --glob-archives '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then
|
||||||
echo "Failed to prune additional docker-volumes archives!"
|
echo "Failed to prune additional docker-volumes archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Compacting additional volumes..."
|
echo "Compacting additional volumes..."
|
||||||
if ! borg compact; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" compact; then
|
||||||
echo "Failed to compact additional docker-volume archives!"
|
echo "Failed to compact additional docker-volume archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -291,19 +295,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 create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then
|
||||||
echo "Deleting the failed backup archive..."
|
echo "Deleting the failed backup archive..."
|
||||||
borg delete --stats "::$CURRENT_DATE-additional-host-mounts"
|
borg "$BORG_LOG_LEVEL_FLAG" delete --stats "::$CURRENT_DATE-additional-host-mounts"
|
||||||
echo "Backup of additional host-mounts failed!"
|
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 prune --stats --glob-archives '*_*-additional-host-mounts' "${BORG_PRUNE_OPTS[@]}"; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" prune --stats --glob-archives '*_*-additional-host-mounts' "${BORG_PRUNE_OPTS[@]}"; then
|
||||||
echo "Failed to prune additional host-mount archives!"
|
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 compact; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" compact; then
|
||||||
echo "Failed to compact additional host-mount archives!"
|
echo "Failed to compact additional host-mount archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -385,7 +389,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 mount "::$SELECTED_ARCHIVE" /tmp/borg; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" mount "::$SELECTED_ARCHIVE" /tmp/borg; then
|
||||||
echo "Could not mount the backup!"
|
echo "Could not mount the backup!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -432,7 +436,7 @@ if [ "$BORG_MODE" = restore ]; then
|
|||||||
#
|
#
|
||||||
# Older backups may still contain files we've since excluded, so we have to exclude on extract as well.
|
# 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 extract "::$SELECTED_ARCHIVE" --progress --exclude-from /borg_excludes "${ADDITIONAL_BORG_EXCLUDES[@]}" --pattern '+nextcloud_aio_volumes/**'
|
if ! borg "$BORG_LOG_LEVEL_FLAG" extract "::$SELECTED_ARCHIVE" --progress --exclude-from /borg_excludes "${ADDITIONAL_BORG_EXCLUDES[@]}" --pattern '+nextcloud_aio_volumes/**'
|
||||||
then
|
then
|
||||||
RESTORE_FAILED=1
|
RESTORE_FAILED=1
|
||||||
echo "Failed to extract backup archive."
|
echo "Failed to extract backup archive."
|
||||||
@@ -464,7 +468,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 list "::$SELECTED_ARCHIVE" --short --exclude-from /borg_excludes --pattern '+nextcloud_aio_volumes/**' | LC_ALL=C sort) \
|
<(borg "$BORG_LOG_LEVEL_FLAG" list "::$SELECTED_ARCHIVE" --short --exclude-from /borg_excludes --pattern '+nextcloud_aio_volumes/**' | LC_ALL=C sort) \
|
||||||
> /tmp/local_files_not_in_backup
|
> /tmp/local_files_not_in_backup
|
||||||
then
|
then
|
||||||
RESTORE_FAILED=1
|
RESTORE_FAILED=1
|
||||||
@@ -552,7 +556,7 @@ if [ "$BORG_MODE" = check ]; then
|
|||||||
echo "Checking the backup integrity..."
|
echo "Checking the backup integrity..."
|
||||||
|
|
||||||
# Perform the check
|
# Perform the check
|
||||||
if ! borg check -v --verify-data; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" check -v --verify-data; then
|
||||||
echo "Some errors were found while checking the backup integrity!"
|
echo "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
|
||||||
@@ -570,7 +574,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 check -v --repair; then
|
if ! echo YES | borg "$BORG_LOG_LEVEL_FLAG" check -v --repair; then
|
||||||
echo "Some errors were found while checking and repairing the backup integrity!"
|
echo "Some errors were found while checking and repairing the backup integrity!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -584,7 +588,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 info > /dev/null; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
||||||
echo "Borg could not get info from the remote repo."
|
echo "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
|
||||||
@@ -605,12 +609,12 @@ if [ "$BORG_MODE" = test ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! borg list >/dev/null; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" list >/dev/null; then
|
||||||
echo "The entered path seems to be valid but could not open the backup archive."
|
echo "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 list | grep "nextcloud-aio"; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" list | grep "nextcloud-aio"; then
|
||||||
echo "The backup archive does not contain a valid Nextcloud AIO backup."
|
echo "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
|
||||||
@@ -623,7 +627,7 @@ fi
|
|||||||
|
|
||||||
if [ "$BORG_MODE" = list ]; then
|
if [ "$BORG_MODE" = list ]; then
|
||||||
echo "Updating backup list..."
|
echo "Updating backup list..."
|
||||||
if ! borg info > /dev/null; then
|
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
|
||||||
echo "Could not update the backup list."
|
echo "Could not update the backup list."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
#!/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
|
||||||
@@ -48,7 +59,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 list &>/dev/null; then
|
if borg "$BORG_LOG_LEVEL_FLAG" list &>/dev/null; then
|
||||||
borg list | grep "nextcloud-aio" | awk -F " " '{print $1","$3,$4}' > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
|
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"
|
||||||
|
|||||||
@@ -13,6 +13,15 @@ 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; \
|
||||||
@@ -34,6 +43,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="ClamAV for Nextcloud AIO" \
|
org.opencontainers.image.title="ClamAV for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="ClamAV antivirus scanner for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/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,5 +1,9 @@
|
|||||||
#!/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,12 +1,11 @@
|
|||||||
[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=error
|
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
||||||
|
|
||||||
[program:freshclam]
|
[program:freshclam]
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Collabora Online for Nextcloud AIO" \
|
org.opencontainers.image.title="Collabora Online for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="Collabora Online document editor from upstream for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
# From a file located probably somewhere here: https://github.com/CollaboraOnline/online/blob/master/docker/from-packages/Dockerfile
|
# From a file located probably somewhere here: https://github.com/CollaboraOnline/online/blob/master/docker/from-packages/Dockerfile
|
||||||
FROM collabora/code:25.04.9.4.1
|
FROM collabora/code:26.04.1.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
|
||||||
@@ -12,9 +13,12 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Collabora for Nextcloud AIO" \
|
org.opencontainers.image.title="Collabora for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="Collabora CODE document editor for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
org.opencontainers.image.source="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.vendor="Nextcloud" \
|
||||||
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md"
|
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md"
|
||||||
|
|
||||||
|
ENTRYPOINT ["/start.sh"]
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$AIO_LOG_LEVEL" = "warn" ]; then
|
||||||
|
COLLABORA_LOG_LEVEL="warning"
|
||||||
|
elif [ "$AIO_LOG_LEVEL" = "info" ]; then
|
||||||
|
COLLABORA_LOG_LEVEL="notice"
|
||||||
|
else
|
||||||
|
COLLABORA_LOG_LEVEL="$AIO_LOG_LEVEL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Replace the hardcoded log level in extra_params with the translated one
|
||||||
|
extra_params+=" --o:logging.level=$COLLABORA_LOG_LEVEL --o:logging.level_startup=$COLLABORA_LOG_LEVEL"
|
||||||
|
export extra_params
|
||||||
|
|
||||||
|
exec /start-collabora-online.sh "$@"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM haproxy:3.3.6-alpine
|
FROM haproxy:3.4.0-alpine
|
||||||
|
|
||||||
# hadolint ignore=DL3002
|
# hadolint ignore=DL3002
|
||||||
USER root
|
USER root
|
||||||
@@ -20,6 +20,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Docker Socket Proxy for Nextcloud AIO" \
|
org.opencontainers.image.title="Docker Socket Proxy for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="HAProxy-based Docker socket proxy for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
#!/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,5 +1,9 @@
|
|||||||
#!/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..."
|
||||||
@@ -18,6 +22,8 @@ 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
|
||||||
set +x
|
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||||
|
set +x
|
||||||
|
fi
|
||||||
|
|
||||||
haproxy -f /tmp/haproxy.cfg -db
|
haproxy -f /tmp/haproxy.cfg -db
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Domain Check for Nextcloud AIO" \
|
org.opencontainers.image.title="Domain Check for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="Domain validation service for Nextcloud All-in-One setup" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/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
|
||||||
@@ -14,6 +18,20 @@ 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
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# syntax=docker/dockerfile:latest
|
||||||
|
FROM ghcr.io/euro-office/documentserver:v9.3.1-beta.1
|
||||||
|
|
||||||
|
# USER root is probably used
|
||||||
|
|
||||||
|
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||||
|
|
||||||
|
HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
|
||||||
|
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||||
|
wud.watch="false" \
|
||||||
|
dockhand.update="false" \
|
||||||
|
org.opencontainers.image.title="EuroOffice for Nextcloud AIO" \
|
||||||
|
org.opencontainers.image.description="EuroOffice 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"
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
nc -z 127.0.0.1 80 || exit 1
|
||||||
@@ -1,21 +1,19 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
# Probably from here https://github.com/elastic/elasticsearch/blob/main/distribution/docker/src/docker/Dockerfile
|
# Probably from here https://github.com/elastic/dockerfiles/blob/9.3/elasticsearch/Dockerfile
|
||||||
FROM elasticsearch:8.19.14
|
FROM elasticsearch:9.4.2
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
# hadolint ignore=DL3041
|
||||||
|
|
||||||
# hadolint ignore=DL3008
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
apt-get update; \
|
microdnf update -y; \
|
||||||
apt-get upgrade -y; \
|
microdnf install -y --setopt=tsflags=nodocs \
|
||||||
apt-get install -y --no-install-recommends \
|
|
||||||
tzdata \
|
tzdata \
|
||||||
; \
|
; \
|
||||||
rm -rf /var/lib/apt/lists/*;
|
microdnf clean all;
|
||||||
|
|
||||||
|
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
|
||||||
@@ -23,6 +21,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Full Text Search for Nextcloud AIO" \
|
org.opencontainers.image.title="Full Text Search for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="Elasticsearch-based full-text search for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
@@ -30,3 +29,5 @@ LABEL com.centurylinklabs.watchtower.enable="false" \
|
|||||||
org.opencontainers.image.vendor="Nextcloud" \
|
org.opencontainers.image.vendor="Nextcloud" \
|
||||||
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md"
|
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,3 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
curl -fs "http://127.0.0.1:9200/_cluster/health?filter_path=status" | grep -qE '"status":"(green|yellow)"' || exit 1
|
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl -fs -u "elastic:$ELASTIC_PASSWORD" "http://127.0.0.1:9200/_cluster/health?filter_path=status" | grep -qE '"status":"(green|yellow)"' || exit 1
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
ELASTIC_LOG_LEVEL="$(echo "$AIO_LOG_LEVEL" | tr '[:lower:]' '[:upper:]')"
|
||||||
|
|
||||||
|
exec env "logger.level=$ELASTIC_LOG_LEVEL" /usr/local/bin/docker-entrypoint.sh "$@"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM golang:1.26.2-alpine3.23 AS go
|
FROM golang:1.26.4-alpine3.23 AS go
|
||||||
|
|
||||||
ENV IMAGINARY_HASH=6a274b488759a896aff02f52afee6e50b5e3a3ee
|
ENV IMAGINARY_HASH=6a274b488759a896aff02f52afee6e50b5e3a3ee
|
||||||
|
|
||||||
@@ -33,7 +33,8 @@ COPY --from=go /go/bin/imaginary /usr/local/bin/imaginary
|
|||||||
COPY --chmod=775 start.sh /start.sh
|
COPY --chmod=775 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
|
||||||
|
|
||||||
@@ -44,6 +45,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Imaginary for Nextcloud AIO" \
|
org.opencontainers.image.title="Imaginary for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="High-performance image processing service for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
wget -q -O /dev/null "http://127.0.0.1:${PORT}/health" || exit 1
|
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
nc -z 127.0.0.1 "$PORT" || exit 1
|
||||||
|
|||||||
@@ -1,5 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/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"
|
||||||
|
|
||||||
IMAGINARY_ARGS=(-return-size -max-allowed-resolution 222.2)
|
IMAGINARY_ARGS=(-return-size -max-allowed-resolution 222.2)
|
||||||
@@ -8,4 +23,4 @@ if [ -n "$IMAGINARY_SECRET" ]; then
|
|||||||
IMAGINARY_ARGS+=(-key "$IMAGINARY_SECRET")
|
IMAGINARY_ARGS+=(-key "$IMAGINARY_SECRET")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
imaginary "${IMAGINARY_ARGS[@]}" "$@"
|
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.4.0-cli AS docker
|
FROM docker:29.5.3-cli AS docker
|
||||||
|
|
||||||
ARG CADDY_REMOTE_HOST_HASH=b21775afa730ffb52a24ddff310c8a6d1fd37276
|
ARG CADDY_REMOTE_HOST_HASH=e80a9931765a8dbcbb47db415863387f0df0e1b3
|
||||||
|
|
||||||
# Caddy is a requirement
|
# Caddy is a requirement
|
||||||
FROM caddy:2.11.2-builder-alpine AS caddy
|
FROM caddy:2.11.4-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.5-fpm-alpine3.23
|
FROM php:8.5.7-fpm-alpine3.23
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
@@ -107,6 +107,7 @@ LABEL org.opencontainers.image.title="Nextcloud All-in-One Mastercontainer" \
|
|||||||
org.opencontainers.image.vendor="Nextcloud" \
|
org.opencontainers.image.vendor="Nextcloud" \
|
||||||
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md" \
|
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md" \
|
||||||
wud.watch="false" \
|
wud.watch="false" \
|
||||||
|
dockhand.update="false" \
|
||||||
com.docker.compose.project="nextcloud-aio"
|
com.docker.compose.project="nextcloud-aio"
|
||||||
|
|
||||||
# hadolint ignore=DL3002
|
# hadolint ignore=DL3002
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/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,5 +1,9 @@
|
|||||||
#!/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
|
||||||
@@ -17,7 +21,9 @@ while true; do
|
|||||||
else
|
else
|
||||||
export SEND_SUCCESS_NOTIFICATIONS=0
|
export SEND_SUCCESS_NOTIFICATIONS=0
|
||||||
fi
|
fi
|
||||||
set +x
|
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||||
|
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
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/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.
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ header {
|
|||||||
Referrer-Policy "no-referrer" # Tells the browser to never sent a Referer header. See https://developer.mozilla.org/de/docs/Web/HTTP/Reference/Headers/Referrer-Policy
|
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
|
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
|
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-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-Embedder-Policy "require-corp" # Harder rules for cross origin embeds. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cross-Origin-Embedder-Policy
|
||||||
Cross-Origin-Resource-Policy "same-origin"; # Only allow the same origin to load resources. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cross-Origin_Resource_Policy
|
Cross-Origin-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 disables browser features that AIO does not use. Since there is no "deny all" option, all known features need to be listed explicitly. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Permissions-Policy
|
||||||
Permissions-Policy "accelerometer=(), ambient-light-sensor=(), aria-notify=(), attribution-reporting=(), autoplay=(), battery=(), bluetooth=(), browsing-topics=(), camera=(), captured-surface-control=(), ch-ua-high-entropy-values=(), compute-pressure=(), cross-origin-isolated=(), deferred-fetch=(), deferred-fetch-minimal=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), language-detector=(), local-fonts=(), magnetometer=(), microphone=(), midi=(), on-device-speech-recognition=(), otp-credentials=(), payment=(), picture-in-picture=(), private-state-token-issuance=(), private-state-token-redemption=(), publickey-credentials-create=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), speaker-selection=(), storage-access=(), summarizer=(), translator=(), usb=(), web-share=(), window-management=(), xr-spatial-tracking=()"
|
Permissions-Policy "accelerometer=(), ambient-light-sensor=(), aria-notify=(), attribution-reporting=(), autoplay=(), bluetooth=(), browsing-topics=(), camera=(), captured-surface-control=(), ch-ua-high-entropy-values=(), compute-pressure=(), cross-origin-isolated=(), deferred-fetch=(), deferred-fetch-minimal=(), display-capture=(), encrypted-media=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), local-fonts=(), local-network=(), local-network-access=(), loopback-network=(), magnetometer=(), microphone=(), midi=(), on-device-speech-recognition=(), otp-credentials=(), payment=(), picture-in-picture=(), private-state-token-issuance=(), private-state-token-redemption=(), publickey-credentials-create=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), storage-access=(), summarizer=(), usb=(), web-share=(), window-management=(), xr-spatial-tracking=()"
|
||||||
|
|
||||||
-Server
|
-Server
|
||||||
-X-Powered-By
|
-X-Powered-By
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/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
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ 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,6 +20,10 @@ 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."
|
||||||
@@ -333,6 +337,22 @@ else
|
|||||||
export NEXTCLOUD_DRI_GID=""
|
export NEXTCLOUD_DRI_GID=""
|
||||||
fi
|
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
|
||||||
if ! curl --no-progress-meter https://ghcr.io/v2/ >/dev/null; then
|
if ! curl --no-progress-meter https://ghcr.io/v2/ >/dev/null; then
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ pidfile=/var/run/supervisord/supervisord.pid
|
|||||||
childlogdir=/var/log/supervisord/
|
childlogdir=/var/log/supervisord/
|
||||||
logfile_maxbytes=50MB
|
logfile_maxbytes=50MB
|
||||||
logfile_backups=10
|
logfile_backups=10
|
||||||
loglevel=error
|
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
||||||
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=NONE
|
stdout_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
||||||
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=root
|
user=www-data
|
||||||
|
|
||||||
[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=NONE
|
stdout_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
||||||
stderr_logfile=NONE
|
stderr_logfile=%(ENV_SUPERVISORD_STDOUT)s
|
||||||
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.30-fpm-alpine3.23
|
FROM php:8.3.31-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.2
|
ENV NEXTCLOUD_VERSION=33.0.5
|
||||||
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!
|
||||||
@@ -142,7 +142,7 @@ RUN set -ex; \
|
|||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
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}"'; \
|
echo 'session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}?database=${REDIS_DB_INDEX}${REDIS_USER_AUTH}&auth[]=${REDIS_HOST_PASSWORD}&timeout=3.0&read_timeout=10.0"'; \
|
||||||
echo 'redis.session.locking_enabled = 1'; \
|
echo 'redis.session.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 '; 100ms in microseconds - prevents timeout on long requests such as large file uploads'; \
|
||||||
@@ -244,27 +244,27 @@ RUN set -ex; \
|
|||||||
imagemagick-tiff \
|
imagemagick-tiff \
|
||||||
coreutils; \
|
coreutils; \
|
||||||
\
|
\
|
||||||
# Use dynamic pm mode: spare workers stay alive between requests so every request is served immediately
|
grep -q '^pm = dynamic' /usr/local/etc/php-fpm.d/www.conf; \
|
||||||
# without waiting for a new process to spawn (unlike ondemand which forks on every request when idle).
|
sed -i 's/^pm = dynamic/pm = ondemand/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||||
# pm.max_children: upper bound on worker processes; synced with max DB connections and MaxRequestWorkers.
|
# Sync this with max db connections and MaxRequestWorkers
|
||||||
# Set high so users never hit an artificial limit under peak load — spare-server bounds keep idle memory usage low.
|
# We don't actually expect so many children but don't want to limit it artificially because people will report issues otherwise.
|
||||||
|
# Also children will usually be terminated again after the process is done due to the ondemand setting
|
||||||
sed -i 's/^pm.max_children =.*/pm.max_children = 5000/' /usr/local/etc/php-fpm.d/www.conf; \
|
sed -i 's/^pm.max_children =.*/pm.max_children = 5000/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||||
# pm.start_servers: number of workers pre-forked at container startup.
|
# With pm = ondemand, workers are killed after pm.process_idle_timeout seconds
|
||||||
# Having 2 workers ready immediately means the first requests after boot are served without any spawn delay.
|
# of inactivity. The upstream default is 10 s, which is aggressive: after a
|
||||||
sed -i '/^;pm.start_servers/s/^;//' /usr/local/etc/php-fpm.d/www.conf; \
|
# brief quiet period (e.g. desktop-sync clients polling every few seconds), all
|
||||||
sed -i 's/^pm.start_servers =.*/pm.start_servers = 2/' /usr/local/etc/php-fpm.d/www.conf; \
|
# workers are reaped and the next request burst must wait for fresh forks. On
|
||||||
# pm.min_spare_servers: floor of idle workers kept alive at all times.
|
# a loaded host that spawn latency can push Apache past its FastCGI timeout and
|
||||||
# Guarantees at least 1 ready worker so a sudden burst of requests is handled without any fork wait.
|
# produce a 502. 300 s (5 min) keeps a warm pool through normal sync-client
|
||||||
sed -i '/^;pm.min_spare_servers/s/^;//' /usr/local/etc/php-fpm.d/www.conf; \
|
# polling cycles while still reclaiming memory during genuinely idle periods.
|
||||||
sed -i 's/^pm.min_spare_servers =.*/pm.min_spare_servers = 1/' /usr/local/etc/php-fpm.d/www.conf; \
|
sed -i 's/^;*pm.process_idle_timeout\s*=.*/pm.process_idle_timeout = 300s/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||||
# pm.max_spare_servers: ceiling of idle workers kept alive during quiet periods.
|
# Set request_terminate_timeout so that PHP-FPM forcibly kills workers that
|
||||||
# Capping at 3 limits idle memory consumption while still keeping a small ready pool.
|
# exceed the wall-clock limit. Without this (default = 0 = disabled) a worker
|
||||||
sed -i '/^;pm.max_spare_servers/s/^;//' /usr/local/etc/php-fpm.d/www.conf; \
|
# stuck on a slow DB query, a stalled Redis connection, or a hung syscall is
|
||||||
sed -i 's/^pm.max_spare_servers =.*/pm.max_spare_servers = 3/' /usr/local/etc/php-fpm.d/www.conf; \
|
# never reaped. Over time these zombies fill up pm.max_children, leaving no
|
||||||
# pm.max_requests: recycle each worker after handling 500 requests.
|
# free slots for legitimate requests and causing Apache to return 502 Bad
|
||||||
# PHP extensions and apps can leak memory over time; recycling prevents those leaks from accumulating indefinitely.
|
# Gateway upstream.
|
||||||
sed -i '/^;pm.max_requests/s/^;//' /usr/local/etc/php-fpm.d/www.conf; \
|
sed -i "s|^;*request_terminate_timeout = .*|request_terminate_timeout = \${PHP_MAX_TIME}|" /usr/local/etc/php-fpm.d/www.conf; \
|
||||||
sed -i 's/^pm.max_requests =.*/pm.max_requests = 500/' /usr/local/etc/php-fpm.d/www.conf; \
|
|
||||||
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,6 +286,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Nextcloud for Nextcloud AIO" \
|
org.opencontainers.image.title="Nextcloud for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="Nextcloud server with all required PHP extensions for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -2,4 +2,5 @@
|
|||||||
$CONFIG = array (
|
$CONFIG = array (
|
||||||
'one-click-instance' => true,
|
'one-click-instance' => true,
|
||||||
'one-click-instance.user-limit' => 100,
|
'one-click-instance.user-limit' => 100,
|
||||||
|
'update_channel' => 'stable',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -16,6 +16,12 @@ $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')) {
|
|
||||||
$CONFIG['appstoreurl'] = getenv('NEXTCLOUD_APP_STORE_URL');
|
$appStoreUrl = getenv('NEXTCLOUD_APP_STORE_URL');
|
||||||
|
if ($appStoreUrl) {
|
||||||
|
if ($appStoreUrl === 'no') {
|
||||||
|
$CONFIG['appstoreenabled '] = false;
|
||||||
|
} else {
|
||||||
|
$CONFIG['appstoreurl'] = getenv('NEXTCLOUD_APP_STORE_URL');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ if (getenv('REDIS_MODE') !== 'rediscluster') {
|
|||||||
|
|
||||||
if (getenv('REDIS_HOST')) {
|
if (getenv('REDIS_HOST')) {
|
||||||
$CONFIG['redis']['host'] = (string) getenv('REDIS_HOST');
|
$CONFIG['redis']['host'] = (string) getenv('REDIS_HOST');
|
||||||
$CONFIG['redis']['timeout'] = 1.5;
|
$CONFIG['redis']['timeout'] = 3.0;
|
||||||
$CONFIG['redis']['read_timeout'] = 1.5;
|
$CONFIG['redis']['read_timeout'] = 10.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getenv('REDIS_HOST_PASSWORD')) {
|
if (getenv('REDIS_HOST_PASSWORD')) {
|
||||||
@@ -23,6 +23,10 @@ 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'));
|
||||||
}
|
}
|
||||||
@@ -60,6 +64,10 @@ 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 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
$CONFIG = array (
|
$CONFIG = array (
|
||||||
'serverid' => crc32(gethostname()) % 512,
|
'serverid' => hexdec(hash('xxh32', gethostname())) & 0x1FF,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
#!/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,6 +10,10 @@ 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
|
||||||
@@ -20,6 +24,14 @@ 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
|
||||||
|
|
||||||
@@ -75,7 +87,9 @@ if env | grep -q NEXTCLOUD_TRUSTED_CERTIFICATES_; then
|
|||||||
cat "$CERTIFICATE_BUNDLE"
|
cat "$CERTIFICATE_BUNDLE"
|
||||||
|
|
||||||
# Disable debug mode
|
# Disable debug mode
|
||||||
set +x
|
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||||
|
set +x
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Adjust DATABASE_TYPE to by Nextcloud supported value
|
# Adjust DATABASE_TYPE to by Nextcloud supported value
|
||||||
@@ -115,6 +129,11 @@ 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
|
||||||
@@ -217,7 +236,9 @@ 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]+')"
|
||||||
set +x
|
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||||
|
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)"
|
||||||
@@ -284,7 +305,9 @@ 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
|
||||||
set +x
|
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||||
|
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)
|
||||||
@@ -396,53 +419,32 @@ EOF
|
|||||||
|
|
||||||
# AIO update to latest start # Do not remove or change this line!
|
# AIO update to latest start # Do not remove or change this line!
|
||||||
if [ "$INSTALL_LATEST_MAJOR" = yes ]; then
|
if [ "$INSTALL_LATEST_MAJOR" = yes ]; then
|
||||||
php /var/www/html/occ config:system:set updatedirectory --value="/nc-updater"
|
if ! bash /upgrade-latest-major.sh; then
|
||||||
INSTALLED_AT="$(php /var/www/html/occ config:app:get core installedat)"
|
echo "Upgrade to latest major version failed! Check the output above for details."
|
||||||
if [ -n "${INSTALLED_AT}" ]; then
|
|
||||||
# Set the installdat to 00 which will allow to skip staging and install the next major directly
|
|
||||||
# shellcheck disable=SC2001
|
|
||||||
INSTALLED_AT="$(echo "${INSTALLED_AT}" | sed "s|[0-9][0-9]$|00|")"
|
|
||||||
php /var/www/html/occ config:app:set core installedat --value="${INSTALLED_AT}"
|
|
||||||
fi
|
|
||||||
php /var/www/html/updater/updater.phar --no-interaction --no-backup
|
|
||||||
if ! php /var/www/html/occ -V || php /var/www/html/occ status | grep maintenance | grep -q 'true'; then
|
|
||||||
echo "Installation of Nextcloud failed!"
|
|
||||||
touch "$NEXTCLOUD_DATA_DIR/install.failed"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# 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);')"
|
||||||
INSTALLED_MAJOR="${installed_version%%.*}"
|
|
||||||
IMAGE_MAJOR="${image_version%%.*}"
|
|
||||||
# If a valid upgrade path, trigger the Nextcloud built-in Updater
|
|
||||||
if ! [ "$INSTALLED_MAJOR" -gt "$IMAGE_MAJOR" ]; then
|
|
||||||
php /var/www/html/updater/updater.phar --no-interaction --no-backup
|
|
||||||
if ! php /var/www/html/occ -V || php /var/www/html/occ status | grep maintenance | grep -q 'true'; then
|
|
||||||
echo "Installation of Nextcloud failed!"
|
|
||||||
# TODO: Add a hint here about what to do / where to look / updater.log?
|
|
||||||
touch "$NEXTCLOUD_DATA_DIR/install.failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# shellcheck disable=SC2016
|
|
||||||
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
|
|
||||||
fi
|
|
||||||
php /var/www/html/occ config:system:set updatechecker --type=bool --value=true
|
|
||||||
php /var/www/html/occ app:enable nextcloud-aio --force
|
|
||||||
php /var/www/html/occ db:add-missing-columns
|
|
||||||
php /var/www/html/occ db:add-missing-primary-keys
|
|
||||||
yes | php /var/www/html/occ db:convert-filecache-bigint
|
|
||||||
fi
|
fi
|
||||||
# AIO update to latest end # Do not remove or change this line!
|
# AIO update to latest end # Do not remove or change this line!
|
||||||
|
|
||||||
# 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="2" --type=integer
|
php /var/www/html/occ config:system:set loglevel --value="$NEXTCLOUD_LOG_LEVEL" --type=integer
|
||||||
php /var/www/html/occ config:system:set log_type --value="file"
|
if [ "$NEXTCLOUD_LOG_TYPE" = "errorlog" ]; then
|
||||||
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 --value="errorlog"
|
||||||
|
php /var/www/html/occ config:system:set log_type_audit --value="errorlog"
|
||||||
|
php /var/www/html/occ app:disable logreader
|
||||||
|
else
|
||||||
|
php /var/www/html/occ config:system:set log_type --value="file"
|
||||||
|
php /var/www/html/occ config:system:set log_type_audit --value="file"
|
||||||
|
php /var/www/html/occ app:enable logreader
|
||||||
|
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
|
||||||
|
php /var/www/html/occ config:system:set logfile_audit --value="/var/www/html/data/audit.log"
|
||||||
|
fi
|
||||||
php /var/www/html/occ config:system:set log_rotate_size --value="10485760" --type=integer
|
php /var/www/html/occ 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
|
||||||
@@ -640,8 +642,18 @@ 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 logfile --value="/var/www/html/data/nextcloud.log"
|
php /var/www/html/occ config:system:set loglevel --value="$NEXTCLOUD_LOG_LEVEL" --type=integer
|
||||||
php /var/www/html/occ config:app:set admin_audit logfile --value="/var/www/html/data/audit.log"
|
if [ "$NEXTCLOUD_LOG_TYPE" = "errorlog" ]; then
|
||||||
|
php /var/www/html/occ config:system:set log_type --value="errorlog"
|
||||||
|
php /var/www/html/occ config:system:set log_type_audit --value="errorlog"
|
||||||
|
php /var/www/html/occ app:disable logreader
|
||||||
|
else
|
||||||
|
php /var/www/html/occ config:system:set log_type --value="file"
|
||||||
|
php /var/www/html/occ config:system:set log_type_audit --value="file"
|
||||||
|
php /var/www/html/occ app:enable logreader
|
||||||
|
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
|
||||||
|
php /var/www/html/occ config:system:set logfile_audit --value="/var/www/html/data/audit.log"
|
||||||
|
fi
|
||||||
php /var/www/html/occ config:system:set updatedirectory --value="/nc-updater"
|
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
|
||||||
@@ -742,7 +754,9 @@ 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
|
||||||
set +x
|
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||||
|
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
|
||||||
@@ -853,6 +867,58 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# EuroOffice
|
||||||
|
if [ "$EUROOFFICE_ENABLED" = 'yes' ]; then
|
||||||
|
# Determine EuroOffice port based on host pattern
|
||||||
|
if echo "$EUROOFFICE_HOST" | grep -q "nextcloud-.*-eurooffice"; then
|
||||||
|
EUROOFFICE_PORT=80
|
||||||
|
else
|
||||||
|
EUROOFFICE_PORT=443
|
||||||
|
fi
|
||||||
|
|
||||||
|
count=0
|
||||||
|
while ! nc -z "$EUROOFFICE_HOST" "$EUROOFFICE_PORT" && [ "$count" -lt 90 ]; do
|
||||||
|
echo "Waiting for EuroOffice to become available..."
|
||||||
|
count=$((count+5))
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
if [ "$count" -ge 90 ]; then
|
||||||
|
bash /notify.sh "EuroOffice did not start in time!" "Skipping initialization and disabling eurooffice app."
|
||||||
|
php /var/www/html/occ app:disable eurooffice
|
||||||
|
else
|
||||||
|
# Install or enable EuroOffice app as needed
|
||||||
|
if ! [ -d "/var/www/html/custom_apps/eurooffice" ]; then
|
||||||
|
php /var/www/html/occ app:install eurooffice
|
||||||
|
elif [ "$(php /var/www/html/occ config:app:get eurooffice enabled)" != "yes" ]; then
|
||||||
|
php /var/www/html/occ app:enable eurooffice
|
||||||
|
elif [ "$SKIP_UPDATE" != 1 ]; then
|
||||||
|
php /var/www/html/occ app:update eurooffice
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set EuroOffice configuration
|
||||||
|
php /var/www/html/occ config:system:set eurooffice editors_check_interval --value="0" --type=integer
|
||||||
|
php /var/www/html/occ config:system:set eurooffice jwt_secret --value="$EUROOFFICE_SECRET"
|
||||||
|
php /var/www/html/occ config:app:set eurooffice jwt_secret --value="$EUROOFFICE_SECRET"
|
||||||
|
php /var/www/html/occ config:system:set eurooffice jwt_header --value="AuthorizationJwt"
|
||||||
|
|
||||||
|
# Adjust the EuroOffice host if using internal pattern
|
||||||
|
if echo "$EUROOFFICE_HOST" | grep -q "nextcloud-.*-eurooffice"; then
|
||||||
|
EUROOFFICE_HOST="$NC_DOMAIN/eurooffice"
|
||||||
|
export EUROOFFICE_HOST
|
||||||
|
fi
|
||||||
|
|
||||||
|
php /var/www/html/occ config:app:set eurooffice DocumentServerUrl --value="https://$EUROOFFICE_HOST"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Remove EuroOffice app if disabled and removal is requested
|
||||||
|
if [ "$REMOVE_DISABLED_APPS" = yes ] && \
|
||||||
|
[ -d "/var/www/html/custom_apps/eurooffice" ] && \
|
||||||
|
[ -n "$EUROOFFICE_SECRET" ] && \
|
||||||
|
[ "$(php /var/www/html/occ config:system:get eurooffice jwt_secret)" = "$EUROOFFICE_SECRET" ]; then
|
||||||
|
php /var/www/html/occ app:remove eurooffice
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Talk
|
# Talk
|
||||||
if [ "$TALK_ENABLED" = 'yes' ]; then
|
if [ "$TALK_ENABLED" = 'yes' ]; then
|
||||||
set -x
|
set -x
|
||||||
@@ -863,7 +929,9 @@ 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
|
||||||
set +x
|
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||||
|
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
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/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,5 +1,9 @@
|
|||||||
#!/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,5 +1,9 @@
|
|||||||
#!/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,5 +1,9 @@
|
|||||||
#!/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,5 +1,9 @@
|
|||||||
#!/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
|
||||||
@@ -25,7 +29,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 psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB" -c "select now()"; do
|
while ! sudo -E -u www-data env PGPASSWORD="$POSTGRES_PASSWORD" psql -h "$POSTGRES_HOST" -p "$POSTGRES_PORT" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()"; do
|
||||||
echo "Waiting for the database to start..."
|
echo "Waiting for the database to start..."
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
@@ -53,7 +57,9 @@ 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
|
||||||
set +x
|
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||||
|
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
|
||||||
@@ -170,6 +176,8 @@ if [ "$THIS_IS_AIO" = "true" ] && [ "$APACHE_PORT" = 443 ]; then
|
|||||||
sed -i "/^listen.allowed_clients/s/,$//" /usr/local/etc/php-fpm.d/www.conf
|
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
|
||||||
set +x
|
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||||
|
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=error
|
loglevel=%(ENV_AIO_LOG_LEVEL)s
|
||||||
user=root
|
user=root
|
||||||
|
|
||||||
[program:php-fpm]
|
[program:php-fpm]
|
||||||
@@ -25,6 +25,14 @@ 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
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PHP_CLI="php"
|
||||||
|
if [[ "$EUID" = 0 ]]; then
|
||||||
|
PHP_CLI="sudo -u www-data -E $PHP_CLI"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# shellcheck disable=SC2016
|
||||||
|
image_version="$($PHP_CLI -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
|
||||||
|
export IMAGE_MAJOR="${image_version%%.*}"
|
||||||
|
|
||||||
|
$PHP_CLI /var/www/html/occ config:system:set updatedirectory --value="/nc-updater"
|
||||||
|
INSTALLED_AT="$($PHP_CLI /var/www/html/occ config:app:get core installedat)"
|
||||||
|
if [ -n "${INSTALLED_AT}" ]; then
|
||||||
|
# Set the installedat to 00 which will allow to skip staging and install the next major directly
|
||||||
|
# shellcheck disable=SC2001
|
||||||
|
INSTALLED_AT="$(echo "${INSTALLED_AT}" | sed "s|[0-9][0-9]$|00|")"
|
||||||
|
$PHP_CLI /var/www/html/occ config:app:set core installedat --value="${INSTALLED_AT}"
|
||||||
|
fi
|
||||||
|
$PHP_CLI /var/www/html/updater/updater.phar --no-interaction --no-backup
|
||||||
|
if ! $PHP_CLI /var/www/html/occ -V || $PHP_CLI /var/www/html/occ status | grep maintenance | grep -q 'true'; then
|
||||||
|
echo "Installation of Nextcloud failed!"
|
||||||
|
touch "$NEXTCLOUD_DATA_DIR/install.failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# shellcheck disable=SC2016
|
||||||
|
installed_version="$($PHP_CLI -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
|
||||||
|
export INSTALLED_MAJOR="${installed_version%%.*}"
|
||||||
|
# If a valid upgrade path, trigger the Nextcloud built-in Updater
|
||||||
|
if ! $PHP_CLI -r "version_compare(getenv('INSTALLED_MAJOR'), getenv('IMAGE_MAJOR'), '>') || exit(1);"; then
|
||||||
|
$PHP_CLI /var/www/html/updater/updater.phar --no-interaction --no-backup
|
||||||
|
if ! $PHP_CLI /var/www/html/occ -V || $PHP_CLI /var/www/html/occ status | grep maintenance | grep -q 'true'; then
|
||||||
|
echo "Installation of Nextcloud failed!"
|
||||||
|
# TODO: Add a hint here about what to do / where to look / updater.log?
|
||||||
|
touch "$NEXTCLOUD_DATA_DIR/install.failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
$PHP_CLI /var/www/html/occ config:system:set updatechecker --type=bool --value=true
|
||||||
|
$PHP_CLI /var/www/html/occ app:enable nextcloud-aio --force
|
||||||
|
$PHP_CLI /var/www/html/occ db:add-missing-columns
|
||||||
|
$PHP_CLI /var/www/html/occ db:add-missing-primary-keys
|
||||||
|
yes | $PHP_CLI /var/www/html/occ db:convert-filecache-bigint
|
||||||
@@ -23,6 +23,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Notify Push for Nextcloud AIO" \
|
org.opencontainers.image.title="Notify Push for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="Nextcloud notify_push high-performance backend for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/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,5 +1,11 @@
|
|||||||
#!/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
|
||||||
@@ -22,7 +28,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 ]; then
|
if ! [ -f /var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push ] && ! [ -f /var/www/html/apps/notify_push/bin/"$CPU_ARCH"/notify_push ]; then
|
||||||
echo "The notify_push binary was not found."
|
echo "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."
|
||||||
@@ -36,11 +42,24 @@ if ! [ -f /var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push ]; t
|
|||||||
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
|
||||||
/var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push \
|
exec "$PUSH_PATH" \
|
||||||
--port 7867 \
|
--port 7867 \
|
||||||
/var/www/html/config/config.php
|
/var/www/html/config/config.php
|
||||||
|
|
||||||
exec "$@"
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="OnlyOffice for Nextcloud AIO" \
|
org.opencontainers.image.title="OnlyOffice for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="OnlyOffice Document Server for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
#!/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,6 +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/18/alpine3.23/Dockerfile
|
||||||
FROM postgres:18.3-alpine
|
FROM postgres:18.4-alpine
|
||||||
|
|
||||||
ENV PGDATA=/var/lib/postgresql/data
|
ENV PGDATA=/var/lib/postgresql/data
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@ 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
|
||||||
@@ -48,6 +49,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="PostgreSQL for Nextcloud AIO" \
|
org.opencontainers.image.title="PostgreSQL for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="PostgreSQL database for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
#!/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
|
||||||
|
|
||||||
psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@127.0.0.1:11000/$POSTGRES_DB" -c "select now()" && exit 0
|
# If database import is running, do not continue with the health check
|
||||||
|
if nc -z 127.0.0.1 11000; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@127.0.0.1:5432/$POSTGRES_DB" -c "select now()" || exit 1
|
PGPASSWORD="$POSTGRES_PASSWORD" psql -h 127.0.0.1 -p 5432 -U "oc_$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()" || exit 1
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/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" <<-EOSQL
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" \
|
||||||
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
|
-v "pg_new_password=$POSTGRES_PASSWORD" <<-EOSQL
|
||||||
|
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD :'pg_new_password' CREATEDB;
|
||||||
ALTER DATABASE "$POSTGRES_DB" OWNER TO "oc_$POSTGRES_USER";
|
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,6 +1,20 @@
|
|||||||
#!/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
|
||||||
|
GREP_STRING='Name: oc_appconfig; Type: TABLE; Schema: public; Owner:'
|
||||||
|
export GREP_STRING
|
||||||
DATADIR="/var/lib/postgresql/data"
|
DATADIR="/var/lib/postgresql/data"
|
||||||
export DUMP_DIR="/mnt/data"
|
export DUMP_DIR="/mnt/data"
|
||||||
DUMP_FILE="$DUMP_DIR/database-dump.sql"
|
DUMP_FILE="$DUMP_DIR/database-dump.sql"
|
||||||
@@ -85,13 +99,12 @@ 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 -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@127.0.0.1:11000/$POSTGRES_DB" -c "select now()"; do
|
while ! psql -h 127.0.0.1 -p 11000 -U "oc_$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()"; do
|
||||||
echo "Waiting for the database to start."
|
echo "Waiting for the database to start."
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
# Check if the line we grep for later on is there
|
# Check if the line we grep for later on is there
|
||||||
GREP_STRING='Name: oc_appconfig; Type: TABLE; Schema: public; Owner:'
|
|
||||||
if ! grep -qa "$GREP_STRING" "$DUMP_FILE"; then
|
if ! grep -qa "$GREP_STRING" "$DUMP_FILE"; then
|
||||||
echo "The needed oc_appconfig line is not there which is unexpected."
|
echo "The needed oc_appconfig line is not there which is unexpected."
|
||||||
echo "Please report this to https://github.com/nextcloud/all-in-one/issues. Thanks!"
|
echo "Please report this to https://github.com/nextcloud/all-in-one/issues. Thanks!"
|
||||||
@@ -107,8 +120,9 @@ 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" <<-EOSQL
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" \
|
||||||
CREATE USER "$DB_OWNER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
|
-v "pg_new_password=$POSTGRES_PASSWORD" <<-EOSQL
|
||||||
|
CREATE USER "$DB_OWNER" WITH PASSWORD :'pg_new_password' CREATEDB;
|
||||||
ALTER DATABASE "$POSTGRES_DB" OWNER TO "$DB_OWNER";
|
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";
|
||||||
@@ -165,6 +179,12 @@ if [ -f "/var/lib/postgresql/data/postgresql.conf" ]; then
|
|||||||
sed -i 's|#log_checkpoints.*|log_checkpoints = off|' "$PGCONF"
|
sed -i 's|#log_checkpoints.*|log_checkpoints = off|' "$PGCONF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if grep -q "^#\?log_min_messages" /var/lib/postgresql/data/postgresql.conf; then
|
||||||
|
sed -i "s|^#\?log_min_messages.*|log_min_messages = $POSTGRES_LOG_MIN_MESSAGES|" /var/lib/postgresql/data/postgresql.conf
|
||||||
|
else
|
||||||
|
echo "log_min_messages = $POSTGRES_LOG_MIN_MESSAGES" >> /var/lib/postgresql/data/postgresql.conf
|
||||||
|
fi
|
||||||
|
|
||||||
# Closing idling connections automatically seems to break any logic so was reverted again to default where it is disabled
|
# 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" "$PGCONF"; then
|
||||||
sed -i 's|^idle_session_timeout.*|#idle_session_timeout|' "$PGCONF"
|
sed -i 's|^idle_session_timeout.*|#idle_session_timeout|' "$PGCONF"
|
||||||
@@ -220,14 +240,24 @@ do_database_dump() {
|
|||||||
rm -f "$DUMP_FILE"
|
rm -f "$DUMP_FILE"
|
||||||
mv "$DUMP_FILE.temp" "$DUMP_FILE"
|
mv "$DUMP_FILE.temp" "$DUMP_FILE"
|
||||||
pg_ctl stop -m fast
|
pg_ctl stop -m fast
|
||||||
|
if ! grep -qa "$GREP_STRING" "$DUMP_FILE"; then
|
||||||
|
echo "Database dump was successful but the expected grep string does not exist."
|
||||||
|
echo "This is not expected!"
|
||||||
|
echo "Please report this to https://github.com/nextcloud/all-in-one/issues."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
rm "$DUMP_DIR/export.failed"
|
rm "$DUMP_DIR/export.failed"
|
||||||
echo 'Database dump successful!'
|
echo 'Database dump successful!'
|
||||||
set +x
|
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||||
|
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!"
|
||||||
set +x
|
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
|
||||||
|
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.2-alpine
|
FROM redis:8.6.3-alpine
|
||||||
|
|
||||||
COPY --chmod=775 start.sh /start.sh
|
COPY --chmod=775 start.sh /start.sh
|
||||||
|
|
||||||
@@ -23,6 +23,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Redis for Nextcloud AIO" \
|
org.opencontainers.image.title="Redis for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="Redis cache server for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
#!/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,5 +1,19 @@
|
|||||||
#!/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"
|
||||||
@@ -16,7 +30,7 @@ fi
|
|||||||
|
|
||||||
# Build the redis-server argument list.
|
# Build the redis-server argument list.
|
||||||
REDIS_ARGS=(
|
REDIS_ARGS=(
|
||||||
--loglevel warning
|
--loglevel "$REDIS_LOG_LEVEL"
|
||||||
--save "" # Disable RDB persistence (Redis is used as a pure cache/lock store)
|
--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
|
--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-eviction yes # Perform evictions in a background thread
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
# syntax=docker/dockerfile:latest
|
# syntax=docker/dockerfile:latest
|
||||||
FROM python:3.14.3-alpine3.23
|
FROM python:3.14.5-alpine3.23
|
||||||
|
|
||||||
COPY --chmod=775 start.sh /start.sh
|
COPY --chmod=775 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 \
|
||||||
ENV HPB_PROTOCOL=https
|
HPB_PROTOCOL=https \
|
||||||
ENV NC_PROTOCOL=https
|
NC_PROTOCOL=https \
|
||||||
ENV SKIP_VERIFY=false
|
SKIP_VERIFY=false \
|
||||||
ENV HPB_PATH=/standalone-signaling/
|
HPB_PATH=/standalone-signaling/ \
|
||||||
|
AIO_LOG_LEVEL=warn
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk upgrade --no-cache -a; \
|
apk upgrade --no-cache -a; \
|
||||||
@@ -34,6 +35,9 @@ 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; \
|
||||||
@@ -63,6 +67,7 @@ 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" \
|
||||||
|
dockhand.update="false" \
|
||||||
org.opencontainers.image.title="Talk Recording for Nextcloud AIO" \
|
org.opencontainers.image.title="Talk Recording for Nextcloud AIO" \
|
||||||
org.opencontainers.image.description="Nextcloud Talk recording service for Nextcloud All-in-One" \
|
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.url="https://github.com/nextcloud/all-in-one" \
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
#!/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,5 +1,17 @@
|
|||||||
#!/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."
|
||||||
@@ -49,7 +61,7 @@ fi
|
|||||||
cat << RECORDING_CONF > "/conf/recording.conf"
|
cat << RECORDING_CONF > "/conf/recording.conf"
|
||||||
[logs]
|
[logs]
|
||||||
# 30 means Warning
|
# 30 means Warning
|
||||||
level = 30
|
level = ${TALK_RECORDING_LOG_LEVEL}
|
||||||
|
|
||||||
[http]
|
[http]
|
||||||
listen = 0.0.0.0:1234
|
listen = 0.0.0.0:1234
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user