Skip to content
Snippets Groups Projects
Commit 811d1e3a authored by Lucca Santangelo's avatar Lucca Santangelo
Browse files

remove https

parent 62fb48a0
No related branches found
No related tags found
1 merge request!6remove https and docker
obj
bin
\ No newline at end of file
# https://hub.docker.com/_/microsoft-dotnet-core
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /app
EXPOSE 443
# copy csproj and restore as distinct layers
WORKDIR /src
COPY Tsi1.Api/*.csproj ./Tsi1.Api/
COPY Tsi1.BusinessLayer/*.csproj ./Tsi1.BusinessLayer/
COPY Tsi1.DataLayer/*.csproj ./Tsi1.DataLayer/
RUN dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p 111111
RUN dotnet restore ./Tsi1.Api/Tsi1.Api.csproj
# copy everything else and build app
COPY . ./
WORKDIR /src/Tsi1.Api
RUN dotnet publish -c release -o /app/publish
# final stage/image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /app
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "Tsi1.Api.dll"]
\ No newline at end of file
......@@ -21,6 +21,7 @@ namespace Tsi1.Api
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
webBuilder.UseUrls("http://*:5000/");
});
}
}
......@@ -21,7 +21,7 @@
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger/index.html",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
......
......@@ -104,7 +104,7 @@ namespace Tsi1.Api
app.UseDeveloperExceptionPage();
}
app.UseHttpsRedirection();
// app.UseHttpsRedirection();
app.UseSwagger();
app.UseSwaggerUI(c =>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment