Skip to content

Commit

Permalink
Merge pull request #135 from PassiveLemon/Graceful-Shutdown
Browse files Browse the repository at this point in the history
Fix: Graceful container shutdown
  • Loading branch information
tobychui authored Apr 29, 2024
2 parents 73276b1 + 43a84a3 commit d00117e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 4 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ RUN mkdir -p /opt/zoraxy/source/ &&\
mkdir -p /opt/zoraxy/config/ &&\
mkdir -p /usr/local/bin/

COPY entrypoint.sh /opt/zoraxy/

RUN chmod -R 755 /opt/zoraxy/ &&\
chmod +x /opt/zoraxy/entrypoint.sh
RUN chmod -R 770 /opt/zoraxy/

VOLUME [ "/opt/zoraxy/config/" ]

Expand All @@ -24,15 +21,15 @@ RUN go mod tidy &&\
go build -o /usr/local/bin/zoraxy &&\
rm -r /opt/zoraxy/source/

RUN chmod +x /usr/local/bin/zoraxy
RUN chmod 755 /usr/local/bin/zoraxy &&\
chmod +x /usr/local/bin/zoraxy

WORKDIR /opt/zoraxy/config/

ENV VERSION=$VERSION

ENV ARGS="-noauth=false"

ENTRYPOINT ["/opt/zoraxy/entrypoint.sh"]
ENTRYPOINT "zoraxy" "-port=:8000" "${ARGS}"

HEALTHCHECK --interval=5s --timeout=5s --retries=2 CMD nc -vz 127.0.0.1 8000 || exit 1

4 changes: 0 additions & 4 deletions docker/entrypoint.sh

This file was deleted.

0 comments on commit d00117e

Please sign in to comment.