Skip to content

Commit

Permalink
Merge pull request #22 from Team-Wilhelm/deployed
Browse files Browse the repository at this point in the history
Deployed
  • Loading branch information
juuwel authored May 27, 2024
2 parents fb1075d + 9fda2fa commit 4684690
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/deploy-be.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Deploy BE

on:
workflow_dispatch:
pull_request:
Expand All @@ -10,11 +12,13 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: 'deployed'
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- run: cd WebSocketExercise && dotnet publish -c Release -o publish
- run: cd api && dotnet publish -c Release -o publish
- uses: AkhileshNS/[email protected]
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
Expand All @@ -24,3 +28,19 @@ jobs:

env: #only the key names below should be prefixed HD_ and the ${{secrets.NAME}} should not
HD_DbConnection: ${{secrets.DbConnection}}
HD_AZURE_BLOB_CONNECTION_STRING: ${{secrets.AZURE_BLOB_CONNECTION_STRING}}
HD_AZURE_BLOB_PLANT_IMAGES_CONTAINER: ${{secrets.AZURE_BLOB_PLANT_IMAGES_CONTAINER}}
HD_AZURE_BLOB_USER_PROFILE_IMAGES_CONTAINER: ${{secrets.AZURE_BLOB_USER_PROFILE_IMAGES_CONTAINER}}
HD_AZURE_VISION_BASE_URL: ${{secrets.AZURE_VISION_BASE_URL}}
HD_AZURE_VISION_KEY: ${{secrets.AZURE_VISION_KEY}}
HD_AZURE_VISION_REMOVE_BACKGROUND_ENDPOINT: ${{secrets.AZURE_VISION_REMOVE_BACKGROUND_ENDPOINT}}
HD_JWT_AUDIENCE: ${{secrets.JWT_AUDIENCE}}
HD_JWT_EXPIRY: ${{secrets.JWT_EXPIRY}}
HD_JWT_ISSUER: ${{secrets.JWT_ISSUER}}
HD_JWT_KEY: ${{secrets.JWT_KEY}}
HD_MQTT_BROKER: ${{secrets.MQTT_BROKER}}
HD_MQTT_CLIENT_ID: ${{secrets.MQTT_CLIENT_ID}}
HD_MQTT_PORT: ${{secrets.MQTT_PORT}}
HD_MQTT_PUBLISH_TOPIC: ${{secrets.MQTT_PUBLISH_TOPIC}}
HD_MQTT_SUBSCRIBE_TOPIC: ${{secrets.MQTT_SUBSCRIBE_TOPIC}}
HD_MQTT_USERNAME: ${{secrets.MQTT_USERNAME}}
4 changes: 1 addition & 3 deletions api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
using Core.Services;
using Fleck;
using Infrastructure;
using Infrastructure.Repositories;
using lib;
using Microsoft.EntityFrameworkCore;
using Serilog;
using Shared.Dtos.FromClient.Identity;
using Shared.Exceptions;
using Shared.Models;
using Testcontainers.PostgreSql;
Expand Down Expand Up @@ -115,7 +113,7 @@ public static async Task<WebApplication> StartApi(string[] args)

var port = Environment.GetEnvironmentVariable("PORT") ?? "8181";
var wsServer = new WebSocketServer($"ws://0.0.0.0:{port}");
// builder.WebHost.UseUrls("http://*:9999");
builder.WebHost.UseUrls("http://*:9999");

wsServer.Start(socket =>
{
Expand Down

0 comments on commit 4684690

Please sign in to comment.