26 lines
920 B
Docker
26 lines
920 B
Docker
# JJServiceManagerRelay 서버 이미지 (NAS에서 직접 빌드)
|
|
# 빌드: sudo docker-compose build
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
WORKDIR /src
|
|
COPY server/JJServiceManagerRelay.Server.csproj server/
|
|
RUN dotnet restore server/JJServiceManagerRelay.Server.csproj
|
|
COPY server/ server/
|
|
RUN dotnet publish server/JJServiceManagerRelay.Server.csproj -c Release -o /out --no-restore /p:UseAppHost=false
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
|
ENV TZ=Asia/Seoul \
|
|
DOTNET_gcServer=0 \
|
|
JJSM_PORT=21900 \
|
|
ASPNETCORE_HTTP_PORTS= \
|
|
JJSM_LOG_DIR=/app/logs
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends tzdata curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /app
|
|
COPY --from=build /out/ ./
|
|
EXPOSE 21900
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
|
|
CMD curl -fsS http://localhost:21900/health || exit 1
|
|
ENTRYPOINT ["dotnet", "jjsm-server.dll"]
|