diff --git a/ct/weblate.sh b/ct/weblate.sh deleted file mode 100644 index 07c659e519..0000000000 --- a/ct/weblate.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash -_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main" -_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" -source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") -# Copyright (c) 2021-2026 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE -# Source: https://github.com/WeblateOrg/weblate - -APP="Weblate" -var_tags="${var_tags:-translation;localization}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-3072}" -var_disk="${var_disk:-10}" -var_os="${var_os:-debian}" -var_version="${var_version:-13}" -var_arm64="${var_arm64:-yes}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - - if [[ ! -d /opt/weblate ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - if check_for_gh_release "weblate" "WeblateOrg/weblate"; then - msg_info "Stopping Weblate" - systemctl stop weblate weblate-celery - msg_ok "Stopped Weblate" - - PYTHON_VERSION="3.14" setup_uv - USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "weblate" "WeblateOrg/weblate" "singlefile" "latest" "/opt/weblate" "weblate-*-py3-none-any.whl" - - msg_info "Updating Weblate" - $STD uv pip install --python /opt/weblate/.venv/bin/python --compile-bytecode /opt/weblate/weblate-*.whl "weblate[all,wsgi]" - rm -f /opt/weblate/weblate-*.whl - set -a - source /opt/weblate_data/weblate.env - set +a - $STD /opt/weblate/.venv/bin/weblate migrate --noinput - $STD /opt/weblate/.venv/bin/weblate collectstatic --noinput - msg_ok "Updated Weblate" - - msg_info "Starting Weblate" - systemctl start weblate-celery weblate - msg_ok "Started Weblate" - msg_ok "Updated successfully!" - fi - exit -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" -echo -e "${INFO}${YW}Access it using the following URL:${CL}" -echo -e "${GATEWAY}${BGN}http://${IP}${CL}" diff --git a/install/weblate-install.sh b/install/weblate-install.sh deleted file mode 100644 index 0f8e3e92b4..0000000000 --- a/install/weblate-install.sh +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2026 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE -# Source: https://github.com/WeblateOrg/weblate - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies" -$STD apt install -y \ - build-essential \ - pkg-config \ - libacl1-dev \ - liblz4-dev \ - libzstd-dev \ - libxxhash-dev \ - libssl-dev \ - libldap2-dev \ - libsasl2-dev \ - git \ - gettext \ - nginx \ - valkey-server -msg_ok "Installed Dependencies" - -PG_VERSION="17" setup_postgresql -PG_DB_NAME="weblate" PG_DB_USER="weblate" setup_postgresql_db -PYTHON_VERSION="3.14" setup_uv -USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "weblate" "WeblateOrg/weblate" "singlefile" "latest" "/opt/weblate" "weblate-*-py3-none-any.whl" - -msg_info "Installing Weblate" -$STD uv venv --python 3.14 /opt/weblate/.venv -$STD uv pip install --python /opt/weblate/.venv/bin/python --compile-bytecode /opt/weblate/weblate-*.whl "weblate[all,wsgi]" -rm -f /opt/weblate/weblate-*.whl -msg_ok "Installed Weblate" - -msg_info "Configuring Weblate" -mkdir -p /opt/weblate_data/python/customize /app -# weblate.settings_docker is upstream's env-driven settings; it reads the secret and -# settings-override.py from /app/data and loads the "customize" app from DATA_DIR/python -ln -sfn /opt/weblate_data /app/data -touch /opt/weblate_data/python/customize/{__init__,models}.py -/opt/weblate/.venv/bin/weblate-generate-secret-key >/opt/weblate_data/secret -cat </opt/weblate_data/weblate.env -DJANGO_SETTINGS_MODULE=weblate.settings_docker -PYTHONPATH=/opt/weblate_data/python -WEBLATE_SITE_DOMAIN=${LOCAL_IP} -WEBLATE_DATA_DIR=/opt/weblate_data -WEBLATE_CACHE_DIR=/opt/weblate/cache -WEBLATE_IP_PROXY_HEADER=HTTP_X_FORWARDED_FOR -POSTGRES_HOST=127.0.0.1 -POSTGRES_DB=weblate -POSTGRES_USER=weblate -POSTGRES_PASSWORD=${PG_DB_PASS} -REDIS_HOST=127.0.0.1 -# Password set for the "admin" account at install; Weblate does not read it -WEBLATE_ADMIN_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16) -EOF -chmod 600 /opt/weblate_data/secret /opt/weblate_data/weblate.env -set -a -source /opt/weblate_data/weblate.env -set +a -$STD /opt/weblate/.venv/bin/weblate migrate --noinput -$STD /opt/weblate/.venv/bin/weblate createadmin --password="${WEBLATE_ADMIN_PASSWORD}" -$STD /opt/weblate/.venv/bin/weblate collectstatic --noinput -msg_ok "Configured Weblate" - -msg_info "Configuring Nginx" -cat </etc/nginx/sites-available/weblate -server { - listen 80; - server_name _; - client_max_body_size 1000M; - - location = /favicon.ico { - alias /opt/weblate/cache/static/favicon.ico; - expires 30d; - } - - location /static/ { - alias /opt/weblate/cache/static/; - expires 30d; - } - - location / { - proxy_pass http://127.0.0.1:8888; - proxy_set_header Host \$http_host; - proxy_set_header X-Forwarded-For \$remote_addr; - proxy_set_header X-Forwarded-Proto \$scheme; - proxy_read_timeout 3600; - } -} -EOF -nginx_enable_site "weblate" -msg_ok "Configured Nginx" - -msg_info "Creating Services" -cat </etc/systemd/system/weblate.service -[Unit] -Description=Weblate -After=network.target postgresql.service valkey-server.service - -[Service] -Type=simple -User=root -WorkingDirectory=/opt/weblate_data -EnvironmentFile=/opt/weblate_data/weblate.env -ExecStart=/opt/weblate/.venv/bin/granian --interface wsgi --host 127.0.0.1 --port 8888 --workers 2 --blocking-threads 8 --backlog 128 --backpressure 16 --runtime-mode mt --workers-max-rss 450 --no-ws weblate.wsgi:application -Restart=on-failure -RestartSec=5 - -[Install] -WantedBy=multi-user.target -EOF -cat </etc/systemd/system/weblate-celery.service -[Unit] -Description=Weblate Celery Worker -After=network.target postgresql.service valkey-server.service - -[Service] -Type=simple -User=root -WorkingDirectory=/opt/weblate_data -EnvironmentFile=/opt/weblate_data/weblate.env -ExecStart=/opt/weblate/.venv/bin/celery --app=weblate.utils worker --beat --loglevel=info --queues=celery,notify,memory,translate,backup --prefetch-multiplier=1 --concurrency=2 -Restart=on-failure -RestartSec=10 - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now weblate weblate-celery -msg_ok "Created Services" - -motd_ssh -customize -cleanup_lxc diff --git a/json/weblate.json b/json/weblate.json deleted file mode 100644 index 70a4b90b2f..0000000000 --- a/json/weblate.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "Weblate", - "slug": "weblate", - "categories": [ - 12 - ], - "date_created": "2026-09-29", - "type": "ct", - "updateable": true, - "privileged": false, - "architectures": [ - "amd64", - "arm64" - ], - "interface_port": 80, - "documentation": "https://docs.weblate.org/en/latest/", - "website": "https://weblate.org/", - "repository": "https://github.com/WeblateOrg/weblate", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/weblate.webp", - "description": "Weblate is a web-based continuous localization system with tight version control integration. Translators work in the browser while Weblate pulls from and pushes to your Git or Mercurial repositories, with quality checks, translation memory, machine translation, glossaries and add-ons across dozens of file formats.", - "install_methods": [ - { - "type": "default", - "script": "ct/weblate.sh", - "config_path": "/opt/weblate_data/weblate.env", - "resources": { - "cpu": 2, - "ram": 3072, - "hdd": 10, - "os": "Debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": "admin", - "password": null - }, - "notes": [ - { - "text": "The admin password is generated at install and stored as WEBLATE_ADMIN_PASSWORD in /opt/weblate_data/weblate.env. Weblate does not read that value, so change the password from your profile afterwards, or reset it with `weblate createadmin --update`.", - "type": "warning" - }, - { - "text": "Settings come from upstream's environment-driven weblate.settings_docker: add WEBLATE_* variables from the Docker documentation to /opt/weblate_data/weblate.env (for example WEBLATE_EMAIL_HOST for outgoing mail, or WEBLATE_SITE_DOMAIN and WEBLATE_ENABLE_HTTPS=1 behind an HTTPS proxy), then run `systemctl restart weblate weblate-celery`. Python-level overrides go in /opt/weblate_data/settings-override.py.", - "type": "info" - }, - { - "text": "No mail server is configured, so registration and notification e-mails fail until WEBLATE_EMAIL_HOST is set.", - "type": "info" - }, - { - "text": "Management commands need the environment loaded: `set -a; . /opt/weblate_data/weblate.env; set +a; /opt/weblate/.venv/bin/weblate `.", - "type": "info" - }, - { - "text": "Celery runs two worker processes (--concurrency=2 in weblate-celery.service). Raise it together with CPU and RAM if Weblate reports long task queues.", - "type": "info" - }, - { - "text": "Repositories, uploads and the secret key live in /opt/weblate_data. Back it up together with the PostgreSQL database.", - "type": "info" - } - ] -}