Skip to content

Commit b0c54a5

Browse files
authored
Merge pull request #221 from AndrewCS149/testWorkflow
testWorkflow
2 parents 99f41b3 + c71375b commit b0c54a5

File tree

4 files changed

+32
-25
lines changed

4 files changed

+32
-25
lines changed

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ services:
2929
image: ${DEVBLOG_SERVER_CONTAINER_NAME}
3030
build: ./server
3131
container_name: ${DEVBLOG_SERVER_CONTAINER_NAME}
32+
environment:
33+
- ASPNETCORE_CERT_PASSWORD=${ASPNETCORE_CERT_PASSWORD}
34+
- ASPNETCORE_CERT_PATH=${ASPNETCORE_CERT_PATH}
35+
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT}
36+
- ASPNETCORE_HTTPS_PORTS=${ASPNETCORE_HTTPS_PORTS}
37+
- ASPNETCORE_HTTP_PORTS=${ASPNETCORE_HTTP_PORTS}
3238
volumes:
3339
- ${SERVER_PUBLISH_VOLUME}
3440
- ${SERVER_HTTPS_VOLUME}

server/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
FROM mcr.microsoft.com/dotnet/aspnet:8.0
22
EXPOSE 8080
3-
EXPOSE 80
43
EXPOSE 8081
54
WORKDIR /app/publish
65
ENTRYPOINT ["dotnet", "devblog.dll"]

server/Program.cs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ public static void Main(string[] args)
2727
});
2828

2929
// Add services to the container.
30-
builder.Services.AddSwaggerGen(c =>
31-
{
32-
c.SwaggerDoc("v1", new OpenApiInfo { Title = "DevBlog", Version = "v1" });
33-
});
30+
// builder.Services.AddSwaggerGen(c =>
31+
// {
32+
// c.SwaggerDoc("v1", new OpenApiInfo { Title = "DevBlog", Version = "v1" });
33+
// });
3434

35-
builder.Services.AddControllersWithViews();
35+
// builder.Services.AddControllersWithViews();
3636

3737
// ----------------------- DATABASES -------------------------------
3838
builder.Services.AddDbContext<AppDbContext>(options =>
@@ -99,11 +99,11 @@ public static void Main(string[] args)
9999
options.AddPolicy("Visitor", policy => policy.RequireRole(Role.Visitor));
100100
});
101101

102-
builder.Services.AddHttpsRedirection(options =>
103-
{
104-
options.RedirectStatusCode = (int)HttpStatusCode.TemporaryRedirect;
105-
options.HttpsPort = 32778;
106-
});
102+
// builder.Services.AddHttpsRedirection(options =>
103+
// {
104+
// options.RedirectStatusCode = (int)HttpStatusCode.TemporaryRedirect;
105+
// options.HttpsPort = 32778;
106+
// });
107107

108108
var app = builder.Build();
109109

@@ -112,6 +112,8 @@ public static void Main(string[] args)
112112
if (!app.Environment.IsDevelopment())
113113
{
114114
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
115+
app.UseSwagger();
116+
app.UseSwaggerUI();
115117
app.UseHsts();
116118
}
117119

@@ -120,16 +122,16 @@ public static void Main(string[] args)
120122

121123
// ----------------------- ROUTING -------------------------------
122124
app.UseHttpsRedirection();
123-
app.UseStaticFiles();
125+
// app.UseStaticFiles();
124126
app.UseRouting();
125127
app.UseAuthentication();
126128
app.UseAuthorization();
127129

128-
app.UseSwagger();
129-
app.UseSwaggerUI(c =>
130-
{
131-
c.SwaggerEndpoint("/swagger/v1/swagger.json", "DevBlog");
132-
});
130+
// app.UseSwagger();
131+
// app.UseSwaggerUI(c =>
132+
// {
133+
// c.SwaggerEndpoint("/swagger/v1/swagger.json", "DevBlog");
134+
// });
133135
app.UseDeveloperExceptionPage();
134136

135137
app.MapControllerRoute(

server/devblog.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
<PropertyGroup>
33
<TargetFramework>net8.0</TargetFramework>
44
<Nullable>enable</Nullable>
5-
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
6-
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
5+
<!-- <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> -->
6+
<!-- <TypeScriptToolsVersion>Latest</TypeScriptToolsVersion> -->
77
<!-- <IsPackable>false</IsPackable> -->
88
<!-- <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes> -->
9-
<SpaRoot>..\client</SpaRoot>
10-
<SpaProxyServerUrl>https://localhost:44482</SpaProxyServerUrl>
9+
<!-- <SpaRoot>..\client</SpaRoot> -->
10+
<!-- <SpaProxyServerUrl>https://localhost:44482</SpaProxyServerUrl> -->
1111
<ImplicitUsings>enable</ImplicitUsings>
1212
<UserSecretsId>9c535b88-0982-4726-b8dd-98fd6ca72fbe</UserSecretsId>
1313
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
1414
</PropertyGroup>
1515

16-
<ItemGroup>
16+
<!-- <ItemGroup> -->
1717
<!-- Don't publish the SPA source files, but do show them in the project files list -->
18-
<Content Remove="$(SpaRoot)**" />
19-
<None Remove="$(SpaRoot)**" />
20-
</ItemGroup>
18+
<!-- <Content Remove="$(SpaRoot)**" /> -->
19+
<!-- <None Remove="$(SpaRoot)**" /> -->
20+
<!-- </ItemGroup> -->
2121

2222
<ItemGroup>
2323
<PackageReference Include="Discord.Net.Core" Version="3.10.0" />

0 commit comments

Comments
 (0)