From 4c8c2ed3d640d73664c3427b53f0a1afc4952fc2 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 11:55:26 +0200 Subject: [PATCH 1/9] fixed "deploy:pacman" --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eac63af..ac2bedc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -331,7 +331,6 @@ deploy:pacman: artifacts: true script: - source .PKGBUILD/PKGBUILD - - source version.env # fastapi-dls-1.0-1-any.pkg.tar.zst - BUILD_NAME=${pkgname}-${CI_COMMIT_REF_NAME}-${pkgrel}-any.pkg.tar.zst - PACKAGE_NAME=${pkgname} From 45545953ed6c3e34d50148c59b7615e0586c7769 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:19:07 +0200 Subject: [PATCH 2/9] improvements thanks to @AbsolutelyFree (https://gitea.publichub.eu/oscar.krause/fastapi-dls/issues/1) --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 698dae2..6102fb1 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ docker run -e DLS_URL=`hostname -i` -e DLS_PORT=443 -p 443:443 -v $WORKING_DIR:/ See [`examples`](examples) directory for more advanced examples (with reverse proxy usage). +> Adjust *REQUIRED* variables as needed + ```yaml version: '3.9' @@ -152,6 +154,8 @@ su - www-data -c "/opt/fastapi-dls/venv/bin/uvicorn main:app --app-dir=/opt/fast **Create config file** +> Adjust `DLS_URL` as needed (accessing from LAN won't work with 127.0.0.1) + ```shell mkdir /etc/fastapi-dls cat </etc/fastapi-dls/env @@ -254,10 +258,11 @@ su - ${SERVICE_USER} -c "${BASE_DIR}/venv/bin/uvicorn main:app --app-dir=${BASE_ **Create config file** +> Adjust `DLS_URL` as needed (accessing from LAN won't work with 127.0.0.1) + ```shell BASE_DIR=/opt/fastapi-dls cat </etc/fastapi-dls/env -# Adjust DSL_URL as needed (accessing from LAN won't work with 127.0.0.1) DLS_URL=127.0.0.1 DLS_PORT=443 LEASE_EXPIRE_DAYS=90 @@ -332,6 +337,7 @@ apt-get install -f --fix-missing ``` Start with `systemctl start fastapi-dls.service` and enable autostart with `systemctl enable fastapi-dls.service`. +Now you have to edit `/etc/fastapi-dls/env` as needed. ## ArchLinux (using `pacman`) @@ -353,6 +359,7 @@ pacman -U --noconfirm fastapi-dls.pkg.tar.zst ``` Start with `systemctl start fastapi-dls.service` and enable autostart with `systemctl enable fastapi-dls.service`. +Now you have to edit `/etc/default/fastapi-dls` as needed. ## unRAID From c1eaa33d9ef1f325d34378f714d459127416eb43 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:22:22 +0200 Subject: [PATCH 3/9] added docker command to logging section thanks to @libreshare (https://gitea.publichub.eu/oscar.krause/fastapi-dls/issues/2) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6102fb1..92f7365 100644 --- a/README.md +++ b/README.md @@ -566,6 +566,10 @@ There are many other internal api endpoints for handling authentication and leas **Please make sure that fastapi-dls and your guests are on the same timezone!** +## Docker + +Logs are available with `docker logs `. To get the correct container-id use `docker container ls` or `docker ps`. + ## Linux Logs are available with `journalctl -u nvidia-gridd -f`. From 7380e4328e6addf3620952c36099adeab9514452 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:38:54 +0200 Subject: [PATCH 4/9] removed mysql from included docker drivers --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 92f7365..3927bee 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Docker-Images are available here: - [Docker-Hub](https://hub.docker.com/repository/docker/collinwebdesigns/fastapi-dls): `collinwebdesigns/fastapi-dls:latest` - [GitLab-Registry](https://git.collinwebdesigns.de/oscar.krause/fastapi-dls/container_registry): `registry.git.collinwebdesigns.de/oscar.krause/fastapi-dls/main:latest` -The images include database drivers for `postgres`, `mysql`, `mariadb` and `sqlite`. +The images include database drivers for `postgres`, `mariadb` and `sqlite`. **Run this on the Docker-Host** From 10caf2310c265850db6c341e38bb6573732beb14 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:39:13 +0200 Subject: [PATCH 5/9] added information about ipv6 may be must disabled --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 3927bee..c11a149 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Only the clients need a connection to this service on configured port. - 256mb ram - 4gb hdd +- *maybe IPv6 must be disabled* Tested with Ubuntu 22.10 (from Proxmox templates), actually its consuming 100mb ram and 750mb hdd. @@ -566,6 +567,8 @@ There are many other internal api endpoints for handling authentication and leas **Please make sure that fastapi-dls and your guests are on the same timezone!** +Maybe you have to disable IPv6 on the machine you are running FastAPI-DLS. + ## Docker Logs are available with `docker logs `. To get the correct container-id use `docker container ls` or `docker ps`. From c02ca762ea9e0c4169d0ff82d0ac44bac7cf69d5 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:42:19 +0200 Subject: [PATCH 6/9] typos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c11a149..9c3ed9a 100644 --- a/README.md +++ b/README.md @@ -630,7 +630,7 @@ only gets a valid local license.
- Log + Log example **Display-Container-LS** From d4267f3ee618bc88851d77c1adf474bb9531cffa Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 12:42:31 +0200 Subject: [PATCH 7/9] toggle api endpoints --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 9c3ed9a..191ced4 100644 --- a/README.md +++ b/README.md @@ -511,6 +511,9 @@ Done. For more information check [troubleshoot section](#troubleshoot). # Endpoints +
+ show + ### `GET /` Redirect to `/-/readme`. @@ -562,6 +565,7 @@ Generate client token, (see [installation](#installation)). ### Others There are many other internal api endpoints for handling authentication and lease process. +
# Troubleshoot From a4e98dae46ceeb0d25a5662562083d885f17168f Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 13:42:21 +0200 Subject: [PATCH 8/9] fixed docker image path --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac2bedc..8d7160f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -269,7 +269,7 @@ deploy:docker: script: - echo "========== GitLab-Registry ==========" - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - IMAGE=$CI_REGISTRY/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME + - IMAGE=$CI_REGISTRY/$CI_PROJECT_PATH - docker build . --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:$CI_COMMIT_REF_NAME - docker build . --build-arg VERSION=$CI_COMMIT_REF_NAME --build-arg COMMIT=$CI_COMMIT_SHA --tag $IMAGE:latest - docker push $IMAGE:$CI_COMMIT_REF_NAME From 7ae1201c8fdb903e8342c2d9f6c2968f8e69b84e Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 4 Jul 2023 13:43:15 +0200 Subject: [PATCH 9/9] fixed new docker registry image path --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 191ced4..99b4ab7 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Tested with Ubuntu 22.10 (from Proxmox templates), actually its consuming 100mb Docker-Images are available here: - [Docker-Hub](https://hub.docker.com/repository/docker/collinwebdesigns/fastapi-dls): `collinwebdesigns/fastapi-dls:latest` -- [GitLab-Registry](https://git.collinwebdesigns.de/oscar.krause/fastapi-dls/container_registry): `registry.git.collinwebdesigns.de/oscar.krause/fastapi-dls/main:latest` +- [GitLab-Registry](https://git.collinwebdesigns.de/oscar.krause/fastapi-dls/container_registry): `registry.git.collinwebdesigns.de/oscar.krause/fastapi-dls:latest` The images include database drivers for `postgres`, `mariadb` and `sqlite`.