Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.4.1 #184

Merged
merged 5 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic
Versioning v2.0.0](https://semver.org/spec/v2.0.0.html).

## [2.4.1] - 2023-07-06
### Fixed
- Restore old content URL on `/content` instead of new `/api/content`
- Fix the frontend content search procedure for the message archive
- Add the frontend content to the Docker image

## [2.4.0] - 2023-07-06
### Changed
- Runtime: upgrade to .NET 7
Expand Down Expand Up @@ -163,4 +169,5 @@ runtime 2.2.
[2.3.0]: https://github.com/codingteam/emulsion/compare/v2.2.0...v2.3.0
[2.3.1]: https://github.com/codingteam/emulsion/compare/v2.3.0...v2.3.1
[2.4.0]: https://github.com/codingteam/emulsion/compare/v2.3.1...v2.4.0
[Unreleased]: https://github.com/codingteam/emulsion/compare/v2.4.0...HEAD
[2.4.1]: https://github.com/codingteam/emulsion/compare/v2.4.0...v2.4.1
[Unreleased]: https://github.com/codingteam/emulsion/compare/v2.4.1...HEAD
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env

# Install Node.js 18
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY ./Emulsion/Emulsion.fsproj ./Emulsion/
Expand All @@ -13,6 +19,7 @@ COPY ./Emulsion.Web/Emulsion.Web.fsproj ./Emulsion.Web/
RUN dotnet restore Emulsion

COPY . ./
RUN dotnet build Emulsion.MessageArchive.Frontend # required to publish the frontend resources
RUN dotnet publish Emulsion -c Release -o /app/out

FROM mcr.microsoft.com/dotnet/aspnet:7.0
Expand Down
2 changes: 1 addition & 1 deletion Emulsion.Web/ContentController.fs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ open Emulsion.Settings
open Emulsion.Telegram

[<ApiController>]
[<Route("api/content")>]
[<Route("content")>]
type ContentController(logger: ILogger<ContentController>,
configuration: HostingSettings,
telegram: ITelegramClient,
Expand Down
6 changes: 5 additions & 1 deletion Emulsion.Web/WebServer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Emulsion.Web.WebServer

open System
open System.IO
open System.Reflection
open System.Threading.Tasks

open Microsoft.AspNetCore.Builder
Expand All @@ -23,7 +24,10 @@ let run (logger: ILogger)
: Task =
let builder = WebApplication.CreateBuilder(WebApplicationOptions())
if messageArchiveSettings.IsEnabled then
builder.Environment.WebRootPath <- Path.Combine(Path.GetDirectoryName Environment.ProcessPath, "wwwroot")
builder.Environment.WebRootPath <-
let assemblyPath = Assembly.GetEntryAssembly().Location
let appDirectory = Path.GetDirectoryName assemblyPath
Path.Combine(appDirectory, "wwwroot")
builder.Environment.WebRootFileProvider <- new PhysicalFileProvider(builder.Environment.WebRootPath)

builder.Host.UseSerilog(logger)
Expand Down
2 changes: 1 addition & 1 deletion Emulsion/Emulsion.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<Version>2.4.0</Version>
<Version>2.4.1</Version>
</PropertyGroup>
<ItemGroup>
<Compile Include="Logging.fs" />
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Copy `emulsion.example.json` to `emulsion.json` and set the settings. For some s
"totalCacheSizeLimitBytes": 20971520
},
"messageArchive": {
"isEnabled": true
"isEnabled": false
}
}
```
Expand Down
Loading