mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 00:26:07 +02:00
feat: add Docker support for EchoHub.Server with Dockerfile and docker-compose.yml
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
services:
|
||||||
|
echohub-server:
|
||||||
|
build:
|
||||||
|
context: ./src
|
||||||
|
dockerfile: EchoHub.Server/Dockerfile
|
||||||
|
# image: ghcr.io/huebyte/echohub-server:latest # use this instead of build for pre-built images
|
||||||
|
container_name: echohub-server
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "5000:5000"
|
||||||
|
# - "6667:6667" # IRC gateway (enable Irc__Enabled=true first)
|
||||||
|
# - "6697:6697" # IRC TLS
|
||||||
|
volumes:
|
||||||
|
- echohub-data:/app/data
|
||||||
|
environment:
|
||||||
|
- Server__Name=My EchoHub Server
|
||||||
|
- Server__Description=A self-hosted EchoHub chat server
|
||||||
|
# - Server__PublicServer=true
|
||||||
|
# - Server__PublicHost=echohub.example.com
|
||||||
|
# - Irc__Enabled=true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
echohub-data:
|
||||||
@@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
- Fix user list empty on initial connect — `FetchAndUpdateOnlineUsers` was called before `InvokeUI` set the current channel, causing an early return
|
- Fix user list empty on initial connect — `FetchAndUpdateOnlineUsers` was called before `InvokeUI` set the current channel, causing an early return
|
||||||
|
|
||||||
|
## New Features
|
||||||
|
|
||||||
|
- Add Docker support for EchoHub.Server — `docker compose up -d` for easy self-hosting with persistent volume for database, uploads, and logs
|
||||||
|
|
||||||
## Infrastructure
|
## Infrastructure
|
||||||
|
|
||||||
- Switch Terminal.Gui from local fork submodule back to NuGet package (`2.0.0-develop.5039`) — transparent color PR merged upstream
|
- Switch Terminal.Gui from local fork submodule back to NuGet package (`2.0.0-develop.5039`) — transparent color PR merged upstream
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
bin/
|
||||||
|
obj/
|
||||||
|
.vs/
|
||||||
|
*.user
|
||||||
|
*.suo
|
||||||
|
*.DotSettings.user
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
# Copy project files first for layer caching
|
||||||
|
COPY EchoHub.Core/EchoHub.Core.csproj EchoHub.Core/
|
||||||
|
COPY EchoHub.Server.Irc/EchoHub.Server.Irc.csproj EchoHub.Server.Irc/
|
||||||
|
COPY EchoHub.Server/EchoHub.Server.csproj EchoHub.Server/
|
||||||
|
COPY Directory.Build.props .
|
||||||
|
RUN dotnet restore EchoHub.Server/EchoHub.Server.csproj
|
||||||
|
|
||||||
|
# Copy everything and publish
|
||||||
|
COPY EchoHub.Core/ EchoHub.Core/
|
||||||
|
COPY EchoHub.Server.Irc/ EchoHub.Server.Irc/
|
||||||
|
COPY EchoHub.Server/ EchoHub.Server/
|
||||||
|
RUN dotnet publish EchoHub.Server/EchoHub.Server.csproj -c Release -o /app/publish --no-restore
|
||||||
|
|
||||||
|
# Runtime
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN groupadd -r echohub && useradd -r -g echohub -d /app echohub \
|
||||||
|
&& mkdir -p /app/data \
|
||||||
|
&& chown -R echohub:echohub /app
|
||||||
|
|
||||||
|
COPY --from=build --chown=echohub:echohub /app/publish .
|
||||||
|
|
||||||
|
USER echohub
|
||||||
|
|
||||||
|
ENV ASPNETCORE_ENVIRONMENT=Production \
|
||||||
|
Urls=http://0.0.0.0:5000 \
|
||||||
|
ConnectionStrings__DefaultConnection="Data Source=/app/data/echohub.db" \
|
||||||
|
Storage__Path=/app/data/uploads \
|
||||||
|
Serilog__WriteTo__1__Args__path=/app/data/logs/echohub-server-.log
|
||||||
|
|
||||||
|
EXPOSE 5000 6667 6697
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "EchoHub.Server.dll"]
|
||||||
Reference in New Issue
Block a user