From 3878b817815dfec3d0d5432e283e5f83f571804e Mon Sep 17 00:00:00 2001 From: leonard Date: Tue, 5 Mar 2024 16:04:22 +0100 Subject: [PATCH 1/3] fix de l'exemple d'application Fastapi pour qu'elle marche dans un sous domaine --- conf/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/conf/__init__.py b/conf/__init__.py index 5703e85..855b69c 100644 --- a/conf/__init__.py +++ b/conf/__init__.py @@ -5,8 +5,10 @@ from fastapi import FastAPI UVICORN_ROOT_PATH = os.environ.get('UVICORN_ROOT_PATH') -#app = FastAPI(root_path=UVICORN_ROOT_PATH) -app = FastAPI() +if UVICORN_ROOT_PATH and len(UVICORN_ROOT_PATH) > 0 and UVICORN_ROOT_PATH != '/': + app = FastAPI(root_path=UVICORN_ROOT_PATH) +else: + app = FastAPI() @app.get("/") def read_root(): From 0325748d9c8be679c1291a081e00b715f9227042 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 5 Mar 2024 20:15:42 +0000 Subject: [PATCH 2/3] Auto-update README --- README.md | 4 ++-- README_fr.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f2ea2ad..a34aaef 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -42,4 +42,4 @@ or sudo yunohost app upgrade fastapi -u https://github.com/YunoHost-Apps/fastapi_ynh/tree/testing --debug ``` -**More info regarding app packaging:** +**More info regarding app packaging:** \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index fa92dc8..6d83f27 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,5 +1,5 @@ From 5431bf383d9496b6d294b7d8b445e4d502db5901 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 7 Apr 2024 15:53:21 +0000 Subject: [PATCH 3/3] Auto-update READMEs --- ALL_README.md | 2 +- README.md | 6 +++--- README_eu.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 README_eu.md diff --git a/ALL_README.md b/ALL_README.md index 3d6c579..77b7509 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,6 @@ # All available README files by language - [Read the README in English](README.md) +- [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) -- [Leggi il “README” in italiano](README_it.md) diff --git a/README.md b/README.md index 83a5153..4deed31 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -9,7 +9,7 @@ It shall NOT be edited by hand. [![Install FastAPI with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fastapi) -*[Read this README is other languages.](./ALL_README.md)* +*[Read this README in other languages.](./ALL_README.md)* > *This package allows you to install FastAPI quickly and simply on a YunoHost server.* > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* @@ -42,4 +42,4 @@ or sudo yunohost app upgrade fastapi -u https://github.com/YunoHost-Apps/fastapi_ynh/tree/testing --debug ``` -**More info regarding app packaging:** \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..20f231d --- /dev/null +++ b/README_eu.md @@ -0,0 +1,45 @@ + + +# FastAPI YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/fastapi.svg)](https://dash.yunohost.org/appci/app/fastapi) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/fastapi.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/fastapi.maintain.svg) + +[![Instalatu FastAPI YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fastapi) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek FastAPI YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +This Application install a FastAPI application "Hello Word" ready to be customized by your own code + +**Paketatutako bertsioa:** 1.0~ynh2 + +## Pantaila-argazkiak + +![FastAPI(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) + +## Dokumentazioa eta baliabideak + +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/fastapi_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/fastapi_ynh/tree/testing --debug +edo +sudo yunohost app upgrade fastapi -u https://github.com/YunoHost-Apps/fastapi_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:**