feat: add fnOS packaging, storage workflows and release pipeline

This commit is contained in:
2026-08-11 18:05:49 +08:00
parent c5922f9b08
commit 95932f0199
181 changed files with 24024 additions and 1164 deletions
+32 -18
View File
@@ -1,21 +1,35 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
ARG NODE_IMAGE=node:20-bookworm-slim
ARG DOTNET_SDK_IMAGE=mcr.microsoft.com/dotnet/sdk:6.0
ARG DOTNET_RUNTIME_IMAGE=mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
FROM ${NODE_IMAGE} AS frontend-build
WORKDIR /src/app
COPY app/package.json app/package-lock.json ./
RUN npm ci
COPY app/ ./
RUN npm run build
FROM ${DOTNET_SDK_IMAGE} AS publish
WORKDIR /src
COPY dy.net.csproj dy.net.sln ./
COPY lib/ ./lib/
RUN dotnet restore dy.net.csproj --disable-parallel
COPY . ./
COPY --from=frontend-build /src/app/dist/ ./app/dist/
RUN dotnet publish dy.net.csproj -c Release --no-restore \
-p:DebugType=None -p:DebugSymbols=false -o /out /maxcpucount:1
FROM ${DOTNET_RUNTIME_IMAGE}
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=publish /out/ ./
ENV ASPNETCORE_URLS=http://0.0.0.0:10101 \
DYSYNC_LISTEN_URL=http://0.0.0.0:10101 \
TZ=Asia/Shanghai
VOLUME ["/data"]
EXPOSE 10101
RUN echo "deb http://mirrors.aliyun.com/debian/ bookworm main non-free contrib" > /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian-security/ bookworm-security main" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian/ bookworm-backports main non-free contrib" >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends ffmpeg && \
rm -rf /var/lib/apt/lists/*
RUN ffmpeg -version
COPY . .
ENV ASPNETCORE_URLS=http://*:10101
ENV TZ=Asia/Shanghai
ENTRYPOINT ["dotnet", "dy.net.dll"]
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD curl -fsS http://127.0.0.1:10101/ >/dev/null || exit 1
ENTRYPOINT ["dotnet", "dy.net.dll", "/data"]