From 3f678c76bd92e5cdfe60c9d47776b927b1b5e3c9 Mon Sep 17 00:00:00 2001 From: renaud gaudin Date: Thu, 2 May 2024 09:57:23 +0000 Subject: [PATCH] Changed domain name from youzim.it to zimit.kiwix.org --- .github/workflows/Publish.yml | 2 +- Dockerfile | 10 +++++----- api/src/routes/requests.py | 2 +- api/src/settings.py | 12 +++++++----- api/src/templates/email_body.html | 4 ++-- api/src/templates/email_subject.txt | 2 +- ui/public/environ.json | 2 +- ui/src/components/NavBar.vue | 2 +- 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/Publish.yml b/.github/workflows/Publish.yml index 84bd69a..a41237a 100644 --- a/.github/workflows/Publish.yml +++ b/.github/workflows/Publish.yml @@ -26,7 +26,7 @@ jobs: GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} - - name: Deploy Zimit frontend changes to youzim.it + - name: Deploy Zimit frontend changes to zimit.kiwix.org uses: actions-hub/kubectl@master env: KUBE_CONFIG: ${{ secrets.ZIMIT_KUBE_CONFIG }} diff --git a/Dockerfile b/Dockerfile index 65d29c4..e091d0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ WORKDIR /app/ ENV MONGODB_URI mongodb://localhost ENV MAIN_PREFIX /api ENV ZIMIT_API_URL /api/v1 -ENV ZIMFARM_WEBAPI https://api.farm.youzim.it/v1 +ENV ZIMFARM_WEBAPI https://api.zimit.kiwix.org/v1 ENV INTERNAL_ZIMFARM_WEBAPI http://dispatcher.backend.zimit.kiwixoffline.node.intern/v1 ENV _ZIMFARM_USERNAME - ENV _ZIMFARM_PASSWORD - @@ -39,11 +39,11 @@ ENV _ZIMFARM_PASSWORD - # ENV ZIMIT_TIME_LIMIT 7200 # notifications -ENV MAILGUN_API_URL https://api.mailgun.net/v3/mg.youzim.it -ENV MAILGUN_FROM Youzim.it +ENV MAILGUN_API_URL https://api.mailgun.net/v3/mg.zimit.kiwix.org +ENV MAILGUN_FROM Zimit # ENV MAILGUN_API_KEY - -ENV PUBLIC_URL https://youzim.it -ENV PUBLIC_API_URL https://youzim.it/api/v1 +ENV PUBLIC_URL https://zimit.kiwix.org +ENV PUBLIC_API_URL https://zimit.kiwix.org/api/v1 # ENV HOOK_TOKEN somestring # prestart script (former entrypoint - database init) diff --git a/api/src/routes/requests.py b/api/src/routes/requests.py index 226ad58..5781cdf 100644 --- a/api/src/routes/requests.py +++ b/api/src/routes/requests.py @@ -62,7 +62,7 @@ def post(self, *args, **kwargs): document["flags"].get("zim-file", url.hostname) + f"_{ident}.zim" ) - document["flags"]["userAgentSuffix"] = "Youzim.it+" + document["flags"]["userAgentSuffix"] = "zimit.kiwix.org+" # remove flags we don't want to overwrite for flag in ("adminEmail", "output", "statsFilename"): diff --git a/api/src/settings.py b/api/src/settings.py index 9a48ab7..b525729 100644 --- a/api/src/settings.py +++ b/api/src/settings.py @@ -15,7 +15,9 @@ DEFAULT_DISK = "1GiB" DEFAULT_MAX_SIZE_LIMIT = 2**30 * 4 DEFAULT_MAX_TIME_LIMIT = 3600 * 2 -ZIMFARM_API_URL = os.getenv("INTERNAL_ZIMFARM_WEBAPI", "https://api.farm.youzim.it/v1") +ZIMFARM_API_URL = os.getenv( + "INTERNAL_ZIMFARM_WEBAPI", "https://api.farm.zimit.kiwix.org/v1" +) ZIMFARM_USERNAME = os.getenv("_ZIMFARM_USERNAME", "-") ZIMFARM_PASSWORD = os.getenv("_ZIMFARM_PASSWORD", "-") ZIMIT_IMAGE = os.getenv("ZIMIT_IMAGE", "openzim/zimit:1.2.0") @@ -64,14 +66,14 @@ TASK_WORKER = os.getenv("TASK_WORKER") # mailgun -MAILGUN_FROM = os.getenv("MAILGUN_FROM", "Youzim.it ") +MAILGUN_FROM = os.getenv("MAILGUN_FROM", "Zimit ") MAILGUN_API_KEY = os.getenv("MAILGUN_API_KEY", "") MAILGUN_API_URL = os.getenv( - "MAILGUN_API_URL", "https://api.mailgun.net/v3/mg.youzim.it" + "MAILGUN_API_URL", "https://api.mailgun.net/v3/mg.zimit.kiwix.org" ) # notifications callback -PUBLIC_URL = os.getenv("PUBLIC_URL", "https://youzim.it") -PUBLIC_API_URL = os.getenv("PUBLIC_API_URL", "https://youzim.it/api/v1") +PUBLIC_URL = os.getenv("PUBLIC_URL", "https://zimit.kiwix.org") +PUBLIC_API_URL = os.getenv("PUBLIC_API_URL", "https://zimit.kiwix.org/api/v1") ZIM_DOWNLOAD_URL = os.getenv( "ZIM_DOWNLOAD_URL", "https://s3.us-west-1.wasabisys.com/org-kiwix-zimit/zim" ) diff --git a/api/src/templates/email_body.html b/api/src/templates/email_body.html index 5fcbe33..987962c 100644 --- a/api/src/templates/email_body.html +++ b/api/src/templates/email_body.html @@ -3,7 +3,7 @@ {% if task.status == "requested" %}

Zim requested!

Your Zim request of {{ task.config.flags.url }} has been recorded.

-

You can follow the status of this request at youzim.it/{{ task._id }}.

+

You can follow the status of this request at zimit.kiwix.org/{{ task._id }}.

We'll send you another email once your Zim file is ready to download.

{% endif %} @@ -20,6 +20,6 @@

Zim is ready!

{% if task.status in ("failed", "canceled") %}

Your zim request has failed!

We are really sorry.

-

This might be due to an error with the URL you entered ({{ task.config.flags.url }}). Please double check and try again.

{% endif %} +

This might be due to an error with the URL you entered ({{ task.config.flags.url }}). Please double check and try again.

{% endif %} diff --git a/api/src/templates/email_subject.txt b/api/src/templates/email_subject.txt index 502d28c..92fd6df 100644 --- a/api/src/templates/email_subject.txt +++ b/api/src/templates/email_subject.txt @@ -1 +1 @@ -Youzim.it task {{ task._id|short_id }} {{ task.status }} +Zimit task {{ task._id|short_id }} {{ task.status }} diff --git a/ui/public/environ.json b/ui/public/environ.json index 7314558..429f640 100644 --- a/ui/public/environ.json +++ b/ui/public/environ.json @@ -1,4 +1,4 @@ { - "ZIMFARM_WEBAPI": "https://api.farm.youzim.it/v1", + "ZIMFARM_WEBAPI": "https://api.farm.zimit.kiwix.org/v1", "ZIMIT_API_URL": "/api/v1" } diff --git a/ui/src/components/NavBar.vue b/ui/src/components/NavBar.vue index 377592b..6feea76 100644 --- a/ui/src/components/NavBar.vue +++ b/ui/src/components/NavBar.vue @@ -1,6 +1,6 @@