diff --git a/bitpoll/Dockerfile b/bitpoll/Dockerfile deleted file mode 100755 index 0c485ef..0000000 --- a/bitpoll/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -#sentry-cli releases -o sentry-internal new -p bitpoll $VERSION -FROM debian:buster - -ENV UID=2008 - -RUN usermod -u $UID -g nogroup -d /opt/bitpoll www-data -RUN apt update -RUN apt-get -y --no-install-recommends install g++ wget uwsgi uwsgi-plugin-python3 python3 python-virtualenv python3-pip virtualenv make git python3-psycopg2 python3-ldap3 gettext gcc python3-dev libldap2-dev gpg gpg-agent curl libsasl2-dev npm - -RUN npm install cssmin uglify-js -g - -ADD https://github.com/fsinfuhh/Bitpoll/archive/master.tar.gz /opt/bitpoll.tar.gz -RUN tar -xzC /opt -f /opt/bitpoll.tar.gz -RUN mv /opt/Bitpoll-master /opt/bitpoll - -WORKDIR /opt/bitpoll - -RUN pip3 install -U pip setuptools wheel -RUN pip3 install -r requirements-production.txt -RUN ln -sf /opt/static/ /opt/bitpoll/_static -RUN cp bitpoll/settings_local.sample.py bitpoll/settings_local.py -RUN python3 manage.py compilemessages -RUN chown $UID -R _static -RUN chmod o+r -R . -RUN rm bitpoll/settings_local.py - -RUN ln -sf /opt/config/settings.py /opt/bitpoll/bitpoll/settings_local.py -RUN ln -sf /opt/storage/media /opt/bitpoll/_media - -ARG RELEASE_VERSION=2019.12.05 -RUN echo $RELEASE_VERSION > /opt/bitpoll/.releaseversion - -ENV LANG=C.UTF-8 -COPY run /usr/local/bin -COPY uwsgi-bitpoll.ini /etc/uwsgi/bitpoll.ini -EXPOSE 3008/tcp -VOLUME /opt/static -VOLUME /opt/config -VOLUME /opt/log - -ENTRYPOINT /usr/local/bin/run diff --git a/bitpoll/README.md b/bitpoll/README.md deleted file mode 100644 index 69bae25..0000000 --- a/bitpoll/README.md +++ /dev/null @@ -1,24 +0,0 @@ -% Mafiasi-Dashboard - -UID: 2008 - -Ports: -- uwsgi 3008 - -Mountpoints: -- config -- storage -- log - - -Initial steps: -```sh -mkdir -p /opt/config/dudel2 /var/log/dudel2 /srv/dudel2 -cp $CONFIG_DIR/settings.py /opt/config/dudel2/settings.py -chown 2008:nogroup /opt/config/dudel2 /opt/config/dudel2/settings.py /var/log/dudel2 /srv/dudel2 -``` - -How to run: -```sh -rkt run --port=uwsgi:3008 --volume storage,kind=host,source=/srv/dudel2 --volume config,kind=host,source=/opt/config/dudel2 --volume log,kind=host,source=/var/log/dudel2 --dns=134.100.9.61 rkt.mafiasi.de/dudel2 -``` diff --git a/bitpoll/config/settings.py b/bitpoll/config/settings.py deleted file mode 100644 index af60c16..0000000 --- a/bitpoll/config/settings.py +++ /dev/null @@ -1,204 +0,0 @@ -""" -Django settings for dudel project. - -Generated by 'django-admin startproject' using Django 1.9. - -For more information on this file, see -https://docs.djangoproject.com/en/1.9/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/1.9/ref/settings/ -""" - -import os - -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -from django.contrib import messages - -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '0qv9^l2ujm*2g(iyp!h4h0neq@34-9q^y90!#rp!lwo7yz+&0u' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = ['*'] - -TEMPLATE_ALLOWABLE_SETTINGS_VALUES = [ - 'ALLOW_CUSTOM_SLUGS', - 'SITE_NAME', - 'DEBUG', - 'DEFAULT_RANDOM_SLUG', - 'BASE_URL', - 'HOME_URL', - 'IMPRINT_TEXT', - 'IMPRINT_URL', - 'ABOUT_TEXT', - 'ABOUT_URL', - 'TIME_ZONE', - 'REGISTER_ENABLED', -] - -LOGIN_REDIRECT_URL = "/" - -SITE_NAME = 'Dudel' -BASE_URL = 'https://dudel.mafiasi.de' - -# Application definition - -INSTALLED_APPS = [ - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'django_markdown', - 'widget_tweaks', - 'static_precompiler', - 'datetimewidget', - 'dudel.poll', - 'dudel.base', - 'dudel.invitations', - 'dudel.registration', - 'django.contrib.admin', -] - -MIDDLEWARE_CLASSES = [ - 'django.middleware.security.SecurityMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'django.middleware.locale.LocaleMiddleware', -] - -STATICFILES_FINDERS = [ - 'django.contrib.staticfiles.finders.FileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - 'static_precompiler.finders.StaticPrecompilerFinder', -] - -ROOT_URLCONF = 'dudel.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [os.path.join(BASE_DIR, 'templates')] - , - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], - }, - }, -] - -WSGI_APPLICATION = 'dudel.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/1.9/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - } -} - - -# Password validation -# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [ - { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', - }, -] - -# User Model - -AUTH_USER_MODEL = 'base.DudelUser' - -# Internationalization -# https://docs.djangoproject.com/en/1.9/topics/i18n/ - -LANGUAGE_CODE = 'en-us' - -TIME_ZONE = 'UTC' - -USE_I18N = True - -USE_L10N = True - -USE_TZ = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.9/howto/static-files/ - -STATIC_URL = '/static/' -STATIC_PRECOMPILER_ROOT = os.path.join(BASE_DIR, '.gen') -SASS_PRECISION = 8 - -ALLOW_CUSTOM_SLUGS = True -DEFAULT_RANDOM_SLUG = 'true' # this value is an JS true/false - -MESSAGE_TAGS = { - messages.DEBUG: 'debug', - messages.INFO: 'info', - messages.SUCCESS: 'success', - messages.WARNING: 'warning', - messages.ERROR: 'danger', -} - -HOME_URL = "/" - -# Test mail functionality by printing mails to console: -EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' - -# if the imprint URL is not empty use it as an link to the imprint, else use IMPRINT_TEXT -IMPRINT_URL = "" -IMPRINT_TEXT = """ -
Text goes here
-""" - -# if the about URL is not empty use it as a link to the about, else use ABOUT_TEXT -ABOUT_URL = "" -ABOUT_TEXT = """ -Text goes here
-""" - -LOCALE_PATHS = (os.path.join(ROOT_DIR, 'locale'), ) - -LANGUAGES = ( - ('de', 'Deutsch'), - ('en', 'English'), - #('fr', 'Français'), -) - -REGISTER_ENABLED = True -LOGIN_URL = 'login' diff --git a/bitpoll/run b/bitpoll/run deleted file mode 100755 index 120733f..0000000 --- a/bitpoll/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -export USER=www-data HOME=/opt/bitpoll -python3 /opt/bitpoll/manage.py migrate -python3 /opt/bitpoll/manage.py collectstatic --noinput -exec uwsgi /etc/uwsgi/bitpoll.ini diff --git a/bitpoll/uwsgi-bitpoll.ini b/bitpoll/uwsgi-bitpoll.ini deleted file mode 100644 index c50cd0e..0000000 --- a/bitpoll/uwsgi-bitpoll.ini +++ /dev/null @@ -1,30 +0,0 @@ -[uwsgi] - -procname-master = uwsgi %n -master = true -socket = :3008 - -chdir = /opt/bitpoll - -module = bitpoll.wsgi:application -env = DJANGO_SETTINGS_MODULE=bitpoll.settings -env = LANG='C.UTF-8' -env = LC_ALL='C.UTF-8' - -; drop privileges -uid = www-data -gid = www-data -umask = 027 - -; run with at least 1 process but increase up to 4 when needed -processes = 8 -cheaper = 2 - -; reload whenever this config file changes -; %p is the full path of the current config file -touch-reload = %p - -; disable uWSGI request logging -disable-logging = true - -enable-threads = true