Skip to content

Commit

Permalink
Merge pull request #599 from SiaFoundation/pj/fix-default-api-address
Browse files Browse the repository at this point in the history
fix default api address
  • Loading branch information
ChrisSchinnerl authored Sep 12, 2023
2 parents 258a982 + 2ef60ad commit c041b8e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ LABEL maintainer="The Sia Foundation <[email protected]>" \
ENV PUID=0
ENV PGID=0

# Entrypoint env args
ARG BUILD_TAGS
ENV BUILD_TAGS=$BUILD_TAGS

# Renterd env args
ENV RENTERD_API_PASSWORD=
ENV RENTERD_SEED=
Expand All @@ -48,4 +52,7 @@ VOLUME [ "/data" ]

USER ${PUID}:${PGID}

ENTRYPOINT [ "renterd", "-dir", "./data"]
# Copy the script and set it as the entrypoint.
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh", "-dir", "./data"]
7 changes: 7 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [[ "$BUILD_TAGS" == *'testnet'* ]]; then
exec renterd -http=':9880' "$@"
else
exec renterd -http=':9980' "$@"
fi

0 comments on commit c041b8e

Please sign in to comment.