From cb1fbd8a1276eb2a94139e7d32e583acafcb51e3 Mon Sep 17 00:00:00 2001 From: 616 <32841294+Dofamin@users.noreply.github.com> Date: Tue, 7 Sep 2021 22:29:47 +0300 Subject: [PATCH] Create dockerfile-ubuntu --- dockerfile-ubuntu | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 dockerfile-ubuntu diff --git a/dockerfile-ubuntu b/dockerfile-ubuntu new file mode 100644 index 000000000..c69fd13a3 --- /dev/null +++ b/dockerfile-ubuntu @@ -0,0 +1,34 @@ +# OS +FROM ubuntu:latest +# Set version label +LABEL maintainer="github.com/Dofamin" +LABEL image="Uptime Kuma" +LABEL OS="Ubuntu/latest" +# ARG & ENV +WORKDIR /srv/uptime-kuma/ +ENV TZ=Europe/Moscow +# Update system packages: +RUN apt -y update > /dev/null 2>&1;\ +# Fix for select tzdata region + ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone > /dev/null 2>&1;\ + dpkg-reconfigure --frontend noninteractive tzdata > /dev/null 2>&1;\ +# Install dependencies, you would need common set of tools. + apt -y install git curl git npm > /dev/null 2>&1;\ + curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - > /dev/null 2>&1;\ + apt -y install nodejs > /dev/null 2>&1;\ + npm install pm2@latest -g > /dev/null 2>&1;\ + pm2 startup > /dev/null 2>&1;\ +# # Clone the repo: + git clone https://github.com/louislam/uptime-kuma.git git > /dev/null 2>&1; \ + mv git/* . > /dev/null 2>&1; +# # Start installer +RUN npm run setup > /dev/null 2>&1;\ + npm install --legacy-peer-deps && node node_modules/esbuild/install.js && npm run build && npm prune > /dev/null 2>&1 +# Volume +VOLUME [ "/srv/uptime-kuma/data" ] +# HEALTHCHECK +HEALTHCHECK --interval=60s --timeout=30s --start-period=300s CMD node extra/healthcheck.js +# Expose Ports: +EXPOSE 3001 +# CMD +CMD ["/usr/bin/node", "server/server.js"]