diff --git a/Django_webserver.kube.yaml b/Django_webserver.kube.yaml
new file mode 100644
index 0000000..4b9b6e1
--- /dev/null
+++ b/Django_webserver.kube.yaml
@@ -0,0 +1,49 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: django-python
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: django-webserver
+ namespace: django-python
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: django-python
+ template:
+ metadata:
+ labels:
+ app: django-python
+ spec:
+ containers:
+ - name: django-python
+ image: localhost:31795/django-python
+ imagePullPolicy: Always
+ ports:
+ - containerPort: 8000
+ name: webserver-port
+ volumeMounts:
+ - name: django-python-code
+ mountPath: /code
+
+ volumes:
+ - name: django-python-code
+ persistentVolumeClaim:
+ claimName: django-python-code
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: webserver
+ namespace: django-python
+spec:
+ ports:
+ - name: http
+ port: 8000
+ protocol: TCP
+ selector:
+ app: django-python
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 3713763..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,13 +0,0 @@
-FROM python:3
-
-WORKDIR /usr/src/app
-
-COPY requirements.txt ./
-RUN pip install --no-cache-dir -r requirements.txt
-
-COPY . .
-
-#RUN echo "nameserver 8.8.8.8" >> /etc/resolv.conf
-#CMD [ "python", "./nextcloud_ics_sync.py",">>","/var/log/nextcloud-ics-sync.log"]
-#CMD [ "sleep","3600" ]
-CMD echo "==================================================================================" >> /var/log/nextcloud-ics-sync.log 2>&1 ; echo $(date) >> /var/log/nextcloud-ics-sync.log 2>&1 ; python ./nextcloud_ics_sync.py >> /var/log/nextcloud-ics-sync.log 2>&1 ; echo "==================================================================================" >> /var/log/nextcloud-ics-sync.log 2>&1
diff --git a/README.md b/README.md
index 1e8275e..9b44f01 100644
--- a/README.md
+++ b/README.md
@@ -1 +1 @@
-sudo docker build -t nextcloud_ics_sync .
+copy reverse-proxy folder to PVC
diff --git a/dockerfile b/dockerfile
new file mode 100644
index 0000000..361d5a6
--- /dev/null
+++ b/dockerfile
@@ -0,0 +1,11 @@
+FROM python:3
+
+WORKDIR /code/
+
+COPY requirements.txt ./
+COPY reverse_proxy ./
+
+RUN pip install --no-cache-dir -r requirements.txt
+COPY . .
+
+CMD [ "python","reverse_proxy/manage.py","runserver","0.0.0.0:8000" ]
diff --git a/namespace.yaml b/namespace.yaml
new file mode 100644
index 0000000..614f2c9
--- /dev/null
+++ b/namespace.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: django-python
diff --git a/nextcloud_ics_sync.ini b/nextcloud_ics_sync.ini
deleted file mode 100644
index 3330074..0000000
--- a/nextcloud_ics_sync.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[DEFAULT]
-username: calendar_sync
-password: Displace6ArmingHeadroom
-server: https://nextcloud.tryton.geeraert.eu/
-
-[sam-pierre]
-calendar: shared
-ics_url: https://outlook.live.com/owa/calendar/90488edb-6373-4e0f-bde7-4b04b9385f5a/6982a203-79f2-419a-ac81-4164ce572d99/cid-B2051C269DBC4793/calendar.ics
-ics_username :
-ics_password :
diff --git a/nextcloud_ics_sync.py b/nextcloud_ics_sync.py
deleted file mode 100755
index 4f65582..0000000
--- a/nextcloud_ics_sync.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env python3
-import configparser, logging, requests, traceback
-from icalendar.cal import Calendar
-
-log_option = {
- 'format': '[%(asctime)s] [%(levelname)s] %(message)s',
- 'level': getattr(logging, 'INFO')
-}
-logging.basicConfig(**log_option)
-logging.getLogger("requests").setLevel(logging.WARNING)
-
-CALDAVURL = '%sremote.php/dav/calendars/%s/%s'
-
-
-def do_import(username, password, calendar, server, ics_url, ics_username, ics_password):
- logging.info(' Working with calendar %s...' % calendar)
- base_url = CALDAVURL % (server, username, calendar)
-
- target_fetch_url = '%s?export' % base_url
- r = requests.get(target_fetch_url, auth=(username, password))
- r.raise_for_status()
- try:
- target_cal = Calendar.from_ical(r.text)
- except ValueError as e:
- logging.error(' Warning: Could not parse iCal (%s)' % target_fetch_url)
- logging.error(e)
- return
-
- existing_uids = [bytes.decode(e['UID'].to_ical()).replace('\'', '').replace('/', 'slash') for e in target_cal.walk('VEVENT')]
-
- sourceRequest = requests.get(ics_url, auth=(ics_username, ics_password))
- sourceRequest.encoding = 'utf-8'
- sourceContent = sourceRequest.text
- c = Calendar.from_ical(sourceContent)
-
- distant_uids = [bytes.decode(e['UID'].to_ical()).replace('\'', '').replace('/', 'slash') for e in c.walk('VEVENT')]
-
- imported_uids = []
- for e in c.walk('VEVENT'):
- uid = bytes.decode(e['UID'].to_ical()).replace('\'', '').replace('/', 'slash')
- name = bytes.decode(e['SUMMARY'].to_ical())
- if uid not in existing_uids:
- cal = Calendar()
- cal.add_component(e)
- r = requests.put('%s/%s.ics' % (base_url, uid),
- data=cal.to_ical(),
- auth=(username, password),
- headers={'content-type': 'text/calendar; charset=UTF-8'}
- )
- if r.status_code == 500 and r'Sabre\VObject\Recur\NoInstancesException' in r.text:
- logging.warning(' No valid instances: %s (%s)' % (uid, name))
- elif r.status_code == 201 or r.status_code == 204:
- logging.info(' Imported: %s (%s)' % (uid, name))
- imported_uids.append(uid)
- else:
- r.raise_for_status()
-
- for euid in existing_uids:
- if not euid in distant_uids:
- r = requests.delete('%s/%s.ics' % (base_url, euid), auth=(username, password))
- if r.status_code == 204:
- logging.info('Deleted %s' % euid)
- elif r.status_code == 404:
- pass
- else:
- r.raise_for_status()
- logging.info(' Done.')
-
-
-if __name__ == '__main__':
- logging.info('Initializing script...')
- Config = configparser.RawConfigParser()
- Config.read('nextcloud_ics_sync.ini')
- logging.info('Done.')
- logging.info('Importing calendars...')
- for key in Config.sections():
- logging.info(' Working on section %s' % key)
- try:
- do_import(
- Config.get(key, 'username'), Config.get(key, 'password'), Config.get(key, 'calendar'), Config.get(key, 'server'),
- Config.get(key, 'ics_url'), Config.get(key, 'ics_username'), Config.get(key, 'ics_password')
- )
- except Exception as e:
- logging.error(traceback.print_exc())
- logging.info(' Done.')
- logging.info('Done.')
diff --git a/nextcloud_ics_sync_Cron_jobs.yaml b/nextcloud_ics_sync_Cron_jobs.yaml
deleted file mode 100644
index d36f025..0000000
--- a/nextcloud_ics_sync_Cron_jobs.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
-apiVersion: v1
-kind: Namespace
-metadata:
- name: nextcloud-ics-sync
----
-apiVersion: batch/v1
-kind: CronJob
-metadata:
- name: nextcloud-ics-sync
- namespace: nextcloud-ics-sync
-spec:
- schedule: "31 * * * *"
- jobTemplate:
- spec:
- ttlSecondsAfterFinished: 100
- template:
- spec:
-# nodeName: kube-master
- containers:
- - name: nextcloud-ics-sync
-# image: nextcloud_ics_sync
- image: localhost:31795/nextcloud_ics_sync
-# imagePullPolicy: Never
- volumeMounts:
- - name: nextcloud-ics-sync-log
- mountPath: /var/log/nextcloud-ics-sync.log
- restartPolicy: Never
- dnsConfig:
- nameservers:
- - 8.8.8.8
- volumes:
- - name: nextcloud-ics-sync-log
- hostPath:
- path: /var/log/nextcloud-ics-sync.log
- type: File
diff --git a/old/Django_reverse_proxy_old/Django_reverse_proxy/__init__.py b/old/Django_reverse_proxy_old/Django_reverse_proxy/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/__init__.cpython-39.pyc b/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/__init__.cpython-39.pyc
new file mode 100644
index 0000000..dbd8529
Binary files /dev/null and b/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/__init__.cpython-39.pyc differ
diff --git a/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/settings.cpython-39.pyc b/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/settings.cpython-39.pyc
new file mode 100644
index 0000000..703e34b
Binary files /dev/null and b/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/settings.cpython-39.pyc differ
diff --git a/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/urls.cpython-39.pyc b/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/urls.cpython-39.pyc
new file mode 100644
index 0000000..9cf706a
Binary files /dev/null and b/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/urls.cpython-39.pyc differ
diff --git a/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/wsgi.cpython-39.pyc b/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/wsgi.cpython-39.pyc
new file mode 100644
index 0000000..222ba2f
Binary files /dev/null and b/old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/wsgi.cpython-39.pyc differ
diff --git a/old/Django_reverse_proxy_old/Django_reverse_proxy/asgi.py b/old/Django_reverse_proxy_old/Django_reverse_proxy/asgi.py
new file mode 100644
index 0000000..6440611
--- /dev/null
+++ b/old/Django_reverse_proxy_old/Django_reverse_proxy/asgi.py
@@ -0,0 +1,16 @@
+"""
+ASGI config for Django_reverse_proxy project.
+
+It exposes the ASGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
+"""
+
+import os
+
+from django.core.asgi import get_asgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Django_reverse_proxy.settings')
+
+application = get_asgi_application()
diff --git a/old/Django_reverse_proxy_old/Django_reverse_proxy/settings.py b/old/Django_reverse_proxy_old/Django_reverse_proxy/settings.py
new file mode 100644
index 0000000..2b07da2
--- /dev/null
+++ b/old/Django_reverse_proxy_old/Django_reverse_proxy/settings.py
@@ -0,0 +1,123 @@
+"""
+Django settings for Django_reverse_proxy project.
+
+Generated by 'django-admin startproject' using Django 4.2.5.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/4.2/ref/settings/
+"""
+
+from pathlib import Path
+
+# Build paths inside the project like this: BASE_DIR / 'subdir'.
+BASE_DIR = Path(__file__).resolve().parent.parent
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'django-insecure-cdzm0zn@rzk#ix9mj9q3-ov%r^)-$u#met(_48s(x2we41+0!o'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = [
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+]
+
+MIDDLEWARE = [
+ 'django.middleware.security.SecurityMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+]
+
+ROOT_URLCONF = 'Django_reverse_proxy.urls'
+
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ '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 = 'Django_reverse_proxy.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': BASE_DIR / 'db.sqlite3',
+ }
+}
+
+
+# Password validation
+# https://docs.djangoproject.com/en/4.2/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',
+ },
+]
+
+
+# Internationalization
+# https://docs.djangoproject.com/en/4.2/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/4.2/howto/static-files/
+
+STATIC_URL = 'static/'
+
+# Default primary key field type
+# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
+
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
diff --git a/old/Django_reverse_proxy_old/Django_reverse_proxy/urls.py b/old/Django_reverse_proxy_old/Django_reverse_proxy/urls.py
new file mode 100644
index 0000000..5d5457c
--- /dev/null
+++ b/old/Django_reverse_proxy_old/Django_reverse_proxy/urls.py
@@ -0,0 +1,24 @@
+"""
+URL configuration for Django_reverse_proxy project.
+
+The `urlpatterns` list routes URLs to views. For more information please see:
+ https://docs.djangoproject.com/en/4.2/topics/http/urls/
+Examples:
+Function views
+ 1. Add an import: from my_app import views
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
+Class-based views
+ 1. Add an import: from other_app.views import Home
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
+Including another URLconf
+ 1. Import the include() function: from django.urls import include, path
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
+"""
+from django.contrib import admin
+from django.urls import path
+#from .. import frontend
+
+urlpatterns = [
+ path('admin/', admin.site.urls),
+# path('/', frontend.site.urls),
+]
diff --git a/old/Django_reverse_proxy_old/Django_reverse_proxy/wsgi.py b/old/Django_reverse_proxy_old/Django_reverse_proxy/wsgi.py
new file mode 100644
index 0000000..e4e1294
--- /dev/null
+++ b/old/Django_reverse_proxy_old/Django_reverse_proxy/wsgi.py
@@ -0,0 +1,16 @@
+"""
+WSGI config for Django_reverse_proxy project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
+"""
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Django_reverse_proxy.settings')
+
+application = get_wsgi_application()
diff --git a/old/Django_reverse_proxy_old/db.sqlite3 b/old/Django_reverse_proxy_old/db.sqlite3
new file mode 100644
index 0000000..eaf8c5e
Binary files /dev/null and b/old/Django_reverse_proxy_old/db.sqlite3 differ
diff --git a/old/Django_reverse_proxy_old/frontend/__init__.py b/old/Django_reverse_proxy_old/frontend/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/old/Django_reverse_proxy_old/frontend/admin.py b/old/Django_reverse_proxy_old/frontend/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/old/Django_reverse_proxy_old/frontend/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/old/Django_reverse_proxy_old/frontend/apps.py b/old/Django_reverse_proxy_old/frontend/apps.py
new file mode 100644
index 0000000..04f7b89
--- /dev/null
+++ b/old/Django_reverse_proxy_old/frontend/apps.py
@@ -0,0 +1,6 @@
+from django.apps import AppConfig
+
+
+class FrontendConfig(AppConfig):
+ default_auto_field = 'django.db.models.BigAutoField'
+ name = 'frontend'
diff --git a/old/Django_reverse_proxy_old/frontend/migrations/__init__.py b/old/Django_reverse_proxy_old/frontend/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/old/Django_reverse_proxy_old/frontend/models.py b/old/Django_reverse_proxy_old/frontend/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/old/Django_reverse_proxy_old/frontend/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/old/Django_reverse_proxy_old/frontend/tests.py b/old/Django_reverse_proxy_old/frontend/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/old/Django_reverse_proxy_old/frontend/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/old/Django_reverse_proxy_old/frontend/views.py b/old/Django_reverse_proxy_old/frontend/views.py
new file mode 100644
index 0000000..91ea44a
--- /dev/null
+++ b/old/Django_reverse_proxy_old/frontend/views.py
@@ -0,0 +1,3 @@
+from django.shortcuts import render
+
+# Create your views here.
diff --git a/old/Django_reverse_proxy_old/manage.py b/old/Django_reverse_proxy_old/manage.py
new file mode 100755
index 0000000..fbb57ed
--- /dev/null
+++ b/old/Django_reverse_proxy_old/manage.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+"""Django's command-line utility for administrative tasks."""
+import os
+import sys
+
+
+def main():
+ """Run administrative tasks."""
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Django_reverse_proxy.settings')
+ try:
+ from django.core.management import execute_from_command_line
+ except ImportError as exc:
+ raise ImportError(
+ "Couldn't import Django. Are you sure it's installed and "
+ "available on your PYTHONPATH environment variable? Did you "
+ "forget to activate a virtual environment?"
+ ) from exc
+ execute_from_command_line(sys.argv)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/old/eboutique/backoffice/__init__.py b/old/eboutique/backoffice/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/old/eboutique/backoffice/__pycache__/__init__.cpython-39.pyc b/old/eboutique/backoffice/__pycache__/__init__.cpython-39.pyc
new file mode 100644
index 0000000..78508e7
Binary files /dev/null and b/old/eboutique/backoffice/__pycache__/__init__.cpython-39.pyc differ
diff --git a/old/eboutique/backoffice/__pycache__/admin.cpython-39.pyc b/old/eboutique/backoffice/__pycache__/admin.cpython-39.pyc
new file mode 100644
index 0000000..f955caf
Binary files /dev/null and b/old/eboutique/backoffice/__pycache__/admin.cpython-39.pyc differ
diff --git a/old/eboutique/backoffice/__pycache__/apps.cpython-39.pyc b/old/eboutique/backoffice/__pycache__/apps.cpython-39.pyc
new file mode 100644
index 0000000..6db5b6e
Binary files /dev/null and b/old/eboutique/backoffice/__pycache__/apps.cpython-39.pyc differ
diff --git a/old/eboutique/backoffice/__pycache__/models.cpython-39.pyc b/old/eboutique/backoffice/__pycache__/models.cpython-39.pyc
new file mode 100644
index 0000000..2547c32
Binary files /dev/null and b/old/eboutique/backoffice/__pycache__/models.cpython-39.pyc differ
diff --git a/old/eboutique/backoffice/__pycache__/views.cpython-39.pyc b/old/eboutique/backoffice/__pycache__/views.cpython-39.pyc
new file mode 100644
index 0000000..1a97456
Binary files /dev/null and b/old/eboutique/backoffice/__pycache__/views.cpython-39.pyc differ
diff --git a/old/eboutique/backoffice/admin.py b/old/eboutique/backoffice/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/old/eboutique/backoffice/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/old/eboutique/backoffice/apps.py b/old/eboutique/backoffice/apps.py
new file mode 100644
index 0000000..75ce0d6
--- /dev/null
+++ b/old/eboutique/backoffice/apps.py
@@ -0,0 +1,40 @@
+from django.apps import AppConfig
+from django.http import HttpResponse
+from django.shortcuts import render
+import requests
+from proxmoxer import ProxmoxAPI
+import docker
+
+class BackofficeConfig(AppConfig):
+ default_auto_field = 'django.db.models.BigAutoField'
+ name = 'backoffice'
+
+def hello(request):
+ return HttpResponse('
Start bookstack!
')
+
+def http_call_test(request):
+ url = 'http://portainer.zeus.geeraert.eu/api/auth/'
+ myobj = {'Username': 'admin','Password':'Xtm78*CX3mJ54g'}
+
+ x = requests.post(url, json = myobj)
+
+ print(x.text)
+ return HttpResponse(x.text)
+
+def proxmox(request):
+ proxmox = ProxmoxAPI("proxmox.zeus.geeraert.eu", user="root@pam", password="dinner_sl@v3", verify_ssl=False)
+ return HttpResponse(proxmox)
+
+def docker_call(request,action,id_docker):
+ print(action)
+ print(id_docker)
+ client = docker.from_env()
+ if action == "start":
+ print("nous allons start")
+ client.containers.get(id_docker).start()
+ if action == "stop":
+ print("nous allons stop")
+ client.containers.get(id_docker).stop()
+
+ return HttpResponse(client.containers.get(id_docker).status)
+
diff --git a/old/eboutique/backoffice/migrations/__init__.py b/old/eboutique/backoffice/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/old/eboutique/backoffice/migrations/__pycache__/__init__.cpython-39.pyc b/old/eboutique/backoffice/migrations/__pycache__/__init__.cpython-39.pyc
new file mode 100644
index 0000000..593cf1f
Binary files /dev/null and b/old/eboutique/backoffice/migrations/__pycache__/__init__.cpython-39.pyc differ
diff --git a/old/eboutique/backoffice/models.py b/old/eboutique/backoffice/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/old/eboutique/backoffice/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/old/eboutique/backoffice/tests.py b/old/eboutique/backoffice/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/old/eboutique/backoffice/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/old/eboutique/backoffice/views.py b/old/eboutique/backoffice/views.py
new file mode 100644
index 0000000..dcf84f6
--- /dev/null
+++ b/old/eboutique/backoffice/views.py
@@ -0,0 +1,8 @@
+from django.shortcuts import render
+
+# Create your views here.
+from django.http import HttpResponse
+from django.shortcuts import render
+
+def hello(request):
+ return HttpResponse('Hello Django!
')
diff --git a/old/eboutique/db.sqlite3 b/old/eboutique/db.sqlite3
new file mode 100644
index 0000000..e69de29
diff --git a/old/eboutique/eboutique/__init__.py b/old/eboutique/eboutique/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/old/eboutique/eboutique/__pycache__/__init__.cpython-39.pyc b/old/eboutique/eboutique/__pycache__/__init__.cpython-39.pyc
new file mode 100644
index 0000000..7af4142
Binary files /dev/null and b/old/eboutique/eboutique/__pycache__/__init__.cpython-39.pyc differ
diff --git a/old/eboutique/eboutique/__pycache__/settings.cpython-39.pyc b/old/eboutique/eboutique/__pycache__/settings.cpython-39.pyc
new file mode 100644
index 0000000..a98abcd
Binary files /dev/null and b/old/eboutique/eboutique/__pycache__/settings.cpython-39.pyc differ
diff --git a/old/eboutique/eboutique/__pycache__/urls.cpython-39.pyc b/old/eboutique/eboutique/__pycache__/urls.cpython-39.pyc
new file mode 100644
index 0000000..4568ab1
Binary files /dev/null and b/old/eboutique/eboutique/__pycache__/urls.cpython-39.pyc differ
diff --git a/old/eboutique/eboutique/__pycache__/wsgi.cpython-39.pyc b/old/eboutique/eboutique/__pycache__/wsgi.cpython-39.pyc
new file mode 100644
index 0000000..9faac53
Binary files /dev/null and b/old/eboutique/eboutique/__pycache__/wsgi.cpython-39.pyc differ
diff --git a/old/eboutique/eboutique/asgi.py b/old/eboutique/eboutique/asgi.py
new file mode 100644
index 0000000..343e485
--- /dev/null
+++ b/old/eboutique/eboutique/asgi.py
@@ -0,0 +1,16 @@
+"""
+ASGI config for eboutique project.
+
+It exposes the ASGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
+"""
+
+import os
+
+from django.core.asgi import get_asgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'eboutique.settings')
+
+application = get_asgi_application()
diff --git a/old/eboutique/eboutique/settings.py b/old/eboutique/eboutique/settings.py
new file mode 100644
index 0000000..688eac9
--- /dev/null
+++ b/old/eboutique/eboutique/settings.py
@@ -0,0 +1,124 @@
+"""
+Django settings for eboutique project.
+
+Generated by 'django-admin startproject' using Django 4.2.5.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/4.2/ref/settings/
+"""
+
+from pathlib import Path
+
+# Build paths inside the project like this: BASE_DIR / 'subdir'.
+BASE_DIR = Path(__file__).resolve().parent.parent
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'django-insecure-g--8(!mq=_qs3)iipm%vs8bu0j8upir2i*&*gw&0)v26%lq=2!'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = [
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ 'backoffice',
+]
+
+MIDDLEWARE = [
+ 'django.middleware.security.SecurityMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+]
+
+ROOT_URLCONF = 'eboutique.urls'
+
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ '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 = 'eboutique.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': BASE_DIR / 'db.sqlite3',
+ }
+}
+
+
+# Password validation
+# https://docs.djangoproject.com/en/4.2/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',
+ },
+]
+
+
+# Internationalization
+# https://docs.djangoproject.com/en/4.2/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/4.2/howto/static-files/
+
+STATIC_URL = 'static/'
+
+# Default primary key field type
+# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
+
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
diff --git a/old/eboutique/eboutique/urls.py b/old/eboutique/eboutique/urls.py
new file mode 100644
index 0000000..e3550b5
--- /dev/null
+++ b/old/eboutique/eboutique/urls.py
@@ -0,0 +1,30 @@
+"""
+URL configuration for Django_reverse_proxy project.
+
+The `urlpatterns` list routes URLs to views. For more information please see:
+ https://docs.djangoproject.com/en/4.2/topics/http/urls/
+Examples:
+Function views
+ 1. Add an import: from my_app import views
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
+Class-based views
+ 1. Add an import: from other_app.views import Home
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
+Including another URLconf
+ 1. Import the include() function: from django.urls import include, path
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
+"""
+from django.contrib import admin
+from django.urls import path
+from backoffice import views, apps
+urlpatterns = [
+ path('admin/', admin.site.urls),
+ path('hello/', views.hello),
+ path('bookstack/', apps.hello),
+ path('test/', apps.http_call_test),
+ path('proxmox/', apps.proxmox),
+ path('docker//', apps.docker_call),
+
+
+]
+
diff --git a/old/eboutique/eboutique/wsgi.py b/old/eboutique/eboutique/wsgi.py
new file mode 100644
index 0000000..ed59d7d
--- /dev/null
+++ b/old/eboutique/eboutique/wsgi.py
@@ -0,0 +1,16 @@
+"""
+WSGI config for eboutique project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
+"""
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'eboutique.settings')
+
+application = get_wsgi_application()
diff --git a/old/eboutique/manage.py b/old/eboutique/manage.py
new file mode 100755
index 0000000..4888b4d
--- /dev/null
+++ b/old/eboutique/manage.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+"""Django's command-line utility for administrative tasks."""
+import os
+import sys
+
+
+def main():
+ """Run administrative tasks."""
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'eboutique.settings')
+ try:
+ from django.core.management import execute_from_command_line
+ except ImportError as exc:
+ raise ImportError(
+ "Couldn't import Django. Are you sure it's installed and "
+ "available on your PYTHONPATH environment variable? Did you "
+ "forget to activate a virtual environment?"
+ ) from exc
+ execute_from_command_line(sys.argv)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/pvc.claim.yaml b/pvc.claim.yaml
new file mode 100644
index 0000000..ae904d8
--- /dev/null
+++ b/pvc.claim.yaml
@@ -0,0 +1,12 @@
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+ name: django-python-code
+ namespace: django-python
+spec:
+ storageClassName: nfs-storage-intelligent
+ accessModes:
+ - ReadWriteMany
+ resources:
+ requests:
+ storage: 2Gi
diff --git a/requirements.txt b/requirements.txt
index c03277d..971d5ae 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,4 @@
-requests>=2.20.0
-icalendar==3.9.2
+django
+requests
+proxmoxer
+docker
diff --git a/reverse_proxy/docker_connection/__init__.py b/reverse_proxy/docker_connection/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/reverse_proxy/docker_connection/admin.py b/reverse_proxy/docker_connection/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/reverse_proxy/docker_connection/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/reverse_proxy/docker_connection/apps.py b/reverse_proxy/docker_connection/apps.py
new file mode 100644
index 0000000..82601dd
--- /dev/null
+++ b/reverse_proxy/docker_connection/apps.py
@@ -0,0 +1,46 @@
+from django.apps import AppConfig
+from django.http import HttpResponse
+from django.shortcuts import render
+import requests
+from proxmoxer import ProxmoxAPI
+import docker
+
+class BackofficeConfig(AppConfig):
+ default_auto_field = 'django.db.models.BigAutoField'
+ name = 'backoffice'
+
+def hello(request):
+ return HttpResponse('Start bookstack!
')
+
+def http_call_test(request):
+ url = 'http://portainer.zeus.geeraert.eu/api/auth/'
+ myobj = {'Username': 'admin','Password':'Xtm78*CX3mJ54g'}
+
+ x = requests.post(url, json = myobj)
+
+ print(x.text)
+ return HttpResponse(x.text)
+
+def proxmox(request):
+ proxmox = ProxmoxAPI("proxmox.zeus.geeraert.eu", user="root@pam", password="dinner_sl@v3", verify_ssl=False)
+ return HttpResponse(proxmox)
+
+def docker_call(request,action,id_docker):
+ print(action)
+ print(id_docker)
+ client = docker.from_env()
+ if action == "start":
+ print("nous allons start")
+ client.containers.get(id_docker).start()
+ if action == "stop":
+ print("nous allons stop")
+ client.containers.get(id_docker).stop()
+
+ return HttpResponse(client.containers.get(id_docker).status)
+
+
+
+
+
+
+
diff --git a/reverse_proxy/docker_connection/migrations/__init__.py b/reverse_proxy/docker_connection/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/reverse_proxy/docker_connection/models.py b/reverse_proxy/docker_connection/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/reverse_proxy/docker_connection/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/reverse_proxy/docker_connection/tests.py b/reverse_proxy/docker_connection/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/reverse_proxy/docker_connection/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/reverse_proxy/docker_connection/views.py b/reverse_proxy/docker_connection/views.py
new file mode 100644
index 0000000..dcf84f6
--- /dev/null
+++ b/reverse_proxy/docker_connection/views.py
@@ -0,0 +1,8 @@
+from django.shortcuts import render
+
+# Create your views here.
+from django.http import HttpResponse
+from django.shortcuts import render
+
+def hello(request):
+ return HttpResponse('Hello Django!
')
diff --git a/reverse_proxy/manage.py b/reverse_proxy/manage.py
new file mode 100755
index 0000000..4acebb4
--- /dev/null
+++ b/reverse_proxy/manage.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+"""Django's command-line utility for administrative tasks."""
+import os
+import sys
+
+
+def main():
+ """Run administrative tasks."""
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reverse_proxy.settings')
+ try:
+ from django.core.management import execute_from_command_line
+ except ImportError as exc:
+ raise ImportError(
+ "Couldn't import Django. Are you sure it's installed and "
+ "available on your PYTHONPATH environment variable? Did you "
+ "forget to activate a virtual environment?"
+ ) from exc
+ execute_from_command_line(sys.argv)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/reverse_proxy/reverse_proxy/__init__.py b/reverse_proxy/reverse_proxy/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-39.pyc b/reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-39.pyc
new file mode 100644
index 0000000..c7e95fe
Binary files /dev/null and b/reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-39.pyc differ
diff --git a/reverse_proxy/reverse_proxy/__pycache__/settings.cpython-39.pyc b/reverse_proxy/reverse_proxy/__pycache__/settings.cpython-39.pyc
new file mode 100644
index 0000000..23dd015
Binary files /dev/null and b/reverse_proxy/reverse_proxy/__pycache__/settings.cpython-39.pyc differ
diff --git a/reverse_proxy/reverse_proxy/asgi.py b/reverse_proxy/reverse_proxy/asgi.py
new file mode 100644
index 0000000..0a3ef33
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/asgi.py
@@ -0,0 +1,16 @@
+"""
+ASGI config for reverse_proxy project.
+
+It exposes the ASGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
+"""
+
+import os
+
+from django.core.asgi import get_asgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reverse_proxy.settings')
+
+application = get_asgi_application()
diff --git a/reverse_proxy/reverse_proxy/db.sqlite3 b/reverse_proxy/reverse_proxy/db.sqlite3
new file mode 100644
index 0000000..e69de29
diff --git a/reverse_proxy/reverse_proxy/docker_connection/__init__.py b/reverse_proxy/reverse_proxy/docker_connection/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/reverse_proxy/reverse_proxy/docker_connection/__pycache__/__init__.cpython-312.pyc b/reverse_proxy/reverse_proxy/docker_connection/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..7e5ff04
Binary files /dev/null and b/reverse_proxy/reverse_proxy/docker_connection/__pycache__/__init__.cpython-312.pyc differ
diff --git a/reverse_proxy/reverse_proxy/docker_connection/__pycache__/apps.cpython-312.pyc b/reverse_proxy/reverse_proxy/docker_connection/__pycache__/apps.cpython-312.pyc
new file mode 100644
index 0000000..ff91d2b
Binary files /dev/null and b/reverse_proxy/reverse_proxy/docker_connection/__pycache__/apps.cpython-312.pyc differ
diff --git a/reverse_proxy/reverse_proxy/docker_connection/__pycache__/views.cpython-312.pyc b/reverse_proxy/reverse_proxy/docker_connection/__pycache__/views.cpython-312.pyc
new file mode 100644
index 0000000..e6faa35
Binary files /dev/null and b/reverse_proxy/reverse_proxy/docker_connection/__pycache__/views.cpython-312.pyc differ
diff --git a/reverse_proxy/reverse_proxy/docker_connection/admin.py b/reverse_proxy/reverse_proxy/docker_connection/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/docker_connection/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/reverse_proxy/reverse_proxy/docker_connection/apps.py b/reverse_proxy/reverse_proxy/docker_connection/apps.py
new file mode 100644
index 0000000..82601dd
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/docker_connection/apps.py
@@ -0,0 +1,46 @@
+from django.apps import AppConfig
+from django.http import HttpResponse
+from django.shortcuts import render
+import requests
+from proxmoxer import ProxmoxAPI
+import docker
+
+class BackofficeConfig(AppConfig):
+ default_auto_field = 'django.db.models.BigAutoField'
+ name = 'backoffice'
+
+def hello(request):
+ return HttpResponse('Start bookstack!
')
+
+def http_call_test(request):
+ url = 'http://portainer.zeus.geeraert.eu/api/auth/'
+ myobj = {'Username': 'admin','Password':'Xtm78*CX3mJ54g'}
+
+ x = requests.post(url, json = myobj)
+
+ print(x.text)
+ return HttpResponse(x.text)
+
+def proxmox(request):
+ proxmox = ProxmoxAPI("proxmox.zeus.geeraert.eu", user="root@pam", password="dinner_sl@v3", verify_ssl=False)
+ return HttpResponse(proxmox)
+
+def docker_call(request,action,id_docker):
+ print(action)
+ print(id_docker)
+ client = docker.from_env()
+ if action == "start":
+ print("nous allons start")
+ client.containers.get(id_docker).start()
+ if action == "stop":
+ print("nous allons stop")
+ client.containers.get(id_docker).stop()
+
+ return HttpResponse(client.containers.get(id_docker).status)
+
+
+
+
+
+
+
diff --git a/reverse_proxy/reverse_proxy/docker_connection/migrations/__init__.py b/reverse_proxy/reverse_proxy/docker_connection/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/reverse_proxy/reverse_proxy/docker_connection/models.py b/reverse_proxy/reverse_proxy/docker_connection/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/docker_connection/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/reverse_proxy/reverse_proxy/docker_connection/tests.py b/reverse_proxy/reverse_proxy/docker_connection/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/docker_connection/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/reverse_proxy/reverse_proxy/docker_connection/views.py b/reverse_proxy/reverse_proxy/docker_connection/views.py
new file mode 100644
index 0000000..dcf84f6
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/docker_connection/views.py
@@ -0,0 +1,8 @@
+from django.shortcuts import render
+
+# Create your views here.
+from django.http import HttpResponse
+from django.shortcuts import render
+
+def hello(request):
+ return HttpResponse('Hello Django!
')
diff --git a/reverse_proxy/reverse_proxy/manage.py b/reverse_proxy/reverse_proxy/manage.py
new file mode 100755
index 0000000..aa58c2d
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/manage.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+"""Django's command-line utility for administrative tasks.?"""
+import os
+import sys
+
+
+def main():
+ """Run administrative tasks."""
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reverse_proxy.settings')
+ try:
+ from django.core.management import execute_from_command_line
+ except ImportError as exc:
+ raise ImportError(
+ "Couldn't import Django. Are you sure it's installed and "
+ "available on your PYTHONPATH environment variable? Did you "
+ "forget to activate a virtual environment?"
+ ) from exc
+ execute_from_command_line(sys.argv)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/reverse_proxy/reverse_proxy/random_simpsons/__init__.py b/reverse_proxy/reverse_proxy/random_simpsons/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/reverse_proxy/reverse_proxy/random_simpsons/__pycache__/__init__.cpython-312.pyc b/reverse_proxy/reverse_proxy/random_simpsons/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..cc57492
Binary files /dev/null and b/reverse_proxy/reverse_proxy/random_simpsons/__pycache__/__init__.cpython-312.pyc differ
diff --git a/reverse_proxy/reverse_proxy/random_simpsons/__pycache__/apps.cpython-312.pyc b/reverse_proxy/reverse_proxy/random_simpsons/__pycache__/apps.cpython-312.pyc
new file mode 100644
index 0000000..686dc09
Binary files /dev/null and b/reverse_proxy/reverse_proxy/random_simpsons/__pycache__/apps.cpython-312.pyc differ
diff --git a/reverse_proxy/reverse_proxy/random_simpsons/__pycache__/views.cpython-312.pyc b/reverse_proxy/reverse_proxy/random_simpsons/__pycache__/views.cpython-312.pyc
new file mode 100644
index 0000000..e6faa35
Binary files /dev/null and b/reverse_proxy/reverse_proxy/random_simpsons/__pycache__/views.cpython-312.pyc differ
diff --git a/reverse_proxy/reverse_proxy/random_simpsons/admin.py b/reverse_proxy/reverse_proxy/random_simpsons/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/random_simpsons/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/reverse_proxy/reverse_proxy/random_simpsons/apps.py b/reverse_proxy/reverse_proxy/random_simpsons/apps.py
new file mode 100644
index 0000000..96787ec
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/random_simpsons/apps.py
@@ -0,0 +1,34 @@
+from django.apps import AppConfig
+from django.http import HttpResponse
+from django.shortcuts import render
+from django.shortcuts import redirect
+import time
+import random
+
+def hello(request):
+ return HttpResponse('Hello Simpsons!
')
+
+def simpsons(request):
+ simpsons_url = "https://www1.kisscartoon.online/episode/the-simpsons-season-";
+ number_of_seasons = 35
+ seasons_maximum_number = [13,22,24,22,22,25,25,25,25,23,22,21,22,22,22,21,22,22,20,21,23,22,22,22,22,22,22,22,21,23,22,22,22,22,18]
+
+ #print(simpsons_url)
+
+ random_seasons = random.randint(1, number_of_seasons)
+ print("random seasons: "+ str(random_seasons))
+
+ #random_seasons-1 because list start at index 0
+ print("maximum of episode for this season: "+str(seasons_maximum_number[random_seasons-1]))
+
+ random_episode = random.randint(1, seasons_maximum_number[random_seasons-1])
+
+ print("random episode: "+ str(random_episode))
+
+
+ final_url = simpsons_url+str(random_seasons)+ "-episode-"+str(random_episode)#
+ print(final_url)
+
+# return HttpResponse(str(final_url))
+ time.sleep(10)
+ return redirect(str(final_url))
diff --git a/reverse_proxy/reverse_proxy/random_simpsons/migrations/__init__.py b/reverse_proxy/reverse_proxy/random_simpsons/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/reverse_proxy/reverse_proxy/random_simpsons/models.py b/reverse_proxy/reverse_proxy/random_simpsons/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/random_simpsons/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/reverse_proxy/reverse_proxy/random_simpsons/tests.py b/reverse_proxy/reverse_proxy/random_simpsons/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/random_simpsons/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/reverse_proxy/reverse_proxy/random_simpsons/views.py b/reverse_proxy/reverse_proxy/random_simpsons/views.py
new file mode 100644
index 0000000..dcf84f6
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/random_simpsons/views.py
@@ -0,0 +1,8 @@
+from django.shortcuts import render
+
+# Create your views here.
+from django.http import HttpResponse
+from django.shortcuts import render
+
+def hello(request):
+ return HttpResponse('Hello Django!
')
diff --git a/reverse_proxy/reverse_proxy/reverse_proxy/__init__.py b/reverse_proxy/reverse_proxy/reverse_proxy/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-312.pyc b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..2d28c58
Binary files /dev/null and b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-312.pyc differ
diff --git a/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-39.pyc b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-39.pyc
new file mode 100644
index 0000000..c7e95fe
Binary files /dev/null and b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-39.pyc differ
diff --git a/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/settings.cpython-312.pyc b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/settings.cpython-312.pyc
new file mode 100644
index 0000000..491339d
Binary files /dev/null and b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/settings.cpython-312.pyc differ
diff --git a/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/settings.cpython-39.pyc b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/settings.cpython-39.pyc
new file mode 100644
index 0000000..23dd015
Binary files /dev/null and b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/settings.cpython-39.pyc differ
diff --git a/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/urls.cpython-312.pyc b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/urls.cpython-312.pyc
new file mode 100644
index 0000000..c55b590
Binary files /dev/null and b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/urls.cpython-312.pyc differ
diff --git a/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/wsgi.cpython-312.pyc b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/wsgi.cpython-312.pyc
new file mode 100644
index 0000000..3bf6e79
Binary files /dev/null and b/reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/wsgi.cpython-312.pyc differ
diff --git a/reverse_proxy/reverse_proxy/reverse_proxy/asgi.py b/reverse_proxy/reverse_proxy/reverse_proxy/asgi.py
new file mode 100644
index 0000000..0a3ef33
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/reverse_proxy/asgi.py
@@ -0,0 +1,16 @@
+"""
+ASGI config for reverse_proxy project.
+
+It exposes the ASGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
+"""
+
+import os
+
+from django.core.asgi import get_asgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reverse_proxy.settings')
+
+application = get_asgi_application()
diff --git a/reverse_proxy/reverse_proxy/reverse_proxy/settings.py b/reverse_proxy/reverse_proxy/reverse_proxy/settings.py
new file mode 100644
index 0000000..0933cf0
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/reverse_proxy/settings.py
@@ -0,0 +1,123 @@
+"""
+Django settings for reverse_proxy project.
+
+Generated by 'django-admin startproject' using Django 4.2.5.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/4.2/ref/settings/
+"""
+
+from pathlib import Path
+
+# Build paths inside the project like this: BASE_DIR / 'subdir'.
+BASE_DIR = Path(__file__).resolve().parent.parent
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'django-insecure-71%)_#e#o9-dl2o^6mfud-*rw+4+8vy-nd*bzeier&(34ap-p9'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+ALLOWED_HOSTS = ['reverse.tryton.geeraert.eu','192.168.4.100','django.tryton.geeraert.eu']
+
+
+# Application definition
+
+INSTALLED_APPS = [
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+]
+
+MIDDLEWARE = [
+ 'django.middleware.security.SecurityMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+]
+
+ROOT_URLCONF = 'reverse_proxy.urls'
+
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ '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 = 'reverse_proxy.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': BASE_DIR / 'db.sqlite3',
+ }
+}
+
+
+# Password validation
+# https://docs.djangoproject.com/en/4.2/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',
+ },
+]
+
+
+# Internationalization
+# https://docs.djangoproject.com/en/4.2/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/4.2/howto/static-files/
+
+STATIC_URL = 'static/'
+
+# Default primary key field type
+# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
+
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
diff --git a/reverse_proxy/reverse_proxy/reverse_proxy/urls.py b/reverse_proxy/reverse_proxy/reverse_proxy/urls.py
new file mode 100644
index 0000000..ea9a4f4
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/reverse_proxy/urls.py
@@ -0,0 +1,32 @@
+"""
+URL configuration for reverse_proxy project.
+
+The `urlpatterns` list routes URLs to views. For more information please see:
+ https://docs.djangoproject.com/en/4.2/topics/http/urls/
+Examples:
+Function views
+ 1. Add an import: from my_app import views
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
+Class-based views
+ 1. Add an import: from other_app.views import Home
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
+Including another URLconf
+ 1. Import the include() function: from django.urls import include, path
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
+"""
+from django.contrib import admin
+from django.urls import path
+#from docker_connection import views, apps
+from random_simpsons import apps as random_simpsons
+
+urlpatterns = [
+# path('admin/', admin.site.urls),
+ path('hello/', random_simpsons.hello),
+ # path('bookstack/', docker_connection.apps.hello),
+ # path('test/', docker_connection.apps.http_call_test),
+ # path('proxmox/', docker_connection.apps.proxmox),
+ path('simpsons/', random_simpsons.simpsons),
+ # path('docker//', docker_connection.apps.docker_call),
+
+
+]
diff --git a/reverse_proxy/reverse_proxy/reverse_proxy/wsgi.py b/reverse_proxy/reverse_proxy/reverse_proxy/wsgi.py
new file mode 100644
index 0000000..fb1f6e3
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/reverse_proxy/wsgi.py
@@ -0,0 +1,16 @@
+"""
+WSGI config for reverse_proxy project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
+"""
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reverse_proxy.settings')
+
+application = get_wsgi_application()
diff --git a/reverse_proxy/reverse_proxy/settings.py b/reverse_proxy/reverse_proxy/settings.py
new file mode 100644
index 0000000..0285007
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/settings.py
@@ -0,0 +1,123 @@
+"""
+Django settings for reverse_proxy project.
+
+Generated by 'django-admin startproject' using Django 4.2.5.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/4.2/ref/settings/
+"""
+
+from pathlib import Path
+
+# Build paths inside the project like this: BASE_DIR / 'subdir'.
+BASE_DIR = Path(__file__).resolve().parent.parent
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'django-insecure-71%)_#e#o9-dl2o^6mfud-*rw+4+8vy-nd*bzeier&(34ap-p9'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+ALLOWED_HOSTS = ['reverse.tryton.geeraert.eu','192.168.4.100']
+
+
+# Application definition
+
+INSTALLED_APPS = [
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+]
+
+MIDDLEWARE = [
+ 'django.middleware.security.SecurityMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+]
+
+ROOT_URLCONF = 'reverse_proxy.urls'
+
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ '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 = 'reverse_proxy.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': BASE_DIR / 'db.sqlite3',
+ }
+}
+
+
+# Password validation
+# https://docs.djangoproject.com/en/4.2/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',
+ },
+]
+
+
+# Internationalization
+# https://docs.djangoproject.com/en/4.2/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/4.2/howto/static-files/
+
+STATIC_URL = 'static/'
+
+# Default primary key field type
+# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
+
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
diff --git a/reverse_proxy/reverse_proxy/urls.py b/reverse_proxy/reverse_proxy/urls.py
new file mode 100644
index 0000000..7b27843
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/urls.py
@@ -0,0 +1,30 @@
+"""
+URL configuration for reverse_proxy project.
+
+The `urlpatterns` list routes URLs to views. For more information please see:
+ https://docs.djangoproject.com/en/4.2/topics/http/urls/
+Examples:
+Function views
+ 1. Add an import: from my_app import views
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
+Class-based views
+ 1. Add an import: from other_app.views import Home
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
+Including another URLconf
+ 1. Import the include() function: from django.urls import include, path
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
+"""
+from django.contrib import admin
+from django.urls import path
+from docker_connection import views, apps
+
+urlpatterns = [
+ path('admin/', admin.site.urls),
+ path('hello/', views.hello),
+ path('bookstack/', apps.hello),
+ path('test/', apps.http_call_test),
+ path('proxmox/', apps.proxmox),
+ path('docker//', apps.docker_call),
+
+
+]
diff --git a/reverse_proxy/reverse_proxy/wsgi.py b/reverse_proxy/reverse_proxy/wsgi.py
new file mode 100644
index 0000000..fb1f6e3
--- /dev/null
+++ b/reverse_proxy/reverse_proxy/wsgi.py
@@ -0,0 +1,16 @@
+"""
+WSGI config for reverse_proxy project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
+"""
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reverse_proxy.settings')
+
+application = get_wsgi_application()
diff --git a/update.sh b/update.sh
deleted file mode 100755
index c7eb6cf..0000000
--- a/update.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-echo $(date)
-cd /home/pi-ux-ce/nextcloud_ics_sync/
-python3 /home/pi-ux-ce/nextcloud_ics_sync/nextcloud_ics_sync.py
-echo "--------------"