From ca25eb39991a47c7bcefe98961a38f89cbc9de6c Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 19 Oct 2023 16:12:05 +0200 Subject: [PATCH] community containers - add libretranslate Signed-off-by: Simon L --- .../libretranslate/libretranslate.json | 33 +++++++++++++++++++ community-containers/libretranslate/readme.md | 18 ++++++++++ community-containers/readme.md | 2 +- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 community-containers/libretranslate/libretranslate.json create mode 100644 community-containers/libretranslate/readme.md diff --git a/community-containers/libretranslate/libretranslate.json b/community-containers/libretranslate/libretranslate.json new file mode 100644 index 000000000000..c0a878c55a42 --- /dev/null +++ b/community-containers/libretranslate/libretranslate.json @@ -0,0 +1,33 @@ +{ + "aio_services_v1": [ + { + "container_name": "nextcloud-aio-libretranslate", + "display_name": "LibreTranslate", + "documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/libretranslate", + "image": "szaimen/aio-libretranslate", + "image_tag": "v1", + "internal_port": "5000", + "restart": "unless-stopped", + "environment": [ + "TZ=%TIMEZONE%" + ], + "volumes": [ + { + "source": "nextcloud_aio_libretranslate_db", + "destination": "/app/db", + "writeable": true + }, + { + "source": "nextcloud_aio_libretranslate_models", + "destination": "/home/libretranslate/.local", + "writeable": true + } + ], + "nextcloud_exec_commands": [ + "php /var/www/html/occ app:install integration_libretranslate", + "php /var/www/html/occ config:app:set integration_libretranslate host --value='http://nextcloud-aio-libretranslate'", + "php /var/www/html/occ config:app:set integration_libretranslate port --value='5000'" + ] + } + ] +} diff --git a/community-containers/libretranslate/readme.md b/community-containers/libretranslate/readme.md new file mode 100644 index 000000000000..c630a690ebc7 --- /dev/null +++ b/community-containers/libretranslate/readme.md @@ -0,0 +1,18 @@ +## Local AI +This container bundles LibreTranslate and auto-configures it for you. + +### Notes + +- After the initial startup is done, you might want to change the default language to translate from and to via: +```bash +# Adjust the values `en` and `de` in commands below accordingly +sudo docker exec --user www-data nextcloud-aio-nextcloud php occ config:app:set integration_libretranslate from_lang --value="en" +sudo docker exec --user www-data nextcloud-aio-nextcloud php occ config:app:set integration_libretranslate to_lang --value="de" +``` +- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack + +### Repository +https://github.com/szaimen/aio-libretranslate + +### Maintainer +https://github.com/szaimen diff --git a/community-containers/readme.md b/community-containers/readme.md index c6c8e6f13b43..bc5693d2cc8e 100644 --- a/community-containers/readme.md +++ b/community-containers/readme.md @@ -12,4 +12,4 @@ Before adding any additional container, make sure to create a backup via the AIO Afterwards, you might want to add additional community containers to the default AIO stack. You can do so by adding `--env AIO_COMMUNITY_CONTAINERS="container1 container2"` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must match the folder names in this directory! ⚠️⚠️⚠️ Please review the folder for documentation on each of the containers before adding them! Not reviewing the documentation for each of them first might break starting the AIO containers because e.g. fail2ban only works on Linux and not on Docker Desktop! ## How to add containers? -Simply submit a PR by creating a new folder in this directory: https://github.com/nextcloud/all-in-one/tree/main/community-containers with the name of your container. It must include a json file with the same name and with correct syntax and a readme.md with additional information. You might get inspired by caddy, fail2ban, local-ai, plex, pi-hole or vaultwarden (subfolders in this directory). For a full-blown example of the json file, see https://github.com/nextcloud/all-in-one/blob/main/php/containers.json. The json-schema that it validates against can be found here: https://github.com/nextcloud/all-in-one/blob/main/php/containers-schema.json. +Simply submit a PR by creating a new folder in this directory: https://github.com/nextcloud/all-in-one/tree/main/community-containers with the name of your container. It must include a json file with the same name and with correct syntax and a readme.md with additional information. You might get inspired by caddy, fail2ban, local-ai, libretranslate, plex, pi-hole or vaultwarden (subfolders in this directory). For a full-blown example of the json file, see https://github.com/nextcloud/all-in-one/blob/main/php/containers.json. The json-schema that it validates against can be found here: https://github.com/nextcloud/all-in-one/blob/main/php/containers-schema.json.