Add restart policy. Use ASPNETCORE port variable.

This commit is contained in:
Jared Goodwin 2024-02-21 14:14:23 -08:00
parent 3354e9bfce
commit 417792a7c1
3 changed files with 3 additions and 10 deletions

View File

@ -3,15 +3,11 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0
EXPOSE ${ASPNETCORE_HTTP_PORTS}
RUN apt -y update && apt -y install curl
RUN mkdir -p /app/AppData
RUN chown app:app -R /app/AppData
COPY Server/bin/publish /app
WORKDIR /app
USER app
ENTRYPOINT ["dotnet", "Remotely_Server.dll"]
HEALTHCHECK --interval=5m --timeout=3s \
CMD curl -f http://localhost:5000/api/healthcheck || exit 1
CMD curl -f http://localhost:${ASPNETCORE_HTTP_PORTS}/api/healthcheck || exit 1

View File

@ -3,15 +3,11 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0
EXPOSE ${ASPNETCORE_HTTP_PORTS}
RUN apt -y update && apt -y install curl
RUN mkdir -p /app/AppData
RUN chown app:app -R /app/AppData
COPY /_immense.Remotely/Server/linux-x64/Server /app
WORKDIR /app
USER app
ENTRYPOINT ["dotnet", "Remotely_Server.dll"]
HEALTHCHECK --interval=5m --timeout=3s \
CMD curl -f http://localhost:5000/api/healthcheck || exit 1
CMD curl -f http://localhost:${ASPNETCORE_HTTP_PORTS}/api/healthcheck || exit 1

View File

@ -5,6 +5,7 @@ services:
image: immybot/remotely:latest
volumes:
- /var/www/remotely:/app/AppData
restart: unless-stopped
ports:
- "5000:5000"
environment: