Merge pull request #1586 from ManOki/main

manual-install: add docker profiles for optional services
This commit is contained in:
Simon L 2022-12-23 21:59:15 +01:00 committed by GitHub
commit 67aa36c687
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 18 deletions

View file

@ -115,6 +115,7 @@ services:
nextcloud-aio-collabora: nextcloud-aio-collabora:
container_name: nextcloud-aio-collabora container_name: nextcloud-aio-collabora
profiles: ["collabora"]
image: nextcloud/aio-collabora:latest-arm64 image: nextcloud/aio-collabora:latest-arm64
environment: environment:
- aliasgroup1=https://${NC_DOMAIN}:443 - aliasgroup1=https://${NC_DOMAIN}:443
@ -128,6 +129,7 @@ services:
nextcloud-aio-talk: nextcloud-aio-talk:
container_name: nextcloud-aio-talk container_name: nextcloud-aio-talk
profiles: ["talk"]
image: nextcloud/aio-talk:latest-arm64 image: nextcloud/aio-talk:latest-arm64
ports: ports:
- ${TALK_PORT}:${TALK_PORT}/tcp - ${TALK_PORT}:${TALK_PORT}/tcp
@ -146,6 +148,7 @@ services:
nextcloud-aio-onlyoffice: nextcloud-aio-onlyoffice:
container_name: nextcloud-aio-onlyoffice container_name: nextcloud-aio-onlyoffice
profiles: ["onlyoffice"]
image: nextcloud/aio-onlyoffice:latest-arm64 image: nextcloud/aio-onlyoffice:latest-arm64
environment: environment:
- TZ=${TIMEZONE} - TZ=${TIMEZONE}
@ -161,6 +164,7 @@ services:
nextcloud-aio-imaginary: nextcloud-aio-imaginary:
container_name: nextcloud-aio-imaginary container_name: nextcloud-aio-imaginary
profiles: ["imaginary"]
image: nextcloud/aio-imaginary:latest-arm64 image: nextcloud/aio-imaginary:latest-arm64
environment: environment:
- TZ=${TIMEZONE} - TZ=${TIMEZONE}
@ -171,6 +175,7 @@ services:
nextcloud-aio-fulltextsearch: nextcloud-aio-fulltextsearch:
container_name: nextcloud-aio-fulltextsearch container_name: nextcloud-aio-fulltextsearch
profiles: ["fulltextsearch"]
image: nextcloud/aio-fulltextsearch:latest-arm64 image: nextcloud/aio-fulltextsearch:latest-arm64
environment: environment:
- TZ=${TIMEZONE} - TZ=${TIMEZONE}

View file

@ -118,6 +118,7 @@ services:
nextcloud-aio-collabora: nextcloud-aio-collabora:
container_name: nextcloud-aio-collabora container_name: nextcloud-aio-collabora
profiles: ["collabora"]
image: nextcloud/aio-collabora:latest image: nextcloud/aio-collabora:latest
environment: environment:
- aliasgroup1=https://${NC_DOMAIN}:443 - aliasgroup1=https://${NC_DOMAIN}:443
@ -131,6 +132,7 @@ services:
nextcloud-aio-talk: nextcloud-aio-talk:
container_name: nextcloud-aio-talk container_name: nextcloud-aio-talk
profiles: ["talk"]
image: nextcloud/aio-talk:latest image: nextcloud/aio-talk:latest
ports: ports:
- ${TALK_PORT}:${TALK_PORT}/tcp - ${TALK_PORT}:${TALK_PORT}/tcp
@ -149,6 +151,7 @@ services:
nextcloud-aio-clamav: nextcloud-aio-clamav:
container_name: nextcloud-aio-clamav container_name: nextcloud-aio-clamav
profiles: ["clamav"]
image: nextcloud/aio-clamav:latest image: nextcloud/aio-clamav:latest
environment: environment:
- TZ=${TIMEZONE} - TZ=${TIMEZONE}
@ -161,6 +164,7 @@ services:
nextcloud-aio-onlyoffice: nextcloud-aio-onlyoffice:
container_name: nextcloud-aio-onlyoffice container_name: nextcloud-aio-onlyoffice
profiles: ["onlyoffice"]
image: nextcloud/aio-onlyoffice:latest image: nextcloud/aio-onlyoffice:latest
environment: environment:
- TZ=${TIMEZONE} - TZ=${TIMEZONE}
@ -176,6 +180,7 @@ services:
nextcloud-aio-imaginary: nextcloud-aio-imaginary:
container_name: nextcloud-aio-imaginary container_name: nextcloud-aio-imaginary
profiles: ["imaginary"]
image: nextcloud/aio-imaginary:latest image: nextcloud/aio-imaginary:latest
environment: environment:
- TZ=${TIMEZONE} - TZ=${TIMEZONE}
@ -186,6 +191,7 @@ services:
nextcloud-aio-fulltextsearch: nextcloud-aio-fulltextsearch:
container_name: nextcloud-aio-fulltextsearch container_name: nextcloud-aio-fulltextsearch
profiles: ["fulltextsearch"]
image: nextcloud/aio-fulltextsearch:latest image: nextcloud/aio-fulltextsearch:latest
environment: environment:
- TZ=${TIMEZONE} - TZ=${TIMEZONE}

