-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
23 lines (21 loc) · 834 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM node:current-alpine as react-builder
COPY ./ui /ui
WORKDIR /ui
RUN corepack yarn && \
corepack yarn build
FROM mcr.microsoft.com/dotnet/sdk:9.0 as aspnet-builder
COPY ./backend /backend
WORKDIR /backend
RUN dotnet restore && \
dotnet publish PlexSSO.sln -c Release -o build /p:CopyOutputSymbolsToPublishDirectory=false /p:DebugType=None /p:DebugSymbols=false && \
rm build/ui/index.html
COPY --from=react-builder /ui/build /backend/build/ui
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
WORKDIR /app
COPY --from=aspnet-builder /backend/build /app
RUN mkdir -p /config && \
chmod 777 /config
ENTRYPOINT ["dotnet", "PlexSSO.dll", "--config", "/config/"]
EXPOSE 4200
VOLUME [ "/config" ]
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "dotnet", "PlexSSO.dll", "--healthcheck" ]