diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index d0ca790..8aeb691 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -47,13 +47,13 @@ jobs: NUGET - name: Restore dependencies - run: dotnet restore + run: dotnet restore src/YarpGateway.csproj - name: Build - run: dotnet build --configuration Release --no-restore + run: dotnet build src/YarpGateway.csproj --configuration Release --no-restore - name: Publish - run: dotnet publish --configuration Release --no-build --output ./publish + run: dotnet publish src/YarpGateway.csproj --configuration Release --no-build --output ./publish docker: needs: build diff --git a/Dockerfile b/Dockerfile index dfa6b81..e365b9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,23 +8,23 @@ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src -# Copy project files -COPY ["Directory.Packages.props", "./"] -COPY ["YarpGateway.csproj", "./"] -COPY ["NuGet.Config", "./"] +# Copy project files from src +COPY ["src/Directory.Packages.props", "src/"] +COPY ["src/YarpGateway.csproj", "src/"] +COPY ["src/NuGet.Config", "src/"] # Restore dependencies -RUN dotnet restore "YarpGateway.csproj" +RUN dotnet restore "src/YarpGateway.csproj" # Copy all source code COPY . . WORKDIR "/src" -RUN dotnet build "YarpGateway.csproj" -c $BUILD_CONFIGURATION -o /app/build +RUN dotnet build "src/YarpGateway.csproj" -c $BUILD_CONFIGURATION -o /app/build FROM build AS publish ARG BUILD_CONFIGURATION=Release -RUN dotnet publish "YarpGateway.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false +RUN dotnet publish "src/YarpGateway.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app diff --git a/YarpGateway.slnx b/YarpGateway.slnx new file mode 100644 index 0000000..8fdea26 --- /dev/null +++ b/YarpGateway.slnx @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Config/ConfigNotifyChannel.cs b/src/Config/ConfigNotifyChannel.cs similarity index 100% rename from Config/ConfigNotifyChannel.cs rename to src/Config/ConfigNotifyChannel.cs diff --git a/Config/DatabaseClusterConfigProvider.cs b/src/Config/DatabaseClusterConfigProvider.cs similarity index 100% rename from Config/DatabaseClusterConfigProvider.cs rename to src/Config/DatabaseClusterConfigProvider.cs diff --git a/Config/DatabaseRouteConfigProvider.cs b/src/Config/DatabaseRouteConfigProvider.cs similarity index 100% rename from Config/DatabaseRouteConfigProvider.cs rename to src/Config/DatabaseRouteConfigProvider.cs diff --git a/Config/JwtConfig.cs b/src/Config/JwtConfig.cs similarity index 100% rename from Config/JwtConfig.cs rename to src/Config/JwtConfig.cs diff --git a/Config/RedisConfig.cs b/src/Config/RedisConfig.cs similarity index 100% rename from Config/RedisConfig.cs rename to src/Config/RedisConfig.cs diff --git a/Controllers/GatewayConfigController.cs b/src/Controllers/GatewayConfigController.cs similarity index 100% rename from Controllers/GatewayConfigController.cs rename to src/Controllers/GatewayConfigController.cs diff --git a/Controllers/PendingServicesController.cs b/src/Controllers/PendingServicesController.cs similarity index 100% rename from Controllers/PendingServicesController.cs rename to src/Controllers/PendingServicesController.cs diff --git a/Data/GatewayDbContext.cs b/src/Data/GatewayDbContext.cs similarity index 100% rename from Data/GatewayDbContext.cs rename to src/Data/GatewayDbContext.cs diff --git a/Data/GatewayDbContextFactory.cs b/src/Data/GatewayDbContextFactory.cs similarity index 100% rename from Data/GatewayDbContextFactory.cs rename to src/Data/GatewayDbContextFactory.cs diff --git a/Directory.Build.props b/src/Directory.Build.props similarity index 100% rename from Directory.Build.props rename to src/Directory.Build.props diff --git a/Directory.Packages.props b/src/Directory.Packages.props similarity index 87% rename from Directory.Packages.props rename to src/Directory.Packages.props index ee290df..be76ff7 100644 --- a/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -8,9 +8,10 @@ - + - + + diff --git a/DynamicProxy/DynamicProxyConfigProvider.cs b/src/DynamicProxy/DynamicProxyConfigProvider.cs similarity index 100% rename from DynamicProxy/DynamicProxyConfigProvider.cs rename to src/DynamicProxy/DynamicProxyConfigProvider.cs diff --git a/LoadBalancing/DistributedWeightedRoundRobinPolicy.cs b/src/LoadBalancing/DistributedWeightedRoundRobinPolicy.cs similarity index 100% rename from LoadBalancing/DistributedWeightedRoundRobinPolicy.cs rename to src/LoadBalancing/DistributedWeightedRoundRobinPolicy.cs diff --git a/Metrics/GatewayMetrics.cs b/src/Metrics/GatewayMetrics.cs similarity index 100% rename from Metrics/GatewayMetrics.cs rename to src/Metrics/GatewayMetrics.cs diff --git a/Middleware/JwtTransformMiddleware.cs b/src/Middleware/JwtTransformMiddleware.cs similarity index 100% rename from Middleware/JwtTransformMiddleware.cs rename to src/Middleware/JwtTransformMiddleware.cs diff --git a/Middleware/TenantRoutingMiddleware.cs b/src/Middleware/TenantRoutingMiddleware.cs similarity index 100% rename from Middleware/TenantRoutingMiddleware.cs rename to src/Middleware/TenantRoutingMiddleware.cs diff --git a/Migrations/20260201120312_InitialCreate.Designer.cs b/src/Migrations/20260201120312_InitialCreate.Designer.cs similarity index 100% rename from Migrations/20260201120312_InitialCreate.Designer.cs rename to src/Migrations/20260201120312_InitialCreate.Designer.cs diff --git a/Migrations/20260201120312_InitialCreate.cs b/src/Migrations/20260201120312_InitialCreate.cs similarity index 100% rename from Migrations/20260201120312_InitialCreate.cs rename to src/Migrations/20260201120312_InitialCreate.cs diff --git a/Migrations/20260201133826_AddIsGlobalToTenantRoute.Designer.cs b/src/Migrations/20260201133826_AddIsGlobalToTenantRoute.Designer.cs similarity index 100% rename from Migrations/20260201133826_AddIsGlobalToTenantRoute.Designer.cs rename to src/Migrations/20260201133826_AddIsGlobalToTenantRoute.Designer.cs diff --git a/Migrations/20260201133826_AddIsGlobalToTenantRoute.cs b/src/Migrations/20260201133826_AddIsGlobalToTenantRoute.cs similarity index 100% rename from Migrations/20260201133826_AddIsGlobalToTenantRoute.cs rename to src/Migrations/20260201133826_AddIsGlobalToTenantRoute.cs diff --git a/Migrations/20260222134342_AddPendingServiceDiscovery.Designer.cs b/src/Migrations/20260222134342_AddPendingServiceDiscovery.Designer.cs similarity index 100% rename from Migrations/20260222134342_AddPendingServiceDiscovery.Designer.cs rename to src/Migrations/20260222134342_AddPendingServiceDiscovery.Designer.cs diff --git a/Migrations/20260222134342_AddPendingServiceDiscovery.cs b/src/Migrations/20260222134342_AddPendingServiceDiscovery.cs similarity index 100% rename from Migrations/20260222134342_AddPendingServiceDiscovery.cs rename to src/Migrations/20260222134342_AddPendingServiceDiscovery.cs diff --git a/Migrations/GatewayDbContextModelSnapshot.cs b/src/Migrations/GatewayDbContextModelSnapshot.cs similarity index 100% rename from Migrations/GatewayDbContextModelSnapshot.cs rename to src/Migrations/GatewayDbContextModelSnapshot.cs diff --git a/Migrations/pending_service_migration.sql b/src/Migrations/pending_service_migration.sql similarity index 100% rename from Migrations/pending_service_migration.sql rename to src/Migrations/pending_service_migration.sql diff --git a/Migrations/script.sql b/src/Migrations/script.sql similarity index 100% rename from Migrations/script.sql rename to src/Migrations/script.sql diff --git a/Models/GwPendingServiceDiscovery.cs b/src/Models/GwPendingServiceDiscovery.cs similarity index 100% rename from Models/GwPendingServiceDiscovery.cs rename to src/Models/GwPendingServiceDiscovery.cs diff --git a/Models/GwServiceInstance.cs b/src/Models/GwServiceInstance.cs similarity index 100% rename from Models/GwServiceInstance.cs rename to src/Models/GwServiceInstance.cs diff --git a/Models/GwTenant.cs b/src/Models/GwTenant.cs similarity index 100% rename from Models/GwTenant.cs rename to src/Models/GwTenant.cs diff --git a/Models/GwTenantRoute.cs b/src/Models/GwTenantRoute.cs similarity index 100% rename from Models/GwTenantRoute.cs rename to src/Models/GwTenantRoute.cs diff --git a/NuGet.Config b/src/NuGet.Config similarity index 100% rename from NuGet.Config rename to src/NuGet.Config diff --git a/Program.cs b/src/Program.cs similarity index 100% rename from Program.cs rename to src/Program.cs diff --git a/Properties/launchSettings.json b/src/Properties/launchSettings.json similarity index 100% rename from Properties/launchSettings.json rename to src/Properties/launchSettings.json diff --git a/Services/KubernetesPendingSyncService.cs b/src/Services/KubernetesPendingSyncService.cs similarity index 100% rename from Services/KubernetesPendingSyncService.cs rename to src/Services/KubernetesPendingSyncService.cs diff --git a/Services/PgSqlConfigChangeListener.cs b/src/Services/PgSqlConfigChangeListener.cs similarity index 100% rename from Services/PgSqlConfigChangeListener.cs rename to src/Services/PgSqlConfigChangeListener.cs diff --git a/Services/RedisConnectionManager.cs b/src/Services/RedisConnectionManager.cs similarity index 100% rename from Services/RedisConnectionManager.cs rename to src/Services/RedisConnectionManager.cs diff --git a/Services/RouteCache.cs b/src/Services/RouteCache.cs similarity index 100% rename from Services/RouteCache.cs rename to src/Services/RouteCache.cs diff --git a/YarpGateway.csproj b/src/YarpGateway.csproj similarity index 100% rename from YarpGateway.csproj rename to src/YarpGateway.csproj diff --git a/appsettings.Development.json b/src/appsettings.Development.json similarity index 100% rename from appsettings.Development.json rename to src/appsettings.Development.json diff --git a/appsettings.json b/src/appsettings.json similarity index 100% rename from appsettings.json rename to src/appsettings.json