mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
Compare commits
4 commits
4639aa3bf3
...
e5934d5aed
Author | SHA1 | Date | |
---|---|---|---|
|
e5934d5aed | ||
|
d2f71d11d6 | ||
|
4367476ace | ||
|
d0c9d65586 |
3 changed files with 17 additions and 4 deletions
|
@ -27,7 +27,7 @@ RUN mkdir ./data
|
|||
# ⭐ Main Image
|
||||
############################################
|
||||
FROM $BASE_IMAGE AS release
|
||||
USER node
|
||||
COPY ./docker/scripts/init.sh /usr/bin/init.sh
|
||||
WORKDIR /app
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/louislam/uptime-kuma"
|
||||
|
@ -40,7 +40,7 @@ COPY --chown=node:node --from=build /app /app
|
|||
EXPOSE 3001
|
||||
HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=5 CMD extra/healthcheck
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
CMD ["node", "server/server.js"]
|
||||
CMD ["/usr/bin/init.sh"]
|
||||
|
||||
############################################
|
||||
# Rootless Image
|
||||
|
|
12
docker/scripts/init.sh
Executable file
12
docker/scripts/init.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
PUID=${PUID:-1000}
|
||||
PGID=${PGID:-1000}
|
||||
|
||||
groupmod -o -g "$PGID" node
|
||||
usermod -o -u "$PUID" node
|
||||
|
||||
echo "node has uid: $(id -u node) and gid: $(id -g node)"
|
||||
echo "dropping to node user"
|
||||
|
||||
exec sudo -u node node server/server.js
|
|
@ -12,8 +12,9 @@ class ServerChan extends NotificationProvider {
|
|||
const okMsg = "Sent Successfully.";
|
||||
|
||||
// serverchan3 requires sending via ft07.com
|
||||
const url = String(notification.serverChanSendKey).startsWith("sctp")
|
||||
? `https://${notification.serverChanSendKey}.push.ft07.com/send`
|
||||
const matchResult = String(notification.serverChanSendKey).match(/^sctp(\d+)t/i);
|
||||
const url = matchResult && matchResult[1]
|
||||
? `https://${matchResult[1]}.push.ft07.com/send/${notification.serverChanSendKey}.send`
|
||||
: `https://sctapi.ftqq.com/${notification.serverChanSendKey}.send`;
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue