From 4a3c4b8c9641688d03684f56acc0c011f1a29e74 Mon Sep 17 00:00:00 2001 From: Matthias Guillitte Date: Thu, 16 Jul 2026 17:16:35 +0200 Subject: [PATCH] Misc. CICD fixes --- .github/workflows/deploy.yaml | 6 +++--- cloud/app.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f4ec79e..615c8d0 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -28,12 +28,12 @@ jobs: - name: Build and push Docker image run: | - docker build -t git.matthiasg.dev/ninluc/smartwave-api:latest . - docker push git.matthiasg.dev/ninluc/smartwave-api:latest + docker build --file cloud/Dockerfile -t git.matthiasg.dev/ninluc/smartwave-api:latest . + docker push --file cloud/Dockerfile git.matthiasg.dev/ninluc/smartwave-api:latest notify: needs: build-image runs-on: ubuntu-latest steps: - name: Notify Watchtower - run: "curl -i -X POST -H \"Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}\" https://watchtower.beermaker.matthiasg.dev/v1/update" \ No newline at end of file + run: "curl -i -X POST -H \"Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}\" https://watchtower.smartwave.matthiasg.dev/v1/update" \ No newline at end of file diff --git a/cloud/app.py b/cloud/app.py index e20f813..136c729 100644 --- a/cloud/app.py +++ b/cloud/app.py @@ -14,7 +14,8 @@ app = Flask(__name__) # --------------------------------------------------------- # Configure MongoDB connection (adjust the URI as needed for your environment) -client = MongoClient("mongodb://localhost:27017/") +MONGO_URI = os.getenv("MONGO_URI", "mongodb://localhost:27017/") +client = MongoClient(MONGO_URI) db = client["microwave_network_db"] cooking_collection = db["cooking_parameters"] device_network_collection = db["device_network"]