Self hosted FLOSS fitness/workout, nutrition and weight tracker
Remove the original unraid files
Roland Geider9495f7989c57
diff --git a/extras/docker/unraid/Dockerfile b/extras/docker/unraid/Dockerfiledeleted file mode 100644index 3f599ab97..000000000--- a/extras/docker/unraid/Dockerfile+++ /dev/null@@ -1,59 +0,0 @@-#-# Docker image for wger development-#-# Please consult the README for usage-#-# Note: you MUST build this image from the projec's root!-# docker build -f extras/docker/development/Dockerfile --tag wger/devel .-#-# Run the container:-# docker run -ti -v /path/to/this/checkout:/home/wger/src --name wger.devel --publish 8000:8000 wger/devel--##########-# Builder-##########-FROM ubuntu:20.04 as builder--RUN apt-get update \- && apt-get install --no-install-recommends -y \- build-essential \- python3-dev \- python3-pip \- python3-wheel \- git \- && rm -rf /var/lib/apt/lists/*--# Build the necessary python wheels-COPY requirements* ./-RUN pip3 wheel --no-cache-dir --wheel-dir /wheels -r requirements_prod.txt----########-# Final-########-FROM wger/base:2.0-dev-LABEL maintainer="Roland Geider <[email protected]>"-ARG DOCKER_DIR=./extras/docker/unraid-EXPOSE 8000---# Set up the application-WORKDIR /home/wger/src-COPY --chown=wger:wger . /home/wger/src-COPY --from=builder /wheels /wheels-COPY ${DOCKER_DIR}/settings.py /home/wger/src-COPY ${DOCKER_DIR}/settings.py /tmp/-COPY ${DOCKER_DIR}/entrypoint.sh /home/wger/entrypoint.sh-RUN chmod +x /home/wger/entrypoint.sh-RUN pip3 install --no-cache /wheels/* \- && python3 setup.py develop--RUN chown -R wger:wger .--USER wger-RUN mkdir ~/media \- && mkdir ~/static \- && mkdir ~/db/--CMD ["/home/wger/entrypoint.sh"]diff --git a/extras/docker/unraid/entrypoint.sh b/extras/docker/unraid/entrypoint.shdeleted file mode 100644index 58a9202ee..000000000--- a/extras/docker/unraid/entrypoint.sh+++ /dev/null@@ -1,36 +0,0 @@-#!/bin/bash--# Copy a settings file if nothing's found (e.g. when mounting a fresh checkout)-if [ ! -f /home/wger/src/settings.py ]; then- cp /tmp/settings.py /home/wger/src-fi--# If using docker compose, wait for postgres-if [[ "$DJANGO_DB_PORT" == "5432" ]]; then- echo "Waiting for postgres..."-- while ! nc -z $DJANGO_DB_HOST $DJANGO_DB_PORT; do- sleep 0.1- done-- echo "PostgreSQL started :)"-fi--# Bootstrap the application-wger bootstrap--if [[ "$WGER_DOWNLOAD_IMGS" == "TRUE" ]];-then- wger download-exercise-images- chmod -R g+w ~wger/media-fi--# Run the server-if [ -z "$WGER_USE_GUNICORN" ]-then- python3 manage.py runserver 0.0.0.0:8000-else- gunicorn wger.wsgi:application --reload --bind 0.0.0.0:8000-fi--diff --git a/extras/docker/unraid/settings.py b/extras/docker/unraid/settings.pydeleted file mode 100644index 343d31c27..000000000--- a/extras/docker/unraid/settings.py+++ /dev/null@@ -1,103 +0,0 @@-#!/usr/bin/env python-# -*- coding: utf-8 -*---# wger-from wger.settings_global import *---# Use 'DEBUG = True' to get more details for server errors-DEBUG = os.environ.get("DJANGO_DEBUG", True)--ADMINS = (- ('Your name', '[email protected]'),-)-MANAGERS = ADMINS--if os.environ.get("DJANGO_DB_ENGINE"):- DATABASES = {- 'default': {- 'ENGINE': os.environ.get("DJANGO_DB_ENGINE"),- 'NAME': os.environ.get("DJANGO_DB_DATABASE"),- 'USER': os.environ.get("DJANGO_DB_USER"),- 'PASSWORD': os.environ.get("DJANGO_DB_PASSWORD"),- 'HOST': os.environ.get("DJANGO_DB_HOST"),- 'PORT': os.environ.get("DJANGO_DB_PORT"),- }- }-else:- DATABASES = {- 'default': {- 'ENGINE': 'django.db.backends.sqlite3',- 'NAME': '/home/wger/db/database.sqlite',- }- }--# Timezone for this installation. Consult settings_global.py for more information-TIME_ZONE = os.environ.get("TIME_ZONE" , 'Europe/Berlin')--# Make this unique, and don't share it with anybody.-SECRET_KEY = os.environ.get("SECRET_KEY")---# Your reCaptcha keys-RECAPTCHA_PUBLIC_KEY = os.environ.get('RECAPTCHA_PUBLIC_KEY')-RECAPTCHA_PRIVATE_KEY = os.environ.get('RECAPTCHA_PRIVATE_KEY')-NOCAPTCHA = os.environ.get('NOCAPTCHA')--# The site's URL (e.g. http://www.my-local-gym.com or http://localhost:8000)-# This is needed for uploaded files and images (exercise images, etc.) to be-# properly served.-SITE_URL = os.environ.get('SITE_URL', 'http://localhost:8000')--# Path to uploaded files-# Absolute filesystem path to the directory that will hold user-uploaded files.-MEDIA_ROOT = os.environ.get("DJANGO_MEDIA_ROOT", '/home/wger/media')-MEDIA_URL = '/media/'--STATIC_ROOT = os.environ.get("DJANGO_STATIC_ROOT", '/home/wger/static')--# Allow all hosts to access the application. Change if used in production.-ALLOWED_HOSTS = '*'--SESSION_ENGINE = "django.contrib.sessions.backends.cache"--# Configure a real backend in production-if DEBUG:- EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'-if os.environ.get("ENABLE_EMAIL"):- EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'- EMAIL_HOST = os.environ.get("EMAIL_HOST")- EMAIL_PORT = os.environ.get("EMAIL_PORT")- EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER")- EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD")- EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS")- EMAIL_USE_SSL = os.environ.get("EMAIL_USE_SSL")- EMAIL_TIMEOUT = 60---# Sender address used for sent emails-WGER_SETTINGS['EMAIL_FROM'] = f'wger Workout Manager <{os.environ.get("FROM_EMAIL")}>'--# Management-if os.environ.get("ALLOW_REGISTRATION") == 'False':- WGER_SETTINGS["ALLOW_REGISTRATION"] = False-else:- WGER_SETTINGS["ALLOW_REGISTRATION"] = True--if os.environ.get("ALLOW_GUEST_USERS") == 'False':- WGER_SETTINGS["ALLOW_GUEST_USERS"] = False-else:- WGER_SETTINGS["ALLOW_GUEST_USERS"] = True--# Cache-if os.environ.get("DJANGO_CACHE_BACKEND"):- CACHES = {- 'default': {- 'BACKEND': os.environ.get("DJANGO_CACHE_BACKEND"),- 'LOCATION': os.environ.get("DJANGO_CACHE_LOCATION"),- 'TIMEOUT': os.environ.get("DJANGO_CACHE_TIMEOUT"),- 'OPTIONS': {- 'CLIENT_CLASS': os.environ.get("DJANGO_CACHE_CLIENT_CLASS"),- }- }- }