diff --git a/.gitea/workflows/deploy-test-keycloak.yaml b/.gitea/workflows/deploy-test-keycloak.yaml new file mode 100644 index 0000000..84555bd --- /dev/null +++ b/.gitea/workflows/deploy-test-keycloak.yaml @@ -0,0 +1,23 @@ +name: Deploiement Test Keycloak +run-nale: ${{ gitea.actor }} déploie test keycloak. + +on: + push: + branches: + - loic-masi/ajout-auth-keycloak + +jobs: + Deploiement-Test-Keycloak: + name: Build et Déploiement + runs-on: test-keycloak + + steps: + - name: Récupération du code source + uses: actions/checkout@v4 + + - name: Redémarrage Docker + run: | + echo "Démarrage du déploiement Docker" + docker compose down + docker compose up -d --build + echo "Déploiement terminé !" \ No newline at end of file diff --git a/Webzine.WebApplication/Webzine.WebApplication.csproj b/Webzine.WebApplication/Webzine.WebApplication.csproj index 5f8c0ca..9f96baf 100644 --- a/Webzine.WebApplication/Webzine.WebApplication.csproj +++ b/Webzine.WebApplication/Webzine.WebApplication.csproj @@ -22,6 +22,8 @@ + + diff --git a/Webzine.WebApplication/appsettings.Development.json b/Webzine.WebApplication/appsettings.Development.json index cc00e7d..f458f85 100644 --- a/Webzine.WebApplication/appsettings.Development.json +++ b/Webzine.WebApplication/appsettings.Development.json @@ -1,6 +1,6 @@ { "Seeder": "Local", - "Repository": "Db", + "Repository": "Local", "SpotifySeeder": { "ClientId": "", "ClientSecret": "" diff --git a/Webzine.WebApplication/appsettings.Production.json b/Webzine.WebApplication/appsettings.Production.json index fc0df2b..f458f85 100644 --- a/Webzine.WebApplication/appsettings.Production.json +++ b/Webzine.WebApplication/appsettings.Production.json @@ -1,8 +1,8 @@ { - "Seeder": "Spotify", - "Repository": "Db", + "Seeder": "Local", + "Repository": "Local", "SpotifySeeder": { - "ClientId": "390689c2fc79408b830d2f518375ef84", - "ClientSecret": "6e98a09c77ad43ae93bc0f0560cfcbe1" + "ClientId": "", + "ClientSecret": "" } } diff --git a/Webzine.WebApplication/appsettings.json b/Webzine.WebApplication/appsettings.json index a3604ad..a6cfb03 100644 --- a/Webzine.WebApplication/appsettings.json +++ b/Webzine.WebApplication/appsettings.json @@ -13,7 +13,7 @@ }, "ConnectionStrings": { "SqliteConnection": "Data Source=Data/webzine.sqlite", - "PostGreSQLConnection": "Host=localhost;Port=5432;Username=admin;Password=admin123;Database=webzine_db" + "PostGreSQLConnection": "" }, "SpotifySeeder": { "ClientId": "", @@ -25,6 +25,12 @@ "TracksPerAlbum": 40, "MaxCommentsPerTrack": 3 }, + "Keycloak": { + "Authority": "https:///realms/", + "ClientId": "my-aspnet-app", + "ClientSecret": "your-client-secret", + "ResponseType": "code" + }, "AllowedHosts": "*", "EfPerformance": { "SeuilMs": 60