Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployed #22

Merged
merged 8 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading