From d71c9505e77dae473de2fb9ac72c50f4b7bb2ef8 Mon Sep 17 00:00:00 2001 From: pierre Date: Tue, 23 Jul 2024 16:28:04 +0100 Subject: [PATCH] :boom: add all the files --- Django_webserver.kube.yaml | 49 +++++++ Dockerfile | 13 -- README.md | 2 +- dockerfile | 11 ++ namespace.yaml | 4 + nextcloud_ics_sync.ini | 10 -- nextcloud_ics_sync.py | 86 ------------ nextcloud_ics_sync_Cron_jobs.yaml | 35 ----- .../Django_reverse_proxy/__init__.py | 0 .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 184 bytes .../__pycache__/settings.cpython-39.pyc | Bin 0 -> 2349 bytes .../__pycache__/urls.cpython-39.pyc | Bin 0 -> 988 bytes .../__pycache__/wsgi.cpython-39.pyc | Bin 0 -> 613 bytes .../Django_reverse_proxy/asgi.py | 16 +++ .../Django_reverse_proxy/settings.py | 123 +++++++++++++++++ .../Django_reverse_proxy/urls.py | 24 ++++ .../Django_reverse_proxy/wsgi.py | 16 +++ old/Django_reverse_proxy_old/db.sqlite3 | Bin 0 -> 131072 bytes .../frontend/__init__.py | 0 .../frontend/admin.py | 3 + old/Django_reverse_proxy_old/frontend/apps.py | 6 + .../frontend/migrations/__init__.py | 0 .../frontend/models.py | 3 + .../frontend/tests.py | 3 + .../frontend/views.py | 3 + old/Django_reverse_proxy_old/manage.py | 22 ++++ old/eboutique/backoffice/__init__.py | 0 .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 163 bytes .../__pycache__/admin.cpython-39.pyc | Bin 0 -> 204 bytes .../__pycache__/apps.cpython-39.pyc | Bin 0 -> 1645 bytes .../__pycache__/models.cpython-39.pyc | Bin 0 -> 201 bytes .../__pycache__/views.cpython-39.pyc | Bin 0 -> 403 bytes old/eboutique/backoffice/admin.py | 3 + old/eboutique/backoffice/apps.py | 40 ++++++ .../backoffice/migrations/__init__.py | 0 .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 174 bytes old/eboutique/backoffice/models.py | 3 + old/eboutique/backoffice/tests.py | 3 + old/eboutique/backoffice/views.py | 8 ++ old/eboutique/db.sqlite3 | 0 old/eboutique/eboutique/__init__.py | 0 .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 162 bytes .../__pycache__/settings.cpython-39.pyc | Bin 0 -> 2306 bytes .../eboutique/__pycache__/urls.cpython-39.pyc | Bin 0 -> 1200 bytes .../eboutique/__pycache__/wsgi.cpython-39.pyc | Bin 0 -> 569 bytes old/eboutique/eboutique/asgi.py | 16 +++ old/eboutique/eboutique/settings.py | 124 ++++++++++++++++++ old/eboutique/eboutique/urls.py | 30 +++++ old/eboutique/eboutique/wsgi.py | 16 +++ old/eboutique/manage.py | 22 ++++ pvc.claim.yaml | 12 ++ requirements.txt | 6 +- reverse_proxy/docker_connection/__init__.py | 0 reverse_proxy/docker_connection/admin.py | 3 + reverse_proxy/docker_connection/apps.py | 46 +++++++ .../docker_connection/migrations/__init__.py | 0 reverse_proxy/docker_connection/models.py | 3 + reverse_proxy/docker_connection/tests.py | 3 + reverse_proxy/docker_connection/views.py | 8 ++ reverse_proxy/manage.py | 22 ++++ reverse_proxy/reverse_proxy/__init__.py | 0 .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 177 bytes .../__pycache__/settings.cpython-39.pyc | Bin 0 -> 2321 bytes reverse_proxy/reverse_proxy/asgi.py | 16 +++ reverse_proxy/reverse_proxy/db.sqlite3 | 0 .../docker_connection/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 146 bytes .../__pycache__/apps.cpython-312.pyc | Bin 0 -> 2331 bytes .../__pycache__/views.cpython-312.pyc | Bin 0 -> 419 bytes .../reverse_proxy/docker_connection/admin.py | 3 + .../reverse_proxy/docker_connection/apps.py | 46 +++++++ .../docker_connection/migrations/__init__.py | 0 .../reverse_proxy/docker_connection/models.py | 3 + .../reverse_proxy/docker_connection/tests.py | 3 + .../reverse_proxy/docker_connection/views.py | 8 ++ reverse_proxy/reverse_proxy/manage.py | 22 ++++ .../reverse_proxy/random_simpsons/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 144 bytes .../__pycache__/apps.cpython-312.pyc | Bin 0 -> 1736 bytes .../__pycache__/views.cpython-312.pyc | Bin 0 -> 419 bytes .../reverse_proxy/random_simpsons/admin.py | 3 + .../reverse_proxy/random_simpsons/apps.py | 34 +++++ .../random_simpsons/migrations/__init__.py | 0 .../reverse_proxy/random_simpsons/models.py | 3 + .../reverse_proxy/random_simpsons/tests.py | 3 + .../reverse_proxy/random_simpsons/views.py | 8 ++ .../reverse_proxy/reverse_proxy/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 142 bytes .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 177 bytes .../__pycache__/settings.cpython-312.pyc | Bin 0 -> 2613 bytes .../__pycache__/settings.cpython-39.pyc | Bin 0 -> 2321 bytes .../__pycache__/urls.cpython-312.pyc | Bin 0 -> 1108 bytes .../__pycache__/wsgi.cpython-312.pyc | Bin 0 -> 642 bytes .../reverse_proxy/reverse_proxy/asgi.py | 16 +++ .../reverse_proxy/reverse_proxy/settings.py | 123 +++++++++++++++++ .../reverse_proxy/reverse_proxy/urls.py | 32 +++++ .../reverse_proxy/reverse_proxy/wsgi.py | 16 +++ reverse_proxy/reverse_proxy/settings.py | 123 +++++++++++++++++ reverse_proxy/reverse_proxy/urls.py | 30 +++++ reverse_proxy/reverse_proxy/wsgi.py | 16 +++ update.sh | 6 - 101 files changed, 1158 insertions(+), 153 deletions(-) create mode 100644 Django_webserver.kube.yaml delete mode 100644 Dockerfile create mode 100644 dockerfile create mode 100644 namespace.yaml delete mode 100644 nextcloud_ics_sync.ini delete mode 100755 nextcloud_ics_sync.py delete mode 100644 nextcloud_ics_sync_Cron_jobs.yaml create mode 100644 old/Django_reverse_proxy_old/Django_reverse_proxy/__init__.py create mode 100644 old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/__init__.cpython-39.pyc create mode 100644 old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/settings.cpython-39.pyc create mode 100644 old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/urls.cpython-39.pyc create mode 100644 old/Django_reverse_proxy_old/Django_reverse_proxy/__pycache__/wsgi.cpython-39.pyc create mode 100644 old/Django_reverse_proxy_old/Django_reverse_proxy/asgi.py create mode 100644 old/Django_reverse_proxy_old/Django_reverse_proxy/settings.py create mode 100644 old/Django_reverse_proxy_old/Django_reverse_proxy/urls.py create mode 100644 old/Django_reverse_proxy_old/Django_reverse_proxy/wsgi.py create mode 100644 old/Django_reverse_proxy_old/db.sqlite3 create mode 100644 old/Django_reverse_proxy_old/frontend/__init__.py create mode 100644 old/Django_reverse_proxy_old/frontend/admin.py create mode 100644 old/Django_reverse_proxy_old/frontend/apps.py create mode 100644 old/Django_reverse_proxy_old/frontend/migrations/__init__.py create mode 100644 old/Django_reverse_proxy_old/frontend/models.py create mode 100644 old/Django_reverse_proxy_old/frontend/tests.py create mode 100644 old/Django_reverse_proxy_old/frontend/views.py create mode 100755 old/Django_reverse_proxy_old/manage.py create mode 100644 old/eboutique/backoffice/__init__.py create mode 100644 old/eboutique/backoffice/__pycache__/__init__.cpython-39.pyc create mode 100644 old/eboutique/backoffice/__pycache__/admin.cpython-39.pyc create mode 100644 old/eboutique/backoffice/__pycache__/apps.cpython-39.pyc create mode 100644 old/eboutique/backoffice/__pycache__/models.cpython-39.pyc create mode 100644 old/eboutique/backoffice/__pycache__/views.cpython-39.pyc create mode 100644 old/eboutique/backoffice/admin.py create mode 100644 old/eboutique/backoffice/apps.py create mode 100644 old/eboutique/backoffice/migrations/__init__.py create mode 100644 old/eboutique/backoffice/migrations/__pycache__/__init__.cpython-39.pyc create mode 100644 old/eboutique/backoffice/models.py create mode 100644 old/eboutique/backoffice/tests.py create mode 100644 old/eboutique/backoffice/views.py create mode 100644 old/eboutique/db.sqlite3 create mode 100644 old/eboutique/eboutique/__init__.py create mode 100644 old/eboutique/eboutique/__pycache__/__init__.cpython-39.pyc create mode 100644 old/eboutique/eboutique/__pycache__/settings.cpython-39.pyc create mode 100644 old/eboutique/eboutique/__pycache__/urls.cpython-39.pyc create mode 100644 old/eboutique/eboutique/__pycache__/wsgi.cpython-39.pyc create mode 100644 old/eboutique/eboutique/asgi.py create mode 100644 old/eboutique/eboutique/settings.py create mode 100644 old/eboutique/eboutique/urls.py create mode 100644 old/eboutique/eboutique/wsgi.py create mode 100755 old/eboutique/manage.py create mode 100644 pvc.claim.yaml create mode 100644 reverse_proxy/docker_connection/__init__.py create mode 100644 reverse_proxy/docker_connection/admin.py create mode 100644 reverse_proxy/docker_connection/apps.py create mode 100644 reverse_proxy/docker_connection/migrations/__init__.py create mode 100644 reverse_proxy/docker_connection/models.py create mode 100644 reverse_proxy/docker_connection/tests.py create mode 100644 reverse_proxy/docker_connection/views.py create mode 100755 reverse_proxy/manage.py create mode 100644 reverse_proxy/reverse_proxy/__init__.py create mode 100644 reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-39.pyc create mode 100644 reverse_proxy/reverse_proxy/__pycache__/settings.cpython-39.pyc create mode 100644 reverse_proxy/reverse_proxy/asgi.py create mode 100644 reverse_proxy/reverse_proxy/db.sqlite3 create mode 100644 reverse_proxy/reverse_proxy/docker_connection/__init__.py create mode 100644 reverse_proxy/reverse_proxy/docker_connection/__pycache__/__init__.cpython-312.pyc create mode 100644 reverse_proxy/reverse_proxy/docker_connection/__pycache__/apps.cpython-312.pyc create mode 100644 reverse_proxy/reverse_proxy/docker_connection/__pycache__/views.cpython-312.pyc create mode 100644 reverse_proxy/reverse_proxy/docker_connection/admin.py create mode 100644 reverse_proxy/reverse_proxy/docker_connection/apps.py create mode 100644 reverse_proxy/reverse_proxy/docker_connection/migrations/__init__.py create mode 100644 reverse_proxy/reverse_proxy/docker_connection/models.py create mode 100644 reverse_proxy/reverse_proxy/docker_connection/tests.py create mode 100644 reverse_proxy/reverse_proxy/docker_connection/views.py create mode 100755 reverse_proxy/reverse_proxy/manage.py create mode 100644 reverse_proxy/reverse_proxy/random_simpsons/__init__.py create mode 100644 reverse_proxy/reverse_proxy/random_simpsons/__pycache__/__init__.cpython-312.pyc create mode 100644 reverse_proxy/reverse_proxy/random_simpsons/__pycache__/apps.cpython-312.pyc create mode 100644 reverse_proxy/reverse_proxy/random_simpsons/__pycache__/views.cpython-312.pyc create mode 100644 reverse_proxy/reverse_proxy/random_simpsons/admin.py create mode 100644 reverse_proxy/reverse_proxy/random_simpsons/apps.py create mode 100644 reverse_proxy/reverse_proxy/random_simpsons/migrations/__init__.py create mode 100644 reverse_proxy/reverse_proxy/random_simpsons/models.py create mode 100644 reverse_proxy/reverse_proxy/random_simpsons/tests.py create mode 100644 reverse_proxy/reverse_proxy/random_simpsons/views.py create mode 100644 reverse_proxy/reverse_proxy/reverse_proxy/__init__.py create mode 100644 reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-312.pyc create mode 100644 reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/__init__.cpython-39.pyc create mode 100644 reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/settings.cpython-312.pyc create mode 100644 reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/settings.cpython-39.pyc create mode 100644 reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/urls.cpython-312.pyc create mode 100644 reverse_proxy/reverse_proxy/reverse_proxy/__pycache__/wsgi.cpython-312.pyc create mode 100644 reverse_proxy/reverse_proxy/reverse_proxy/asgi.py create mode 100644 reverse_proxy/reverse_proxy/reverse_proxy/settings.py create mode 100644 reverse_proxy/reverse_proxy/reverse_proxy/urls.py create mode 100644 reverse_proxy/reverse_proxy/reverse_proxy/wsgi.py create mode 100644 reverse_proxy/reverse_proxy/settings.py create mode 100644 reverse_proxy/reverse_proxy/urls.py create mode 100644 reverse_proxy/reverse_proxy/wsgi.py delete mode 100755 update.sh 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 0000000000000000000000000000000000000000..dbd8529be1f747864eb1a92f76271e4563356c63 GIT binary patch literal 184 zcmYe~<>g`kg1ltrR1p0bL?8o3AjbiSi&=m~3PUi1CZpd&ryk0@&Ee@O9{FKt1 MR6CHhpMjVG0N}bY3IG5A literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..703e34bb054c0d053bd76794553889783b60d2a5 GIT binary patch literal 2349 zcmb7G*>2lL6s2Tpv0^2TojoYPAPr(Q6_v$plcGpNi?l678%!#03A6;w8O!5v%goRV zU;7(*X!B5@U(x^IYoGc9eJF}1my~R)vVl61I2_*P+&gFP9m=j&D*}9cX9oX1CkTI} z50jrFJiLI5{R#sTOabLk-pzS=GoKT19?$%g`&s-&*e&c9%p#gGOGq@!L&2OK3aIcd zXI9`|g!=_lGUpIzkcd)U|Vk6Y6o95%*Dw}aJ6aeb`y2tqF2w<(shbrOCk>*<1F(mB?}%hO=v@bZMeK9Ws% z)lLV2o%RA>Zf3XtF=cdHZo=@2;Qa~HucmUbfxO8)6nF;Sh?5oKgyZxgj;NY+?u_W0 z@cQzMMYzOyy=yzKp&8`wR;lgbUYJ%roAA4-W^MG}o|7Z$vbZsZyGlo+>02OPpISv$QK8M) zen620=L$htIC;P@Re0LS5yv|5h-;^f@@ixe(D?azkvhaDUgWj0Kjb?n{@T9jkzTIjnX;~$+s$wWJDxU32&%pRQX2;kKU4Uc$k#Gft`t5{2cxR2y7h& zac*vAz9i0wd9hHQEmuS_pM!6{{67DW_+FeBOX+j*Uzk_L_jz&R`b%5{uk>3K3m*Vk Cjx7BE literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..9cf706a1bdf1b04f5952f36f3b13305f96ca2e06 GIT binary patch literal 988 zcmb7D&5qMB5O&&hw`9ABNAN9;)W)#lRKW_w?uwNV2YwFpl67M@brr{v?JO-gv51QKg0mOYt#-#6b(=;>*MV0~To`DGuW@9uKAAcmg7V;;iB&>XRV z^~yl@=Don3`(WFhaZ2kWEHy&{+&v%y=G9MLa5grfIvUg2C-OHnkMTA?bu zR2pBbX;r99^INVB&uXnUTMYY}=QfR^cPox>8eP`ZTCOW|gG*s7)~d1GV1P8(Dts&W zN0Z_!z>`XIEGmGOJCeHO)NpJ#pG6qf%G%n@2w^HWDf8@mx?D-ZEAlu!BUaTSH^e0q zpf@DC+)xQvW)@vFRqpkBS`Ydt#m^bTw8BExO4}L6ORXf9+l;fJ)PLk*cOfgD=c0idF6&yn6_@^U(C9jiVdz@u3A6YiP-${Z> ztQHFmgN)jf1D)Fa8*ONWzcKAdp)|C7_05&s(EqpKvM&an!Z(gQ2LjV8( literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..222ba2f335ef118bf88f82d0d8d01b3eb4001c8d GIT binary patch literal 613 zcmb7Cv5pfl5cPUg6g9~# z!8#Mt&Vi&9mRQ8#3u9&EpcHXk+3?M)PF&{_SLRDW(@!SL4ZODn4Eg zKYh5kd3x6>@&GYvTZVqO=?Z~*glMP>&7*^=yue}dmcvtIZMtAL+B@51Sg2qj*Csai zkLZ68-#+mk{(Qj^D&Vyqtha*#c&Q`5OT~W#TPbjp)%udIs)2Z<{B=RTZv!qHE<9{3fx%jKG@5R0xyBEtx-;KT#{qgAJ_}9iC zQzLvp00ck)1V8`;KmY_l00epn{PJeoXt&K~qn%EtGn&~jJEmUCrn9-#bZIq{ zPh?6j=1VW;iZ5g{ne|-p;$%pgeQQ%c=-i_ASxv8XjFxuLriWd#)$V8wy>4iA{k~Q+ z8hf2vex5R=Vy>8fWrBLTV0+4F2m4jMV`%%W=KTlSzR{|imM&ip8~I$Jc%D!XuiGBd zLd#yOd9Z&h8SB}6p?D!qo!k&k(j{+!YWgwDQ%rAc6h0iIj;`5`HoT4)p5t)Iucu2J zm!j0q$810A!p~j3W>P-QR$J4nRn2I%nk}tPt4`lD+P;W#6mn*BoI2aKofWl~ap%Bn z8Cs>;=opPo=fS?w)@aRVeO+WXHqymc$Eb@-wu^$dTpUoXxo0-C#zD=u)nu~y^?dG? zQR>64>vZ1h!(r3h@AwxaliMie&yP?Kc3r1)UJpiHH)}^VxpX0u-?$i|PVB~;wi~b8 z){fI^(xrT+n7bGbNy`^Dy%-rq%D3LU>)_QGU+&ZoZ+at_Eo8PsAxWj0s&%tLUF0;% zlh#b@0k3Dh(xH7*+pXz)TIE*LtoT=Ux>(2*);AUEic%J?vaTy3i}u@Af)s8VxhPepiF5FJ|GMqLDIQ&wwPU)DZ1r;bi=QdE^Mr?$H;F|GD^rM7~3J|NoeLp8OhlOzPwPFE>77#S4dSe3(-WFt2W8Xi6D9D|65G z9=7@Fb7X?~pI$4PcnCis!?W1Jsj>==yl<2XN#@#82v21fWX!jEBo3@O1;Sz(7D zI|PEk(NXOG53eeuf&d7B00@8p2!H?xfB*=900@A93@h`+SXmJN&pW3PBJ60TB4U2y}mJDx!XTRqnRUM%B2lA9QYM2W_LJ z?X{W*`)%votXe^ho|N*rLb{T!Xa^1RPQUr|`Kw!-*S8WkcDCQVv6a}~d2Q>XiDbXk z5l)kdD?5Xkl8JLkF3hYZpHC#YJgO&|>b^J`QTIx6S9eQbrS2Q8y4h}<%|=^u&siZh z@|8lRlr^}r0plrA3a|VDqeDD;#1CX)Md;B%#ji|6)Q?f|uMZP%d7`?@nQXdJ-Yxm- zo;;TB0cS@^wlgGC57Xljb#+yKG~Ln5HH)67vGmt-ROq?B`Re5@{~Dzgm@pe1W6x+M zcCK7c?A*9~Iq}BT?bkQ2-b`HDx|!I#asA5n4t4bU*3NZW?{*Uy%yo6^!&_IkcFu2I z^IVD{XN@HB8cV&(g>3I^U*F!meEFt`+Gd`9(Q`8~tA$Bfap z$IevuHW^X7!IJ!N$<;K_^xS*CTZ!!EnXXiG*+Mz(J^>75oe-LRo&yGKk98SOp#~hV zqFIr&Ne;Bp)WeTPBkJa+{OBdOhjJ49;1fC4b zw%*ulYISq3rFYnK+(1O2$8T~V{fTNs-``Ir?&__|ExmOvTPUQQXA_E*X+1oZX04e9 z9U7~8$LN@K!^xV${{MR&I$;k2AOHd&00JNY0w4eaAOHd&00K`RfmrZ@G%fv?L~h6T zW4|B$*RglUeq{8wN4_~S75;bn9zZ?th2YKL9|V3{emiiUntgyi!3*+No=8r2CKpk! zrQ~jjuQQ6(nYO_<qRU6NJuS7KOmvL< z9cP7zrg~-iEFry=4XamDvczeMMKroz+~i@cSGkty4UcEiVRdWau*~kVbH+Ix=}xXj z)Wt=)TX)w^`BE!4;b){5kel#CD{sAvYng(VqqUfv3jTsL)!P_zFND<#i$e=$tq)rz z zOA+K{feTccRfCmUOK0?QZoQzpdoXUUun_ID`QjQK)Ag}SLMz1AV$W~#CF@bEZUH_6A?9+lOLA6w^VOV9}S`2s`s&YqUv|`9a<}vYX9U^cVgbV zV=H9o)wV0ZCJbw>t$BY%74b*I-J=HyTCZcL|6ZuVV zOL1%mdvm^AF*b~HzqHdwNb^=08y73W&*2jLawJoq{HfFYC81BPd0T=bwO`RQzHPuU zf1(D^EZ;UN9R^N3U|Bas5#2KO=_aauSIzeIS9VWoHniQEzL!k2>w2w5-%m;$G}`7K zy&XAs(ZuzC)$uk?Mbru{%*~?;BWP=SsbJ{UjORU$ z{&N4&v5V2~^Ed?%dFYsNZ~OXC|oW!dZnY zXWwM+NM?Zqp{YwNijZoj3ys_&ZdnLzwuKPIf**=ei}_`RiLsNJ3U>ZXl%_4Fg8b_I zOXQu)^H6e}rZ2As#q}KvA;7X3vuuO{$3{rt;WMMuX5nm*X>bgf2p%{$LQ_|A0j|RR zmVHNx8})pITCS}JgdR76*$Po^?}14k;2Nbs0*L29*95JJ6nLZ)jO;Fdz9*HTDyER!;|TwY@Wy=F|F zW5eeE(nMdUMGyo)00ck)1V8`;KmY_l00ck)1VG?K5y1QZC#pJ87!Uvf5C8!X009sH r0T2KI5C8!X@Fjrxzb_Ug`k0?u^iR1p0bL?8o3AjbiSi&=m~3PUi1CZpd8-Xc##dNWz3XnXn- SR{b#FXd~MKw~U%UMEC&=Vlxl` literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..6db5b6e177720e753a20e30c539e7a354ba3728c GIT binary patch literal 1645 zcmZWp&2QT_6elT4mL11&hhgZ3b;}MrctfoX-LPT^iliyJk3$fw7!c^9$s%pbkwlfG zGRLq_>2?3X4#~0q60bY$U)X7nwDZ+cAo=tj`96N{@ul0_9R%ZQ;qgBxLjTyGy90P= zAEwf9kvB~mvz}T?Axrzc3|%@`U(yD|AJ*Sz@~jr*N37S=aaYCbbr>m{*9|z zREmQzki24C9s$`omSSFt`N8oonZ0^*$4ZC6WA$ zOU08KVm*)eNHjWs-SFtvl_;%iHLTBN3-pCHW}C|pQ|vgIh2nZxn!r4Ssq9$|nZCdP z2RT}Nyf^*!*(;q&y*m=(RB4Fzi@gY#(u1RbcuR7yt@N$yat9>FpYoy*U8~e;M_4|9 z^`2$xlbz1;H$X7F!i+GF(Z9)xXf(r1yd=#3i>y3Nmfp;}fa=q9O@W8O(c#%p8|`{lV9%?zHu z3rWwqnq+BFBpML2Fe&!}Auk=$BONS10p2}~EOr4*htWeIY=%9t4X}3ZeJwv|MyqUI9vpD)!Hwyc~FjHW0cA>rL2k2Z}2npC?Kc10t>Mb%GX}Xi40TFUb{Jc}vXjDUnYhR>!yb zzNAZXg)jXpgy9zRKz;&pYVX~V2Uf0Ix13q%(D9Fq57jI6;z1=EwF^mr?y>7whAJ)U zMgP7))PuJC2)r}_6WJ-3aX6NuOn7w`cQR3}t4$ei!nOPi&dJa1VuLgR=+%w7E{h<| zbS|p6owH=E%LG}G^Xk1FnLfxocGJp@)0xKKINv T66bFh+b^_}^l9jY?U4Qt0wRxO literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..2547c320e43cb5b7dee2af921b35e195f184e2fc GIT binary patch literal 201 zcmYe~<>g`k0?u^iR7)WJ7{oyaOhAqU5Elyoi4=wu#vF!R#wbQch7_h?22JLdKv4!w z##?N;`6;P6#eSMhw>VR>67$mY^-_|GK$=%F6tMs)F!9SxKO;XkRlgupx3oexIaNPB zvqawotUSIbwJf!$I5obYD8HgoKQ$@8v?Q~zG*v$-F*!RwEiDtM8e)fDLFFwD8z8$h OC)JJ-X!K_wW&i+(p)yne literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..1a97456eef9da171661409d821a569576d0993de GIT binary patch literal 403 zcmYjMu};H4486-GX$7go#0+DH_F%6nBtYua0k$kvn{$&u(hGN&(z3$O^lQ3jWkCD_ z6LzRXE!k(k^Ru7lz1|5!`$`4u@%^OY*gPz5(Crll#S|}C$z#qb_X@8Rv1s#uTqys8 z#l8w2SwH+n7VGmSG_X=&cD#uu&Q%X!E4{LiaQZ(O<+Sb=-F7iJT=&j#j5mEdA7$6$ z2^59CxO(Zw3j-GowmKZws%t72#~ZCp}2Yp9_) iJ-`_rX?#RlLaXU0(7>iUDz&N$7}MRBR7WD>k@pMuQe6B1 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..593cf1fcc373b7c9864ceda458a2fdd0e6e73e81 GIT binary patch literal 174 zcmYe~<>g`k0?u^iR1p0bL?8o3AjbiSi&=m~3PUi1CZpds literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..7af414290ca97308a06d768b01ba123ef1c954f6 GIT binary patch literal 162 zcmYe~<>g`kg1c$VsUZ3>h(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o6vVKO;XkRlgup zx3oexIaNPBvqaw|D={xUKfWlnEVZaOHNK!IzoJqj# literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..a98abcd8e33094fd48a1f2d117d431b2ae8c368c GIT binary patch literal 2306 zcmb7FOK;mo5T<165yf&GJFg}vz#Q^WT9K)frbf}Ep+#C2B1?iv#Vs!c#a+?s@MZ4O zj(P1L=nu%D&7nYV{XM+))IZQeQ8XP=vMtB~>WboWxij<4?6)&Rt6r~h@cYqOz`reW z-0#`T?5_+jFX5)Yz<@Y|Lj_cH3trJE7C2nQ3qKTo;(zA$OZz3Gj24Uv;*F}q8J8Rm zmEISO8a&JJyo@TwA_58GQ6{UsFOUMd{El}DMjb60OQ?>Pa2Z{>!=dGOMN%-XpsQ#F zbgrV+e7u&A*Ga+Qjb(JhxQcEXE8uMv?rZ3laUFeP+(5TAu5rf_3mjKd_ATED1d16W zzC(p^5D9n`#EcxoSO}wFAKOf<)!Nv{k;O0)M#sVflv_0|%!=4l^MMdkz!9df zPsKIyOR(MqR4<6IKzwlES&Rg}0Drbez$J0<=MVv|?J*Y8uO$fuHWep6P9m@aPr|+g zfD#KrVpHiPWN8A=_OLLHT~}}kWkN7M+mhuYaD+)D99nLS>HqN+;qi>4Kj3(|Mj_<~ z7TZfUrYsPjVmpp-(`h!>AKvv2o|^~sNrRBkyLU*}NActR^*AKa8hLd8k#ltaapQ39 z***8*`PyB*QAw^%U_?9cSwu!+PHM6`zZ!$bJ9CSf3HBK~4lzw`&Iu`|6lgv#@IYWW zU~zlig2BPq*>O;#HnQwD!FWt;3^6vRnjS&O#Ya|z#eC0%9gAAFd6;aU%95w^z|&B~ z8GCKAHe=N|?*vZW3w*JaKmJ3NMq{xB!)t<%W>mkLi^T#WXXB9J9XKR*o|H3&^P4!K zZPs{uLgkFrvyW`TCH9+rpc4v1{BAR{Jlqen3ZOG~OQ%IA#*s@CX^O+J7rIb)Vs;+b zM<;b5DtQU&Q!!0f@??0+OsE(e!U`hV;FE{*Fz2;Igh#QHJi35pgrO-=mV7qVJx$q+ z(~lr$TqjTFluvp5h{1`h!KalCx%EozDJidXcC@rA4+dsFtMmtYr{B|(+h>#=QHO|D z7y{GzF{TxS$5!mJ(;P>mGY08_OBjBV)L?NsZxqwA+G}@uYRdQIZ8gdoezG+edY(I> zMd?uxArra@LAg6|NO2^ytbAjJHR2K1%1Yw(L?eij7Z*j^CO+|EuZw+$?VZ_wdr|vI zsSKtuo&mhPC_pdva766$2qo+{W121u^;S}Wo)0A>C7(`Vfk`hw*rnnIaiFAvO@dw2 zYurpLrU~ubG}B55P17Z#s0h@iRnyEGO|~9k8n}lzEr-xod}dTPWKGS^I<0AHYe&`1 zSL*j^Nl`b3?X)g;yZv2NF}M1fuBA(zo~FYREI@*2X>GfsC|z||-ci%Voqk_8hdbR? zzqgrQ($(!jSJqW6UEbB&olL*mX~|hGrI!?0mov9odP^SaTjoI4wB7!WV!oEU9T4^* z1?ye8*B;7k)ok?@6#zTis%i8gWvW96xbww&FD+*?-GIn-KyGE;(-lSCl!sm21mwQC z*-^X7uUvE&SjdOJ+R|R&VJRfd_-)h1l0%rJNju(v5Q~8hn=HaFz}0u3(FOLfiLo5_73Rc-w=1czqwJaI` literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..4568ab10d6c1eb69551ec0fb8bb102aea399732b GIT binary patch literal 1200 zcmb7DyKdVs6qRK85yfdU^aBWVa0DbG8gw$!pheQ40g4WNEM62^y0+8w7kSpX9QUT#5Qj2wxssN^e zXn33-z z>9d5q%5%a>!bK&O84@y4QV_9BSygQ|*D_uF=_cM*U<=r(5I@CYXGep<@uses6mU#R zCg8=u;z1l;6in-rF&38Zu>MVjG&4|ENa7T4<-9?z|50P(6Q)y3auolj=(@~`I_KpS zO>p^aY4*Ce{#-j_2ui{0v9WLzlgY-);o7eCbtKmCt;kL6u`}hL)s71}rD)(b)4*;x z-a#BkKk*%SvEQ^=E_jI`w2sF?({}zeAzGzZ9d}Asof#B`q^oEw<*ha>yQQl(cAufE zo^4kl7j*R$+vye*J<~=FnQM>p^@8W=`t1B&{J80+c9o|1G+gT?XpvETtnh_+&Hj!7 zs%3YgG3Jw#3C}>`+xAr3?uMEhXhQ2#({}QjN48bdj1@&{wKd(1G~{&3+)=Z?(`es3 zb!Zvw^l(9KXVHqE)Qgi0=#(3J`G==TVT@0Yf39H%Ssh8WYGsG!u1ymV?EVc=14K`PfW=g|L>Hy+}_oaKwn6#-&D+qeo5s_BARsmhur#zG01sI_k%?_vHV zRr{D*_xB_6E`XJ4P_G9muv~dI+)CsX4zY5;QR{lc9{B8?TF|82G`)AbxxdG+L0k`A M=TR?w5/', 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 0000000000000000000000000000000000000000..c7e95fe6b9db4ae2c871d04a701fcc5c2494429d GIT binary patch literal 177 zcmYe~<>g`kf>};1sUZ3>h(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o10OKO;XkRlgup zx3oexIaNPBvqaw|D={xUKfWlnEVZaOHNK!IzoJq0tUQ!r%qG>=$T|Um zIjaKSB785PlC^+9f<%%T|Em#-PBD#o+=+Z3#ExpZ?oOKCZM$4dc z8LedPm8`u=awE}NLf5Rz=(@EG-d5nff^Jw>(MQ%bbkh*3x15JLL8xeZjz0<{hB+tx zh)KhMN)+#7%CH^M;LV`~?H(R*xl-A{KBf-GNa`O-cTi?obC5@TiE)SWiRK+CVt^%0 zpjYLG@|R$}4#-|Wu|#}u;yIiIz61~7CE%90_zQ>vS9UoM*;k5!f&r7qK8_+71fGI@ z1ppNugk->!qp+1RJm1CAFmheVC5%hK@MKwzkH8ToRN8mk2($m=i{jywqd#Dag=#Jl zyAI!t*Cs3wpW#77aqY>2&#Lxqd^>nnL+-=i`^VleLbZGJ;Qs3Ur~8LBAKmN6m|*(( z-AAiVSPP$-)na^Q3?mN$pHtG8Gg9M~+1Us@-kOL- z1Qs`EEjVnxcl>BZ z`IyTO7#zu}Vp3XD>o4`TmWWzo%Sg&9b#SFa}}+lHgu zwv$o_2c}E!2~3UkyKg@O>62q>Xx1?Y;`)O-P>x`JMHyk-qc&& zrfTX&vb1AtG*bO$qpqg;l+0_Ysitm?XVh>9*B@lqvTh;KqZe?WCCYOba460lA)fPnI=(UF|hZ8<0EpdP8q&zY6qI zU?FS%+E#W04=W+5MQ>^Ytc(a(w5-DIQ(2z=5?^7eoSr;AI{G2X;bBt#8nz^I@pJgk z3v3e_abaO@sU*&cd9hHQFIPk{pMyJJexLtad@nAErF2~U2l|WR`@A^y{wc12ReBf2 F!oQn+Au#{| literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..7e5ff04a8f233f35f99a89ea3fc2f3422179a67f GIT binary patch literal 146 zcmX@j%ge<81RhJ~r-A6lAOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdWvHK=pOUIylv+1{Q+K-YeIT>M8t=r8fnpjagAQV>>=iA-#xGR|WxWXYDwa$XK(*;dN2d@PU^ zJD!h&K4!O-)w~+5CGrUgT}5X69x~eqUXw%L`J}1dL-~}M0G>9Jz}w9f@Qy_#oBmrE zWwD=_@VrUaDO$5nv7f%ix%VYup6f6I$~YyCN$50)$s5#ND7y<2H$E?f{zHzVkKF?x ztRjN)*hG2B#Ch42^2(x|RebHTQJ8m&MXNxA$Jw>}B z#5ZSh1=uM^$sIx&(LFfMV$O66^MvXJ*KtUJTdtEcJdX`|i!=fM1WW~iwFA3{wvLR| zltWvo!{1$@T@8JqfdDKZ0lj#3dw{JX-qe|REs}4dtTbIcGCp_i;!SQ)-Z$gA^NhoR z`^R&zNTF0jV%jLVT_KD!@n0Y92JXk^h;6&{AjoNWSO>7XXghVd)-$}G8mTEGL0oTz zB-{ld{Rje78eYbxWXh)UtF$b&0xU_O-bYJ#NqQDri!{qJZ&WQ>l1uS@#_-uVB1T-m z7tsG(0vPe>>ghQsyH9dC&!yb3972bxq{4<~384m|e27#aEmjUPJD2lghFP|pYR4^J zzA$!b^44(qi_wwUtmLa-F+xSgef5UH*tae<0Y;_7Tu0PU15RJ@T*m#FM=gi@3MUJk zigRTZDoWUwE7bO5l|`JkAt=o9ySi_F52q&bVc6k z9ju+bRM#d}VlUGN9$deF{n5Y^vXTCH1;13=SBwY6`^E3uw>ytMns_|*^VE9hKusNZ zH*W&pAaCbEc)OIs{6S_!a6rqL3(J6(_7)mo+an4c`t}`2t15L}e#tY+)wF3r{ZpOU zm+lNtWo2Kf0F=J!MKJnF=ozcHs553~CE5lXg^)=hWNpzNOjJq)75zw92_{;B^#OxQ z?atJCFZ@xe-85z#u&buh%Bc@p?TSga>S$nnazo3$ z-+HvJjc#ZcUP9$hZD!8YGiNq4=jxerzh~Do z*Uc3%jzVCx$cD|q5G_r#-p#|ZFuli Pw}emZsww;#4m|${JM{cr5g18iL?6d$CJ#^LN1%EZ8b=*YrS@lzP6 z#1_HC#D)~HbmANZIO*=5pY`7P{9LcEF^cZv!`Tb<4|Dhps|2}EV8#R!JZ2-_=iFc` zwnlc}F7Q8Z-?P3mbv*aeh&`UIAS42C&a?Hd*6A^*R3-{SUYeU`mzg&R%$WYW6a1;f zC(N^Yx7+Qg)#*YU%jVI=X>u-i+W|4?kd9_m5U$3cv@)XR(hou@AV8P^Dj1|FZ>E8e z;U(Z8lt}`i9?B$`4B=Y&=`?dAzE3@O II6o|8Khe!%CIA2c literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..cc5749278fea00b14725686bb7ef64a4a904bdf0 GIT binary patch literal 144 zcmX@j%ge<81ZsQdr-A6lAOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdrLUiypOUIylvJmtkIamWj77{q769InB4_{r literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..686dc09b18cd486430f2b0d310d39974a9319e7e GIT binary patch literal 1736 zcmaJ>&2JM&6rc5ecx}f^S^|!%HeF*7btBsXl1d;KDfB|6DovB-VkC^?9mgB?t266{ zShmEW2Un`p-e}cIpo&UGNL3I012}NwvMc9+mgH0}z9Gzs6Eo{wXWgnDY2WC zV4*7bnAhUfIN|b|SQQoF8&FLsaUzp@d_f#i^99CBtXS43rqNWlA28m`Rok}KA+}5d zL$WC#Xeba7BqFG&2sZ511``BECpP#-^90-h_GC|C9tL;=6k@BL`AX~D<*QKBOnF1q zEleEbDrKTWGpahD4-&>^Z2Ga$kiB5bzHDO`uNLpH+x$H_@{ z|0AYp8)1BW#A7_-kq={<_R?h{oT)n~B4tK)r!4e@BR^dsv`y}t2s5(dH+#4m&q^Y~ zOow|B9}`O@3@sJY4zgRY7&c51 z!#e4_;xJDf74k#sZ+Mal+P-Ku6hm4A^!Ah(W+uBQLUeQj%}wcs{?Zr6r#2!dCf>%n z|0NG;EJIrU&g}RR$m6TvOLFJ5UcaU4ZCy5-a&T+8X(HKfsW_k!R(LL85KW>O;Np-L zrVuC3-G5-@Es|L^Y>&4PomgxmkF!-BdOX%3v=Hs`LLAZ3dNW~qYi*=?Zy9ZU3!<9Y ztOX%@Cj(Fm0SWgU{qBCSkUp{t;xDB3W zHv2PA-(7IT?8_K9^;ygj7hZ|r9r^CUPYb^@&SGVd{kSh3h-pWX@8|CsgHy|{w7f5V z^hy8;$&r@++Hfv@?yOyRYB$`q8}7yWV0p`xw)Vxw^X&Vfm6b;&=Zkgs%DTI_G01+| zm!ALI;0pnq$lX7F@A@FOCe*O*jYzBi)P5J3Mnt8?9`2IvqXP+i2k=G8u}0r{R4Tk0SC8CWH;J2 zMgmd$wLcr5g18iL?6d$CJ#^LN1%EZ8b=*YrS@lzP6 z#1_HC#D)~HbmANZIO*=5pY`7P{9LcEF^cZv!`Tb<4|Dhps|2}EV8#R!JZ2-_=iFc` zwnlc}F7Q8Z-?P3mbv*aeh&`UIAS42C&a?Hd*6A^*R3-{SUYeU`mzg&R%$WYW6a1;f zC(N^Yx7+Qg)#*YU%jVI=X>u-i+W|4?kd9_m5U$3cv@)XR(hou@AV8P^Dj1|FZ>E8e z;U(Z8lt}`i9?B$`4B=Y&=`?dAzE3@O II6o|8Khe!%CIA2c literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..2d28c5843f0ded8910fa1f2b9f1dbd268737c40a GIT binary patch literal 142 zcmX@j%ge<81nx`br-A6lAOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdrK_KupOUIylvg`kf>};1sUZ3>h(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o10OKO;XkRlgup zx3oexIaNPBvqaw|D={xUKfWlnEVZaOHNK!IzoJq!&YPibqR_0-t+j*;djruDMlaz^DO7`y;`}a!{+4S&nG{aA$Sv~0a?*>Oi3yPQAAVHR0@9PmIPrX8GjC0 z;Lw(7wu~<_8Kl(>dJtojL0wZaSj_-n#?)F;-N=m6&J5tqElf4qvP{X6VNzP-9{c#=x=9tQ>5)Fi{_TKGGswg4P0;QIQ?Mpvy?E8=e0*^Brj>- z-B%iIlwQzxZ!h0|xYJ3iXkpXB64r0ry1Oj4(yd3;l-rscQcjzC$JA81iGgUWn>21) z(Zxqg^y2-8^fJA8=ZhuS^IX7p$6Qr-cn` zWnH`#Qh=a-cvCdka z1RI8@$Nag0Y|JZlItWyZ0(55k!+)3>dV|iw?YV?^$4nngXr>$s&H``5X;T)DaehK|& zTDOO`$EE7^I_?XKx97ej7$M&x<*=KAqXM1w_3TFqHa#`rl{H1a=Un+9e zrytX{YcwTVY_)*#{&w1agd1X8HjnEYZJw}byp$yq-?c&@9L`fN+s78y@OhPe|cX2LCchfIi3J~bzXpCTfw?iKaJqUYPxOM?pif#`Qg0*t&_1n8NvdS ziiWUk&?{0CT1#7%u#AeS8QU)i@JbK_+uwqNSC%$)H&AN_1i?9E9J!7SP2Rz_uLb9e zYTAJnhGU)mwnH47t*}+$8T+m6&9N)BH9N`_3Z)G;Cp;~2RnCs(i(C~%Ab=v_?9h5X zmn*OvOog>0l~SoH)GCE+skmwftL%EYz*Jezj&E>ldB?tx&oWLu*})uBWt^~_J6#%&;tmfH5?ib>{^E&#F&eVam%tysMu^PQ9=~m}M;4zTgmhlt) z26#JPI0k(15Ir|Zl83Gk>G@}tATJ;Kh)Dd0!1qtyg|F>}ul*68e-~cZ3opD2FYbjG zyMbPeh*ijLsOKYs(XRK;INyyPh5QLuH+GZ=#9W|B67lQZNH0JnS#m#~*iX(LM5rUe zJ0I)0{mIZ_Fyi&~+_9*u8|+a;a``P02UKrtKSA%uXMcLU7r%Mvb;rTR+qan`f>Uqf ze9!Fyzd(Oc9$$PtzNicq7o%5QZ;9F74Ptt>8$F0jcY_Dvsczr^lJ@l?L~I5U4H1{_ L?GXw6I&kqX#+zty literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..23dd015eef2f2c329c4933590dba2c2fe21deb9a GIT binary patch literal 2321 zcmb7FOK;mo5T<16VZ}}yJFg~a!6IlAB^8MzZXQLEh8AgCh+Z%$yXBz-rCrJE@Ri-A z9rN0MQRL9(P@w%uy!O;T&_hu)9a6F_%K_^0vE1F6`DXUpnWeM1SP|g*aZSX(EeOKz z>0tUQ!r%qG>=$T|Um zIjaKSB785PlC^+9f<%%T|Em#-PBD#o+=+Z3#ExpZ?oOKCZM$4dc z8LedPm8`u=awE}NLf5Rz=(@EG-d5nff^Jw>(MQ%bbkh*3x15JLL8xeZjz0<{hB+tx zh)KhMN)+#7%CH^M;LV`~?H(R*xl-A{KBf-GNa`O-cTi?obC5@TiE)SWiRK+CVt^%0 zpjYLG@|R$}4#-|Wu|#}u;yIiIz61~7CE%90_zQ>vS9UoM*;k5!f&r7qK8_+71fGI@ z1ppNugk->!qp+1RJm1CAFmheVC5%hK@MKwzkH8ToRN8mk2($m=i{jywqd#Dag=#Jl zyAI!t*Cs3wpW#77aqY>2&#Lxqd^>nnL+-=i`^VleLbZGJ;Qs3Ur~8LBAKmN6m|*(( z-AAiVSPP$-)na^Q3?mN$pHtG8Gg9M~+1Us@-kOL- z1Qs`EEjVnxcl>BZ z`IyTO7#zu}Vp3XD>o4`TmWWzo%Sg&9b#SFa}}+lHgu zwv$o_2c}E!2~3UkyKg@O>62q>Xx1?Y;`)O-P>x`JMHyk-qc&& zrfTX&vb1AtG*bO$qpqg;l+0_Ysitm?XVh>9*B@lqvTh;KqZe?WCCYOba460lA)fPnI=(UF|hZ8<0EpdP8q&zY6qI zU?FS%+E#W04=W+5MQ>^Ytc(a(w5-DIQ(2z=5?^7eoSr;AI{G2X;bBt#8nz^I@pJgk z3v3e_abaO@sU*&cd9hHQFIPk{pMyJJexLtad@nAErF2~U2l|WR`@A^y{wc12ReBf2 F!oQn+Au#{| literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..c55b59003dca84e5abd91573a2eecc0135be4751 GIT binary patch literal 1108 zcmb7D&ui2`6rN<0b~j5~p-==pjHlf|&0y~2bCCd_1Ow>QCq z$KE`87XJsqtDZ^^g@7mV;H{;2>B%?Qgsufa2a>!@zI^X{-<$V!VZlSNK7V;X_~an; z-MrMxt%9>X2;L!z`iNT8PAzWtZOg=sw85ReQ^ro}^0~fiAsaD=y3E~Ktcfn3AMI&e zV&(vI<>Ff%)tI5(Z%yX?X7mPr@?JiFieo7T$#ATqJdpwqq{52rGNoCVDY-YnaNl8Z z9(dl15yM+!m1a?%GbQvEP7|GDCC53_7`QafCEiWgD;?ksAmUOnoCx6LQ}!%nk!Dyk z*7Go|QJ!bIM+lX%4(LuKhO$l2WwKL@LFVrT`f)dXSLg@91<|F&eSm* zC2z;~y`ScU`c~malqUiL$2e}D;E~>+8?iK%WWS}MnOX`>p7~xeABJ#b!mwDZR6=pN zO14!4$cpxibOrN=iX{~ZDtTCwC^LnHTXGl8dbeoLwEhD+0}ML%Nh~QNf6T z@Ziyl7wJdwQc(~V1Vub}Q*!Ic*`}ebb9nRKJbr)PV?M5|5adqh{k!-LM(Af%EKcn_ zneDjbEfQ#e1Qwpe1MF^JdYM1)F#V5l7dox`}4d`AN1hH{!| zu`A)8bOe%4c#)p96wg4=;gILKOe1bnt%gI#x9PMpT>wp$lg-W=R4YfG8XBh(?otCl zM%L!$5o1C}CJ5PG54}%A6r1z|50&=OR87Ry4Op-G4yBfCF#^tR9Y*@X8 zmu!@+_2*A}ovpCHvAx~xb^77Ut@T$gHV#@>b`Th_HdTpf*UNesIwN6NdfJpX=5~U} zO%YV&h419bI;crnXjKvi6cF=WY0JhX-4AG1`8sX0NDE+B#Qv)))*zprE/', 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 "--------------"