File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed
backend/src/AcmStatisticsBackend.Web.Host Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -24,4 +24,5 @@ RUN apt-get update && apt-get install -y wait-for-it
24
24
ENV WAIT_COMMAND true
25
25
WORKDIR /app
26
26
COPY --from=publish /app/publish .
27
+ ENV ASPNETCORE_HTTP_PORTS 80
27
28
CMD $WAIT_COMMAND && dotnet AcmStatisticsBackend.Web.Host.dll
Original file line number Diff line number Diff line change 1
- using Microsoft . AspNetCore ;
2
- using Microsoft . AspNetCore . Hosting ;
1
+ using Microsoft . AspNetCore . Hosting ;
2
+ using Microsoft . Extensions . Hosting ;
3
3
4
4
namespace AcmStatisticsBackend . Web . Host . Startup
5
5
{
6
6
public class Program
7
7
{
8
8
public static void Main ( string [ ] args )
9
9
{
10
- BuildWebHost ( args ) . Run ( ) ;
10
+ CreateHostBuilder ( args ) . Build ( ) . Run ( ) ;
11
11
}
12
12
13
- public static IWebHost BuildWebHost ( string [ ] args )
13
+ public static IHostBuilder CreateHostBuilder ( string [ ] args )
14
14
{
15
- return WebHost . CreateDefaultBuilder ( args )
16
- . UseStartup < Startup > ( )
17
- . Build ( ) ;
15
+ return Microsoft . Extensions . Hosting . Host . CreateDefaultBuilder ( args )
16
+ . ConfigureWebHostDefaults ( webHost => webHost . UseStartup < Startup > ( ) ) ;
18
17
}
19
18
}
20
19
}
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ services:
36
36
- ACM_STATISTICS_CRAWLER_ENV__crawlers__vjudge__crawler_login_user="${VJUDGE_USERNAME}"
37
37
- ACM_STATISTICS_CRAWLER_ENV__crawlers__vjudge__crawler_login_password="${VJUDGE_PASSWORD}"
38
38
labels :
39
+ - traefik.enable=true
39
40
- traefik.http.routers.crawler-api-backend.rule=PathPrefix(`/api/crawlers`)
40
41
- traefik.http.services.crawler-api-backend.loadbalancer.server.port=80
41
42
@@ -57,7 +58,6 @@ services:
57
58
ASPNETCORE_FORWARDEDHEADERS_ENABLED : ' true'
58
59
labels :
59
60
- traefik.http.routers.backend.rule=PathPrefix(`/api`)||PathPrefix(`/AntiForgery`)
60
- - traefik.http.routers.backend.priority=18
61
61
- traefik.http.services.backend.loadbalancer.server.port=80
62
62
volumes :
63
63
- ./App_Data:/app/App_Data
Original file line number Diff line number Diff line change @@ -21,4 +21,5 @@ RUN apt-get update && apt-get install -y wait-for-it
21
21
ENV WAIT_COMMAND true
22
22
WORKDIR /app
23
23
COPY --from=publish /app/publish .
24
+ ENV ASPNETCORE_HTTP_PORTS 80
24
25
CMD $WAIT_COMMAND && dotnet OHunt.Web.dll
You can’t perform that action at this time.
0 commit comments