From b924393048980f3b9e9594daed4990abf976fa0a Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:35:40 +0200 Subject: [PATCH] feat: ajout l'injection des variables d'environnement et la configuration des connexions dans compose.yaml --- .gitea/workflows/deploy-prod.yaml | 6 +++++- compose.yaml | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-prod.yaml b/.gitea/workflows/deploy-prod.yaml index 3fe53de..839ddce 100644 --- a/.gitea/workflows/deploy-prod.yaml +++ b/.gitea/workflows/deploy-prod.yaml @@ -5,12 +5,16 @@ on: [push] jobs: deploy: name: Build et Déploiement - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - name: 📥 Récupération du code source uses: actions/checkout@v4 + - name: 🔐 Injection des variables d'environnement + run: | + echo "PGSQL_CONNECTION=${{ secrets.PGSQL_CONNECTION }}" > .env + - name: 🐳 Redémarrage Docker run: | echo "🚀 Démarrage du déploiement Docker sur api-prod..." diff --git a/compose.yaml b/compose.yaml index 5673343..dd0bc07 100644 --- a/compose.yaml +++ b/compose.yaml @@ -4,4 +4,6 @@ build: context: . ports: - - "8080:8080" \ No newline at end of file + - "8080:8080" + environment: + - ConnectionStrings__PostGreSQLConnection=${PGSQL_CONNECTION} \ No newline at end of file