Skip to content
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
9 changes: 3 additions & 6 deletions .github/workflows/Deploy-Server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
run: |
docker build \
-t seanyee1227/pushandpull-server:latest \
-f PushAndPull/Server/Dockerfile \
PushAndPull/Server
-f PushAndPull/PushAndPull/Dockerfile \
PushAndPull/PushAndPull

- name: Push Docker image
run: docker push seanyee1227/pushandpull-server:latest
Expand All @@ -44,10 +44,7 @@ jobs:
-p 21754:80 \
-e ASPNETCORE_URLS=http://+:80 \
-e ASPNETCORE_ENVIRONMENT=Production \
-e Steam__ApiKey=${{ secrets.STEAM_API_KEY }} \
-e AZURE_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }} \
-e AZURE_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRET }} \
-e AZURE_TENANT_ID=${{ secrets.AZURE_TENANT_ID }} \
-e "ConnectionStrings__Default=${{ secrets.DB_CONNECTION_STRING }}" \
seanyee1227/pushandpull-server:latest

sleep 5
Expand Down
5 changes: 3 additions & 2 deletions PushAndPull/.claude/commands/pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Generate a PR based on the current branch. Behavior differs depending on the bra
**Step 3. Ask user for version number**

Use AskUserQuestion:
> "ํ˜„์žฌ ๋ฒ„์ „: {current_version}
> ํ˜„์žฌ ๋ฒ„์ „: {current_version}
> ์ถ”์ฒœ ๋ฒ„์ „ ์—…: {Major/Minor/Patch} โ†’ {recommended_version}
> ์ด์œ : {brief reason}
>
Expand Down Expand Up @@ -143,8 +143,9 @@ Format: `{type}: {Korean description}`
**Types:**
- `feature` โ€” new feature added
- `fix` โ€” bug fix or missing configuration/DI registration
- `modify` โ€” modification to existing code
- `update` โ€” modification to existing code
- `refactor` โ€” refactoring without behavior change
- `docs` - documentation changes

**Rules:**
- Description in Korean
Expand Down
5 changes: 3 additions & 2 deletions PushAndPull/PushAndPull/Global/Config/DatabaseConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ public static IServiceCollection AddDatabase(
this IServiceCollection services,
IConfiguration configuration)
{
var connectionString = configuration[configuration["KeyVault:DbConnectionSecretName"]!]
?? throw new InvalidOperationException("DB ์—ฐ๊ฒฐ ๋ฌธ์ž์—ด์„ Key Vault์—์„œ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.");
var connectionString = configuration.GetConnectionString("Default");
if (string.IsNullOrWhiteSpace(connectionString))
throw new InvalidOperationException("ConnectionStrings:Default is not configured or is empty.");
Comment thread
Sean-mn marked this conversation as resolved.

services.AddDbContext<AppDbContext>(options =>
{
Expand Down
4 changes: 0 additions & 4 deletions PushAndPull/PushAndPull/Program.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
using Azure.Identity;
using Gamism.SDK.Extensions.AspNetCore;
using PushAndPull.Domain.Auth.Config;
using PushAndPull.Domain.Room.Config;
using PushAndPull.Global.Config;

var builder = WebApplication.CreateBuilder(args);

var keyVaultUri = new Uri(builder.Configuration["KeyVault:Uri"]!);
builder.Configuration.AddAzureKeyVault(keyVaultUri, new DefaultAzureCredential());

builder.Services.AddControllers();
builder.Services.AddGamismSdk(options =>
{
Expand Down
8 changes: 3 additions & 5 deletions PushAndPull/PushAndPull/PushAndPull.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
<UserSecretsId>fa34aedf-d249-45e4-9b9f-2899dbcd05d6</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.5.0" />
<PackageReference Include="Azure.Identity" Version="1.18.0" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.9.0" />
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
<PackageReference Include="Dapper" Version="2.1.66" />
<PackageReference Include="Gamism.SDK.Extensions.AspNetCore" Version="0.2.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.12" />
Expand Down
4 changes: 2 additions & 2 deletions PushAndPull/PushAndPull/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Redis": {
"ConnectionString": "localhost:6379,abortConnect=false"
},
"KeyVault": {
"DbConnectionSecretName": "DbConnection-dev"
"ConnectionStrings": {
"Default": ""
}
}
4 changes: 2 additions & 2 deletions PushAndPull/PushAndPull/appsettings.Production.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Redis": {
"ConnectionString": "redis:6379,abortConnect=false"
},
"KeyVault": {
"DbConnectionSecretName": "DbConnection-prod"
"ConnectionStrings": {
"Default": ""
}
}
8 changes: 2 additions & 6 deletions PushAndPull/PushAndPull/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@
"WebApiKey": "Steam-ApiKey",
"AppId": 480
},
"KeyVault": {
"Uri": "https://pushandpullsecret.vault.azure.net/",
"DbConnectionSecretName": "DbConnection-dev"
},
"Redis": {
"ConnectionString": "localhost:6379,abortConnect=false"
"ConnectionStrings": {
"Default": ""
}

}
Loading