add uptime kuma image
This commit is contained in:
46
apps/uptimekuma/Dockerfile
Normal file
46
apps/uptimekuma/Dockerfile
Normal file
@@ -0,0 +1,46 @@
|
||||
FROM --platform=$TARGETOS/$TARGETARCH node:18-alpine
|
||||
|
||||
LABEL author="Torsten Widmann" maintainer="info@goover.de"
|
||||
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
RUN apk update \
|
||||
&& apk upgrade
|
||||
|
||||
RUN apk add --no-cache \
|
||||
autoconf \
|
||||
automake \
|
||||
build-base \
|
||||
ca-certificates\
|
||||
curl \
|
||||
bind-tools \
|
||||
ffmpeg \
|
||||
g++ \
|
||||
git \
|
||||
gpg \
|
||||
gnupg \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
libtool \
|
||||
python3 \
|
||||
python3-dev \
|
||||
sqlite \
|
||||
tzdata \
|
||||
zip \
|
||||
libc6-compat
|
||||
|
||||
# updating npm
|
||||
RUN npm install npm@latest -g
|
||||
|
||||
# add cloudflare repo
|
||||
RUN curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/bin/cloudflared \
|
||||
&& chmod+x /usr/bin/cloudflared
|
||||
|
||||
## Setup user and working directory
|
||||
RUN adduser -D -h /home/container container -s /bin/bash container
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container
|
||||
WORKDIR /home/container
|
||||
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
CMD ["/bin/ash", "/entrypoint.sh"]
|
38
apps/uptimekuma/entrypoint.sh
Normal file
38
apps/uptimekuma/entrypoint.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/ash
|
||||
#System variables
|
||||
clear
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
# Switch to the container's working directory
|
||||
cd /home/container || exit 1
|
||||
|
||||
# Wait for the container to fully initialize
|
||||
sleep 1
|
||||
|
||||
# Default the TZ environment variable to UTC.
|
||||
TZ=${TZ:-UTC}
|
||||
export TZ
|
||||
|
||||
# Set environment variable that holds the Internal Docker IP
|
||||
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
|
||||
export INTERNAL_IP
|
||||
|
||||
# system informations
|
||||
echo -e "${BLUE}-------------------------------------------------${NC}"
|
||||
echo -e "${RED}Uptime Kuma Image${NC}"
|
||||
echo -e "${BLUE}-------------------------------------------------${NC}"
|
||||
echo -e "${YELLOW}Running on Alpine: ${RED} $(cat /etc/alpine-release)${NC}"
|
||||
echo -e "${YELLOW}Current timezone: ${RED} $(cat /etc/localtime)${NC}"
|
||||
echo -e "${YELLOW}NodeJS Version: ${RED} $(node -v) ${NC}"
|
||||
echo -e "${BLUE}-------------------------------------------------${NC}"
|
||||
|
||||
# Replace Startup Variables
|
||||
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||
echo ":/home/container$ ${MODIFIED_STARTUP}"
|
||||
|
||||
# Run the Server
|
||||
eval ${MODIFIED_STARTUP}
|
Reference in New Issue
Block a user