From a468eb54759dcf7c89a8f540d8227bfa57a8663e Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Tue, 14 Nov 2023 23:40:27 +0100 Subject: [PATCH] initial commit --- .drone.yml | 0 Dockerfile | 27 +++++++++++++++++++++++++++ README.md | 5 +++++ start.sh | 10 ++++++++++ 4 files changed, 42 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 start.sh diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d3ae191 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM python:3.13-rc-slim-bullseye + +RUN apt update -qq && apt install -qq -y python3 python3-pip sqlite3 git unzip libmagickwand-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* + +ARG PUID=1000 +ENV GROUP dockergroup +ENV USER docker +ENV HOMEDIR "/home/${USER}" +ENV PATH ${HOMEDIR}/.local/bin:$PATH +RUN useradd -u "${PUID}" -m "${USER}" + +WORKDIR ${HOMEDIR} + +RUN git clone https://github.com/DarkflameUniverse/NexusDashboard.git +WORKDIR ${HOMEDIR}/NexusDashboard + +RUN pip install -r requirements.txt +RUN pip install gunicorn + +COPY ./start.sh . + +RUN chown -R 1000:1000 . +RUN chmod +x start.sh + +USER ${USER} + +ENTRYPOINT [ "/home/docker/start.sh" ] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..8020f93 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +[![Build Status](https://drone.ar21.de/api/badges/aaron/nexus/status.svg)](https://drone.ar21.de/aaron/nexus) + +Docker deployment for [DarkflameUniverse/NexusDashboard](https://github.com/DarkflameUniverse/NexusDashboard) + +Is available at: https://nexus.ar21.de diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..e5b94bb --- /dev/null +++ b/start.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "---------------" +echo "Nexus Dashboard" +echo "by Aaron Riedel" +echo "---------------" + +# check if necessary variables are set +[[ -z "${APP_SECRET_KEY}" ]] && echo "APP_SECRET_KEY not set" && exit 1 +[[ -z "${APP_DATABASE_URI}" ]] && echo "APP_DATABASE_URI not set" && exit 1