Add port and change docker file
This commit is contained in:
parent
c704a21787
commit
f6f37654a1
@ -100,15 +100,13 @@ let configureLogging (builder : ILoggingBuilder) =
|
|||||||
|
|
||||||
[<EntryPoint>]
|
[<EntryPoint>]
|
||||||
let main args =
|
let main args =
|
||||||
let contentRoot = Directory.GetCurrentDirectory()
|
|
||||||
let webRoot = Path.Combine(contentRoot, "WebRoot")
|
|
||||||
Host.CreateDefaultBuilder(args)
|
Host.CreateDefaultBuilder(args)
|
||||||
.ConfigureWebHostDefaults(
|
.ConfigureWebHostDefaults(
|
||||||
fun webHostBuilder ->
|
fun webHostBuilder ->
|
||||||
webHostBuilder
|
webHostBuilder
|
||||||
.UseContentRoot(contentRoot)
|
.ConfigureKestrel(fun opt ->
|
||||||
.UseWebRoot(webRoot)
|
opt.AddServerHeader <- false
|
||||||
.ConfigureKestrel(fun opt -> opt.AddServerHeader <- false)
|
opt.ListenLocalhost(3333, (fun o -> o.UseHttps() |> ignore)))
|
||||||
.Configure(Action<IApplicationBuilder> configureApp)
|
.Configure(Action<IApplicationBuilder> configureApp)
|
||||||
.ConfigureServices(configureServices)
|
.ConfigureServices(configureServices)
|
||||||
.ConfigureLogging(configureLogging)
|
.ConfigureLogging(configureLogging)
|
||||||
|
@ -12,12 +12,12 @@ RUN dotnet restore "Bot/Bot.fsproj"
|
|||||||
|
|
||||||
WORKDIR "/src/Bot"
|
WORKDIR "/src/Bot"
|
||||||
|
|
||||||
RUN dotnet build "Bot.fsproj" -c Release -o /app/build
|
RUN dotnet build "CurrencyAPI.fsproj" -c Release -o /app/build
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
RUN dotnet publish "Bot.fsproj" -c Release -o /app/publish
|
RUN dotnet publish "CurrencyAPI.fsproj" -c Release -o /app/publish
|
||||||
|
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
ENTRYPOINT "./Bot"
|
ENTRYPOINT "./CurrencyAPI.App"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user