Compare commits

..

27 Commits

Author SHA1 Message Date
Simon L.
34a264d945 Merge pull request #5543 from nextcloud/revert-5537-enh/noid/fix-talk-recording
Revert "talk-recording: change to firefox-esr"
2024-11-07 14:51:59 +01:00
Simon L.
16a3c32ec3 Revert "talk-recording: change to firefox-esr" 2024-11-07 14:51:37 +01:00
Simon L.
30614ad9b6 Merge pull request #5540 from nextcloud/aio-dependency-update
PHP dependency updates
2024-11-07 13:50:38 +01:00
Simon L.
b7355b12b7 Merge pull request #5541 from nextcloud/imaginary-container-update
Imaginary update
2024-11-07 13:50:08 +01:00
szaimen
d5b6e6653d imaginary-update automated change
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-07 12:02:52 +00:00
szaimen
7d286edc5f php dependency updates
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-07 12:02:48 +00:00
Simon L.
d6bd5b407a Merge pull request #5538 from nextcloud/enh/noid/change-talk-recording
talk-recording: change tmpfs to volume
2024-11-07 12:12:42 +01:00
Simon L.
56864dde66 talk-recording: change tmpfs to volume
Signed-off-by: Simon L. <szaimen@e.mail.de>
2024-11-07 12:07:44 +01:00
Simon L.
adc9c1ea44 Merge pull request #5537 from nextcloud/enh/noid/fix-talk-recording
talk-recording: change to firefox-esr
2024-11-07 11:43:52 +01:00
Simon L.
4e2bb8f1a7 talk-recording: change to firefox-esr
Signed-off-by: Simon L. <szaimen@e.mail.de>
2024-11-07 11:22:29 +01:00
Simon L.
74e5a58a4c increase to 9.9.0
Signed-off-by: Simon L. <szaimen@e.mail.de>
2024-11-07 10:50:26 +01:00
Simon L.
bcd3fd80ec Merge pull request #5536 from nextcloud/enh/noid/update-nc
nextcloud: update to 29.0.9
2024-11-07 10:49:11 +01:00
Simon L.
01e10aa3f2 nextcloud: update to 29.0.9
Signed-off-by: Simon L. <szaimen@e.mail.de>
2024-11-07 10:48:35 +01:00
Simon L.
cd3a33a800 Merge pull request #5484 from apparle/apache_additional_network
Specifying additional docker network for Apache container
2024-11-07 09:37:56 +01:00
Simon L.
4a8e0c8415 fix indentation
Signed-off-by: Simon L. <szaimen@e.mail.de>
2024-11-07 09:34:37 +01:00
Apoorv Parle
e30b4562b2 Remove mastercontainer connection to APACHE_ADDITIONAL_CONTAINER. Follow that up in a separate PR.
Signed-off-by: Apoorv Parle <19315187+apparle@users.noreply.github.com>
2024-11-07 00:26:35 -08:00
Simon L.
798c250db2 Merge pull request #5534 from nextcloud/dependabot/composer/php/twig/twig-3.14.1
build(deps): bump twig/twig from 3.14.0 to 3.14.1 in /php
2024-11-06 22:31:18 +01:00
Simon L.
57884a1c79 Merge pull request #5535 from Martinligabue/patch-1
readme reset instance guide typo
2024-11-06 22:27:06 +01:00
Martin Ligabue
5125ec934f readme reset instance guide typo
probably due to a copypaste

Signed-off-by: Martin Ligabue <martinligabue@gmail.com>
2024-11-06 21:18:59 +01:00
dependabot[bot]
9deb2e0356 build(deps): bump twig/twig from 3.14.0 to 3.14.1 in /php
Bumps [twig/twig](https://github.com/twigphp/Twig) from 3.14.0 to 3.14.1.
- [Changelog](https://github.com/twigphp/Twig/blob/v3.14.1/CHANGELOG)
- [Commits](https://github.com/twigphp/Twig/compare/v3.14.0...v3.14.1)

---
updated-dependencies:
- dependency-name: twig/twig
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-06 19:54:39 +00:00
Simon L.
45a0350b16 Merge pull request #5532 from nextcloud/ci/json-validator/use-venv
ci(json-validator): use venv
2024-11-06 16:33:52 +01:00
Richard Steinmetz
4f808d2d67 ci(json-validator): use venv
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2024-11-06 16:28:36 +01:00
Apoorv Parle
974ad1ef9b Improve error checking and connect mastercontainer right from the start to make inital process seamless.
Signed-off-by: Apoorv Parle <19315187+apparle@users.noreply.github.com>
2024-11-04 05:27:30 -08:00
Apoorv Parle
f5990cc0ef Add APACHE_ADDITIONAL_NETWORK variable to env variables QA test
Signed-off-by: Apoorv Parle <19315187+apparle@users.noreply.github.com>
2024-11-04 04:10:47 -08:00
Apoorv Parle
75c2407afa Apply suggestions from code review
Co-authored-by: Simon L. <szaimen@e.mail.de>
Signed-off-by: Apoorv Parle <19315187+apparle@users.noreply.github.com>
2024-11-04 02:44:10 -08:00
Apoorv Parle
4ad749a265 Merge branch 'main' into apache_additional_network 2024-11-02 14:14:42 -07:00
Apoorv Parle
f644e83935 Add ability to specify additional docker network and update documentation for it.
Signed-off-by: Apoorv Parle <19315187+apparle@users.noreply.github.com>
2024-11-02 14:11:17 -07:00
15 changed files with 118 additions and 72 deletions

View File

@@ -1,36 +1,37 @@
name: Json Validator
on:
pull_request:
paths:
- '**.json'
push:
branches:
- main
paths:
- '**.json'
jobs:
json-validator:
name: Json Validator
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Validate Json
run: |
sudo apt-get update
sudo apt-get install python3-pip -y --no-install-recommends
pip3 install json-spec
export PATH="$PATH:/home/runner/.local/bin"
if ! json validate --schema-file=php/containers-schema.json --document-file=php/containers.json; then
exit 1
fi
JSON_FILES="$(find ./community-containers -name '*.json')"
mapfile -t JSON_FILES <<< "$JSON_FILES"
for file in "${JSON_FILES[@]}"; do
json validate --schema-file=php/containers-schema.json --document-file="$file" 2>&1 | tee -a ./json-validator.log
done
if grep -q "document does not validate with schema.\|invalid JSONFile" ./json-validator.log; then
exit 1
fi
name: Json Validator
on:
pull_request:
paths:
- '**.json'
push:
branches:
- main
paths:
- '**.json'
jobs:
json-validator:
name: Json Validator
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Validate Json
run: |
sudo apt-get update
sudo apt-get install python3-venv -y --no-install-recommends
python3 -m venv venv
. venv/bin/activate
pip3 install json-spec
if ! json validate --schema-file=php/containers-schema.json --document-file=php/containers.json; then
exit 1
fi
JSON_FILES="$(find ./community-containers -name '*.json')"
mapfile -t JSON_FILES <<< "$JSON_FILES"
for file in "${JSON_FILES[@]}"; do
json validate --schema-file=php/containers-schema.json --document-file="$file" 2>&1 | tee -a ./json-validator.log
done
if grep -q "document does not validate with schema.\|invalid JSONFile" ./json-validator.log; then
exit 1
fi

View File

@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:latest
FROM golang:1.23.2-alpine3.20 AS go
ENV IMAGINARY_HASH=8f36a26c448be8c151a3878404b75fcd1cd3cf0c
ENV IMAGINARY_HASH=8f36a26c448be8c151a3878404b75fcd1cd3cf0c
RUN set -ex; \
apk add --no-cache \

View File

@@ -193,6 +193,14 @@ It is set to '$APACHE_IP_BINDING'."
exit 1
fi
fi
if [ -n "$APACHE_ADDITIONAL_NETWORK" ]; then
if ! echo "$APACHE_ADDITIONAL_NETWORK" | grep -q "^[a-zA-Z0-9_-]\+$"; then
print_red "You've set APACHE_ADDITIONAL_NETWORK but not to an allowed value.
It needs to be a string with letters, numbers, hyphens and underscores.
It is set to '$APACHE_ADDITIONAL_NETWORK'."
exit 1
fi
fi
if [ -n "$TALK_PORT" ]; then
if ! check_if_number "$TALK_PORT"; then
print_red "You provided an Talk port but did not only use numbers.

View File

@@ -8,7 +8,7 @@ ENV SOURCE_LOCATION=/usr/src/nextcloud
ENV REDIS_DB_INDEX=0
# AIO settings start # Do not remove or change this line!
ENV NEXTCLOUD_VERSION=29.0.8
ENV NEXTCLOUD_VERSION=29.0.9
ENV AIO_TOKEN=123456
ENV AIO_URL=localhost
# AIO settings end # Do not remove or change this line!

View File

@@ -48,6 +48,7 @@ RUN set -ex; \
build-base \
linux-headers;
VOLUME /tmp
WORKDIR /tmp
USER 122
ENTRYPOINT ["/start.sh"]

View File

@@ -16,6 +16,9 @@ if [ -z "$HPB_DOMAIN" ]; then
export HPB_DOMAIN="$NC_DOMAIN"
fi
# Delete all contents on startup to start fresh
rm -fr /tmp/{*,.*}
cat << RECORDING_CONF > "/conf/recording.conf"
[logs]
# 30 means Warning

View File

@@ -17,6 +17,7 @@ services:
# AIO_COMMUNITY_CONTAINERS: # With this variable, you can add community containers very easily. See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers
# APACHE_PORT: 11000 # Is needed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# APACHE_IP_BINDING: 127.0.0.1 # Should be set when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) that is running on the same host. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# APACHE_ADDITIONAL_NETWORK: frontend_net # (Optional) Connect the apache container to an additional docker network. Needed when behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) running in a different docker network on same server. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# BORG_RETENTION_POLICY: --keep-within=7d --keep-weekly=4 --keep-monthly=6 # Allows to adjust borgs retention policy. See https://github.com/nextcloud/all-in-one#how-to-adjust-borgs-retention-policy
# COLLABORA_SECCOMP_DISABLED: false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature
# NEXTCLOUD_DATADIR: /mnt/ncdata # Allows to set the host directory for Nextcloud's datadir. ⚠️⚠️⚠️ Warning: do not set or adjust this value after the initial Nextcloud installation is done! See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir

12
php/composer.lock generated
View File

@@ -1632,16 +1632,16 @@
},
{
"name": "twig/twig",
"version": "v3.14.0",
"version": "v3.14.1",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72"
"reference": "f405356d20fb43603bcadc8b09bfb676cb04a379"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/126b2c97818dbff0cdf3fbfc881aedb3d40aae72",
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/f405356d20fb43603bcadc8b09bfb676cb04a379",
"reference": "f405356d20fb43603bcadc8b09bfb676cb04a379",
"shasum": ""
},
"require": {
@@ -1695,7 +1695,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.14.0"
"source": "https://github.com/twigphp/Twig/tree/v3.14.1"
},
"funding": [
{
@@ -1707,7 +1707,7 @@
"type": "tidelift"
}
],
"time": "2024-09-09T17:55:12+00:00"
"time": "2024-11-06T18:17:38+00:00"
}
],
"packages-dev": [

View File

@@ -440,6 +440,13 @@
"RECORDING_SECRET=%RECORDING_SECRET%",
"INTERNAL_SECRET=%TALK_INTERNAL_SECRET%"
],
"volumes": [
{
"source": "nextcloud_aio_talk_recording",
"destination": "/tmp",
"writeable": true
}
],
"shm_size": 2147483648,
"secrets": [
"RECORDING_SECRET",
@@ -454,7 +461,6 @@
],
"read_only": true,
"tmpfs": [
"/tmp",
"/conf"
],
"cap_drop": [

View File

@@ -888,6 +888,13 @@ class ConfigurationManager
$this->WriteConfig($config);
}
public function GetApacheAdditionalNetwork() : string {
$envVariableName = 'APACHE_ADDITIONAL_NETWORK';
$configName = 'apache_additional_network';
$defaultValue = '';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}
public function GetApacheIPBinding() : string {
$envVariableName = 'APACHE_IP_BINDING';
$configName = 'apache_ip_binding';

View File

@@ -841,44 +841,49 @@ readonly class DockerActionManager {
}
}
private function ConnectContainerIdToNetwork(string $id, string $internalPort, string $network = 'nextcloud-aio') : void
private function ConnectContainerIdToNetwork(string $id, string $internalPort, string $network = 'nextcloud-aio', bool $createNetwork = true, string $alias = '') : void
{
if ($internalPort === 'host') {
return;
}
$url = $this->BuildApiUrl('networks/create');
try {
$this->guzzleClient->request(
'POST',
$url,
[
'json' => [
'Name' => $network,
'CheckDuplicate' => true,
'Driver' => 'bridge',
'Internal' => false,
if ($createNetwork) {
$url = $this->BuildApiUrl('networks/create');
try {
$this->guzzleClient->request(
'POST',
$url,
[
'json' => [
'Name' => $network,
'CheckDuplicate' => true,
'Driver' => 'bridge',
'Internal' => false,
]
]
]
);
} catch (RequestException $e) {
// 409 is undocumented and gets thrown if the network already exists.
if ($e->getCode() !== 409) {
throw new \Exception("Could not create the nextcloud-aio network: " . $e->getMessage());
);
} catch (RequestException $e) {
// 409 is undocumented and gets thrown if the network already exists.
if ($e->getCode() !== 409) {
throw new \Exception("Could not create the nextcloud-aio network: " . $e->getMessage());
}
}
}
$url = $this->BuildApiUrl(
sprintf('networks/%s/connect', $network)
);
$jsonPayload = [ 'Container' => $id ];
if ($alias !== '' ) {
$jsonPayload['EndpointConfig'] = ['Aliases' => [ $alias ]];
}
try {
$this->guzzleClient->request(
'POST',
$url,
[
'json' => [
'container' => $id,
]
'json' => $jsonPayload
]
);
} catch (RequestException $e) {
@@ -898,7 +903,19 @@ readonly class DockerActionManager {
public function ConnectContainerToNetwork(Container $container) : void
{
$this->ConnectContainerIdToNetwork($container->GetIdentifier(), $container->GetInternalPort());
// Add a secondary alias for domaincheck container, to keep it as similar to actual apache controller as possible.
// If a reverse-proxy is relying on container name as hostname this allows it to operate as usual and still validate the domain
// The domaincheck container and apache container are never supposed to be active at the same time because they use the same APACHE_PORT anyway, so this doesn't add any new constraints.
$alias = ($container->GetIdentifier() === 'nextcloud-aio-domaincheck') ? 'nextcloud-aio-apache' : '';
$this->ConnectContainerIdToNetwork($container->GetIdentifier(), $container->GetInternalPort(), alias: $alias);
if ($container->GetIdentifier() === 'nextcloud-aio-apache' || $container->GetIdentifier() === 'nextcloud-aio-domaincheck') {
$apacheAdditionalNetwork = $this->configurationManager->GetApacheAdditionalNetwork();
if ($apacheAdditionalNetwork !== '') {
$this->ConnectContainerIdToNetwork($container->GetIdentifier(), $container->GetInternalPort(), $apacheAdditionalNetwork, false, $alias);
}
}
}
public function StopContainer(Container $container) : void {

View File

@@ -17,7 +17,7 @@
<div class="container">
<main>
<h1>Nextcloud AIO v9.8.0</h1>
<h1>Nextcloud AIO v9.9.0</h1>
{# Add 2nd tab warning #}
<script type="text/javascript" src="second-tab-warning.js"></script>

View File

@@ -378,7 +378,7 @@ Here is how to reset the AIO instance properly:
1. Check which volumes are dangling with `sudo docker volume ls --filter "dangling=true"`
1. Now remove all these dangling volumes: `sudo docker volume prune --filter all=1` (on Windows you might need to remove some volumes afterwards manually with `docker volume rm nextcloud_aio_backupdir`, `docker volume rm nextcloud_aio_nextcloud_datadir`).
1. If you've configured `NEXTCLOUD_DATADIR` to a path on your host instead of the default volume, you need to clean that up as well. (E.g. by simply deleting the directory).
1. Make sure that no volumes are remaining with `sudo docker volume ls --format {{.Name}}`. If no `nextcloud-aio` volumes are listed, you can proceed with the steps below. If there should be some, you will need to stop them with `sudo docker volume rm <volume_name>` until no one is listed anymore.
1. Make sure that no volumes are remaining with `sudo docker volume ls --format {{.Name}}`. If no `nextcloud-aio` volumes are listed, you can proceed with the steps below. If there should be some, you will need to remove them with `sudo docker volume rm <volume_name>` until no one is listed anymore.
1. Optional: You can remove all docker images with `sudo docker image prune -a`.
1. And you are done! Now feel free to start over with the recommended docker run command!

View File

@@ -44,9 +44,10 @@ All examples below will use port `11000` as `APACHE_PORT`. This port will be exp
<summary>On the same server in a Docker container</summary>
For this setup, you can use as target `host.docker.internal:$APACHE_PORT` instead of `localhost:$APACHE_PORT`. **⚠️ Important:** In order to make this work on Docker for Linux, you need to add `--add-host=host.docker.internal:host-gateway` to the docker run command of your reverse proxy container or `extra_hosts: ["host.docker.internal:host-gateway"]` in docker compose (it works on Docker Desktop by default).
Another option (actually the recommended way) in this case is to use `--network host` option (or `network_mode: host` for docker-compose) as setting for the reverse proxy container to connect it to the host network. If you are using a firewall on the server, you need to open ports 80 and 443 for the reverse proxy manually. By doing so, the default sample configurations that point at `localhost:$APACHE_PORT` should work without having to modify them.
The reverse-proxy container needs to be connected to the nextcloud containers. This can be achieved one of these 3 ways:
1. Utilize host networking instead of docker bridge networking: Specify `--network host` option (or `network_mode: host` for docker-compose) as setting for the reverse proxy container to connect it to the host network. If you are using a firewall on the server, you need to open ports 80 and 443 for the reverse proxy manually. With this setup, the default sample configurations with reverse-proxy pointing to `localhost:$APACHE_PORT` should work directly.
1. Connect nextcloud's external-facing containers to the reverse-proxy's docker network by specifying env variable APACHE_ADDITIONAL_NETWORK. With this setup, the reverse proxy can utilize Docker bridge network's DNS name resolution to access nextcloud at `http://nextcloud-aio-apache:$APACHE_PORT`. ⚠️⚠️⚠️ Note, the specified network must already exist before Nextcloud AIO is started. Otherwise it will fail to start the container because the network is not existing.
1. Connect the reverse-proxy container to the `nextcloud-aio` network by specifying it as a secondary (external) network for the reverse proxy container. With this setup also, the reverse proxy can utilize Docker bridge network's DNS name resolution to access nextcloud at `http://nextcloud-aio-apache:$APACHE_PORT` .
</details>

View File

@@ -2,6 +2,7 @@
- [ ] When starting the mastercontainer with `--env APACHE_PORT=11000` on a clean instance, the domaincheck container should be started with that same port published. That makes sure that also the Apache container will use that port later on. Using a value here that is not a port will not allow the mastercontainer to start correctly. However `@INTERNAL` is also an allowed value which skips publishing the port on the host for internal usage inside a bridged network for example.
- [ ] When starting the mastercontainer with `--env APACHE_IP_BINDING=127.0.0.1` on a clean instance, the domaincheck container's apache port should only listen on localhost on the host. Using a value here that is not a number or dot will not allow the mastercontainer to start correctly.
- [ ] When starting the mastercontainer with `--env APACHE_ADDITIONAL_NETWORK=frontend_net` on a clean instance, the domaincheck and subsequently the apache containers should be connected to the specified `frontend_net` docker network, in addition to the default `nextcloud-aio` network. Specifying the network that doesn't already exist will not allow the mastercontainer to start correctly.
- [ ] When starting the mastercontainer with `--env TALK_PORT=3479` on a clean instance, the talk container should use this port later on. Using a value here that is not a port will not allow the mastercontainer to start correctly. Also it should stop if apache_port and talk_port are set to the same value.
- [ ] Make also sure that reverse proxies work by following https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#reverse-proxy-documentation and following [001-initial-setup.md](./001-initial-setup.md) and [002-new-instance.md](./002-new-instance.md)
- [ ] When starting the mastercontainer with `--env SKIP_DOMAIN_VALIDATION=true` on a clean instance, it should skip the domain verification. So it should accept any domain that you type in then.