Added plugin loading. Added health check

This commit is contained in:
2026-02-13 09:24:14 +01:00
parent a4c59b23db
commit 956c1515f3
4 changed files with 26 additions and 2 deletions

6
Api.props Normal file
View File

@@ -0,0 +1,6 @@
<Project>
<ItemGroup>
<!-- Put your plugin references here -->
<!-- E.g. <PackageReference Include="MoonlightServers.Api" Version="2.1.0" /> -->
</ItemGroup>
</Project>

View File

@@ -28,7 +28,9 @@ RUN git clone -b $GIT_BRANCH --single-branch $GIT_REPOSITORY .
WORKDIR /src WORKDIR /src
RUN mkdir -p "/output" && echo -n $GIT_BRANCH > /output/version RUN mkdir -p "/output" && echo -n $GIT_BRANCH > /output/version
# TODO: Implement plugin loading here # Copy over plugin configuration
COPY Api.props /src/Hosts/Moonlight.Api.Host/
COPY Frontend.props /src/Hosts/Moonlight.Frontend.Host/
# Install npm packages # Install npm packages
WORKDIR /src/Hosts/Moonlight.Frontend.Host/Styles WORKDIR /src/Hosts/Moonlight.Frontend.Host/Styles
@@ -64,7 +66,7 @@ RUN dotnet publish --no-restore "./Moonlight.Frontend.Host.csproj" -c $BUILD_CON
# #
# Construct final docker image # Construct final docker image
# #
FROM cgr.dev/chainguard/aspnet-runtime:latest AS final FROM git.battlestati.one/moonlight-panel/app_base:moonlight AS final
WORKDIR /app WORKDIR /app
@@ -72,4 +74,6 @@ COPY --from=publish /output/publish-api .
COPY --from=publish /output/publish-frontend/wwwroot ./wwwroot COPY --from=publish /output/publish-frontend/wwwroot ./wwwroot
COPY --from=publish /output/version . COPY --from=publish /output/version .
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 CMD ["/usr/bin/curl", "-sf", "-o", "/dev/null", "http://localhost:8080/"]
ENTRYPOINT ["dotnet", "Moonlight.Api.Host.dll"] ENTRYPOINT ["dotnet", "Moonlight.Api.Host.dll"]

6
Frontend.props Normal file
View File

@@ -0,0 +1,6 @@
<Project>
<ItemGroup>
<!-- Put your plugin references here -->
<!-- E.g. <PackageReference Include="MoonlightServers.Frontend" Version="2.1.0" /> -->
</ItemGroup>
</Project>

View File

@@ -23,6 +23,13 @@
- moonlight - moonlight
ports: ports:
- "8080:8080" - "8080:8080"
# User
user: 0:0
# Persistent storage
volumes:
- ${DATA_PATH}/moonlight:/app/storage
# Env Settings # Env Settings
environment: environment:
@@ -75,6 +82,7 @@
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
start_period: 3s
helper: helper:
image: git.battlestati.one/moonlight-panel/container_helper image: git.battlestati.one/moonlight-panel/container_helper