View file

@ -27,6 +27,11 @@ Now copy the provided yaml file to a docker-compose file by running on x64 `cp l
Now you should be ready to go with `sudo docker-compose --env-file my.conf up`. Now you should be ready to go with `sudo docker-compose --env-file my.conf up`.
## Docker profiles
The default profile of `latest.yml` only provide the minimum necessary services: nextcloud, database, redis and apache. To get optional services collabora, onlyoffice, talk, clamav, imaginary or fulltextsearch use additional arguments for each of them, for example `--profile collabora`.
For a complete all-in-one with collabora use `sudo docker-compose --env-file my.conf --profile collabora --profile talk --profile clamav --profile imaginary --profile fulltextsearch up`.
## How to update? ## How to update?
Since the AIO containers may change in the future, it is highly recommended to strictly follow the following procedure whenever you want to upgrade your containers. Since the AIO containers may change in the future, it is highly recommended to strictly follow the following procedure whenever you want to upgrade your containers.
1. Run `sudo docker-compose --env-file my.conf down` to stop all running containers 1. Run `sudo docker-compose --env-file my.conf down` to stop all running containers

View file

@ -92,6 +92,11 @@ do
if [ "$name" != "nextcloud-aio-apache" ]; then if [ "$name" != "nextcloud-aio-apache" ]; then
OUTPUT="$(echo "$OUTPUT" | sed "/ $name:/i\ ")" OUTPUT="$(echo "$OUTPUT" | sed "/ $name:/i\ ")"
fi fi
if ! echo "$name" | grep "apache$" && ! echo "$name" | grep "database$" && ! echo "$name" | grep "nextcloud$" && ! echo "$name" | grep "redis$"; then
sed -i '/container_name/d' containers.yml
SLIM_NAME="${name##nextcloud-aio-}"
OUTPUT="$(echo "$OUTPUT" | sed "/container_name: $name$/a\ \ \ \ profiles:\ \[\"$SLIM_NAME\"\]")"
fi
done done
OUTPUT="$(echo "$OUTPUT" | sed "/restart: /a\ \ \ \ networks:\n\ \ \ \ \ \ - nextcloud-aio")" OUTPUT="$(echo "$OUTPUT" | sed "/restart: /a\ \ \ \ networks:\n\ \ \ \ \ \ - nextcloud-aio")"
@ -102,6 +107,7 @@ echo "" >> containers.yml
echo "$OUTPUT" >> containers.yml echo "$OUTPUT" >> containers.yml
sed -i '/container_name/d' containers.yml sed -i '/container_name/d' containers.yml
sed -i 's|^ $||' containers.yml
VOLUMES="$(grep -oP 'nextcloud_aio_[a-z_]+' containers.yml | sort -u)" VOLUMES="$(grep -oP 'nextcloud_aio_[a-z_]+' containers.yml | sort -u)"
mapfile -t VOLUMES <<< "$VOLUMES" mapfile -t VOLUMES <<< "$VOLUMES"
@ -126,7 +132,7 @@ sed -i '/image:/s/$/:latest/' latest.yml
cat containers.yml > latest-arm64.yml cat containers.yml > latest-arm64.yml
sed -i '/image:/s/$/:latest-arm64/' latest-arm64.yml sed -i '/image:/s/$/:latest-arm64/' latest-arm64.yml
sed -i '/ nextcloud-aio-clamav:/,/^ $/d' latest-arm64.yml sed -i '/ nextcloud-aio-clamav:/,/^$/d' latest-arm64.yml
sed -i '/nextcloud[-_]aio[-_]clamav/d' latest-arm64.yml sed -i '/nextcloud[-_]aio[-_]clamav/d' latest-arm64.yml
sed -i '/CLAMAV_ENABLED/d' latest-arm64.yml sed -i '/CLAMAV_ENABLED/d' latest-arm64.yml