Skip to content

Commit

Permalink
Add restart policy. Use ASPNETCORE port variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Feb 21, 2024
1 parent 3354e9b commit 417792a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
6 changes: 1 addition & 5 deletions Server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 1 addition & 5 deletions Server/Dockerfile.pipelines
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
image: immybot/remotely:latest
volumes:
- /var/www/remotely:/app/AppData
restart: unless-stopped
ports:
- "5000:5000"
environment:
Expand Down

0 comments on commit 417792a

Please sign in to comment.