Skip to content

Commit 49bcd0c

Browse files
committed
Updating Dockerfile to support auth
1 parent b29aabd commit 49bcd0c

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ EXPOSE 4141
2020
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
2121
CMD wget --spider -q http://localhost:4141/ || exit 1
2222

23-
ARG GH_TOKEN
24-
ENV GH_TOKEN=$GH_TOKEN
25-
26-
ENTRYPOINT ["bun", "run", "dist/main.js"]
27-
CMD ["start", "-g", "$GH_TOKEN"]
23+
COPY entrypoint.sh /entrypoint.sh
24+
RUN chmod +x /entrypoint.sh
25+
ENTRYPOINT ["/entrypoint.sh"]

entrypoint.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
if [ "$1" = "--auth" ]; then
3+
# Run auth command
4+
exec bun run dist/main.js auth
5+
else
6+
# Default command
7+
exec bun run dist/main.js start -g "$GH_TOKEN" "$@"
8+
fi
9+

0 commit comments

Comments
 (0)