+{% endblock %}
\ No newline at end of file
diff --git a/app/utils/utils.py b/app/utils/utils.py
new file mode 100644
index 0000000..1c9e0ce
--- /dev/null
+++ b/app/utils/utils.py
@@ -0,0 +1,65 @@
+import re
+from markdown import Markdown
+from markdown.extensions import Extension
+from markdown.preprocessors import Preprocessor
+
+class GithubAdmonitionPreprocessor(Preprocessor):
+ ADMONITION_PATTERN = re.compile(r'^!(?PNOTE|TIP|IMPORTANT|WARNING|CAUTION)\s*(?P.*?)$', re.MULTILINE)
+
+ def run(self, lines):
+ new_lines = []
+ i = 0
+ while i < len(lines):
+ line = lines[i]
+ match = self.ADMONITION_PATTERN.match(line)
+ if match:
+ admonition_type = match.group('type').lower()
+ title = match.group('title').strip()
+
+ # Start the div with appropriate classes
+ new_lines.append(f'
')
+
+ # Add the title if provided, otherwise use the type
+ if title:
+ new_lines.append(f'
{admonition_type.capitalize()}
')
+ else:
+ new_lines.append(f'
{admonition_type.capitalize()}
')
+
+ # Find the content of the admonition
+ i += 1
+ content_lines = []
+ while i < len(lines) and lines[i].strip() and not self.ADMONITION_PATTERN.match(lines[i]):
+ content_lines.append(lines[i])
+ i += 1
+
+ # Add content and close the div
+ if content_lines:
+ new_lines.append('
' + ' '.join(content_lines) + '
')
+ new_lines.append('
')
+
+ # If we reached the end of the content or an empty line, don't increment i again
+ if i >= len(lines) or not lines[i].strip():
+ continue
+ else:
+ new_lines.append(line)
+ i += 1
+
+ return new_lines
+
+class GithubAdmonitionExtension(Extension):
+ def extendMarkdown(self, md):
+ md.preprocessors.register(GithubAdmonitionPreprocessor(md), 'github_admonition', 175)
+
+def convert_markdown_to_html(markdown_text):
+ # Create Markdown instance with GitHub-style admonitions
+ md = Markdown(extensions=[
+ 'markdown.extensions.fenced_code',
+ 'markdown.extensions.tables',
+ 'markdown.extensions.nl2br',
+ GithubAdmonitionExtension(),
+ # Add other extensions you need
+ ])
+
+ # Convert markdown to HTML
+ html = md.convert(markdown_text)
+ return html
\ No newline at end of file
diff --git a/uploads/README.md b/uploads/README.md
new file mode 100644
index 0000000..6feec31
--- /dev/null
+++ b/uploads/README.md
@@ -0,0 +1,114 @@
+# ReDeploy Docker Application
+
+A lightweight, self-hosted Docker tool to deploy Git-hosted sites locally. Clone, build, and deploy Hugo, Go, or Node.js sites with custom commands, branch selection, and private repo access. Detect changes and auto-redeploy — a flexible alternative to SaaS tools like Cloudflare Pages or GitHub Pages.
+
+## Features
+
+- 🚀 Easy deployment of Hugo sites in Docker containers
+- 🔒 Support for both public and private Git repositories
+- 🛠 Custom build commands (npm, Hugo, etc.)
+- 🌐 Automatic network binding for container access
+- 🔄 Flexible command execution with proper error handling
+- 🔄 Automatic pulling of the latest changes from the repository
+
+## Prerequisites
+
+- Docker
+- Docker Compose
+- Git (for building from source)
+
+## Quick Start
+
+### Using Docker Compose
+
+1. Create a `docker-compose.yml` file:
+
+```yaml
+services:
+ redeploy:
+ image: ghcr.io/pik4li/redeploy:latest
+ ports:
+ - "1313:1313"
+ env_file:
+ - .env
+```
+
+2. Create/Edit the `.env` file (**[available variables](#environment-variables)**):
+
+```bash
+# required
+REPO=https://github.com/your/hugo/repo # leading https:// is not required!
+
+# optional
+BRANCH=main # Optional: for branch selection
+GIT_TOKEN="your_github_token" # Optional: for private repositories
+COMMAND="npm install && npm run dev" # Optional: custom build command
+CHECK_INTERVAL=300 # Optional: interval in seconds to check for updates
+```
+
+3. Run the container:
+
+```bash
+docker compose up
+```
+
+4. Access the site at `http://localhost:1313` or `http://localhost:8080` (if you have a different port)
+
+5. If you have a reverseproxy already running, you can point it to the container's port to have a local cloudflare pages like experience with automatic redeployment.
+
+
+## Environment Variables
+
+| Variable | Required | Description | Example | Default value |
+| -------------- | -------- | --------------------------------------------- | ------------------------------ | ------------------------------------------------ |
+| REPO | Yes | URL of the Git repository | `https://github.com/user/repo` | - |
+| BRANCH | No | The branch to use for cloning the site | `main` | main |
+| GIT_TOKEN | No | Authentication token for private repositories | `ghp_xxxxxxxxxxxx` | - |
+| COMMAND | No | Custom build/run command | `npm install && npm run dev` | `hugo server -D --noHTTPCache --disableFastRender` |
+| CHECK_INTERVAL | No | Interval in seconds to check for updates | `300` | 300 |
+
+## Custom Commands
+
+The application supports various custom commands that will automatically be configured for proper network binding:
+
+### Command Examples
+
+- `npm install && npm run dev`
+- `hugo server -D`
+- `hugo server`
+- `hugo server -D`
+
+## Docker Compose Examples
+
+### Basic Example with .env file
+
+```yaml
+services:
+ redeploy:
+ image: ghcr.io/pik4li/redeploy:latest
+ ports:
+ - "1313:1313"
+ env_file:
+ - .env
+```
+
+> [!IMPORTANT]
+> The `.env` file is required for the container to work.
+> You can find the proper variables in the [Environment Variables](#environment-variables) section.
+
+---
+
+### Example without .env file
+
+```yaml
+services:
+ redeploy:
+ image: ghcr.io/pik4li/redeploy:latest
+ ports:
+ - "1313:1313"
+ environment:
+ - REPO="https://github.com/your/hugo/repo"
+ - GIT_TOKEN="your_github_token"
+ - COMMAND="npm install && npm run dev"
+ - CHECK_INTERVAL="10"
+```
diff --git a/uploads/docker-list.md b/uploads/docker-list.md
new file mode 100644
index 0000000..2c28d6b
--- /dev/null
+++ b/uploads/docker-list.md
@@ -0,0 +1,760 @@
+
+
+
+
+
+ azubis/docker.md at main - docker/azubis - Jarvis-Git: Beyond coding. We code.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Hier wird zumindest einer benötigt, um SSL-Verschlüsselung und HTTPS auf den Websites zu aktivieren Caddy ist zwar an sich einfacher, weil es nur eine einzige config datei hat, aber zum lernen würde ich den nginxproxymanager empfehlen, da er eine kleine webui hat und man das konzept so gut lernen und verstehen kann
filebrowser und mydrive sind zwei sehr einfache file share services, die mit einer schönen kleinen Weboberfläche kommen
+Nextcloud ist etwas mächtiger, zwar auch deutlich hübscher und mit Android/iOS app etc. Aber eben auch etwas komplexer. Ist aber machbar
+PaperlessNGX ist ein Dokumentenspeichersystem, hauptsächlich für pdf dateien. Ich lasse mir dort täglich und regelmäßig aus meinen Mailpostfächern die .pdf Dateien, die als Rechnung deklariert sind automatisch in mein System einspielen. Automatisierungstechnisch ein Traum!
doozle <- docker dashboard for log and error management
+
+
notifications
+
+
ntfy <- ich nutze diun in kombination mit ntfy, um genau zu wissen, wann neue updates verfügbar sind
+
+
ntfy benachrichtigt mich auch IMMER wenn per ssh ein login stattfindet, somit weiß ich SOFORT wenn etwas nicht stimmt, und jemand sich ohne mein wissen einloggt
+
+
+
+
plug and play
+
+
Whoogle <- Selbst gehostetes und privates google-frontend
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uploads/docker.md b/uploads/docker.md
new file mode 100644
index 0000000..31d77ae
--- /dev/null
+++ b/uploads/docker.md
@@ -0,0 +1,78 @@
+# Nice containers for beginners
+
+#### **Quellen**
+
+- [selfh.st](https://selfh.st/apps/) <- viele opensource projekte (einige davon dockerized)
+- [Awesome Docker](https://github.com/veggiemonk/awesome-docker)
+
+## **Reverseproxies:**
+
+> [!TIP]
+> Hier wird zumindest einer benötigt, um SSL-Verschlüsselung und HTTPS auf den Websites zu aktivieren Caddy ist zwar an sich einfacher, weil es nur eine einzige config datei hat, aber zum lernen würde ich den nginxproxymanager empfehlen, da er eine kleine webui hat und man das konzept so gut lernen und verstehen kann
+
+- [Nginx Reverseproxy-Manager](https://nginxproxymanager.com/guide/)
+- [Caddy](https://hub.docker.com/_/caddy/)
+
+## **Dashboards:**
+
+> Pick whatever you like. Homepage wird in einer config datei (yml) konfiguriert. Daher würde ich Dashy oder Flame eher für den Anfang empfehlen
+
+- [Dashy](https://github.com/Lissy93/dashy)
+- [Flame](https://github.com/pawelmalak/flame)
+- [Homepage](https://gethomepage.dev/)
+
+## **DNS**
+
+- [PiHole](https://docs.pi-hole.net/docker/)
+- [AdGuardHome](https://github.com/AdguardTeam/AdGuardHome#getting-started)
+
+## **Documentation (Wikis)**
+
+> [!TIP]
+> Markdown sollte hierbei ein Begriff sein. Einfach zu lernen mit vielen starken optionen zum styling
+
+- [Memos](https://www.usememos.com/) <- Einfach memos
+- [DocMost](https://docmost.com/)
+- [BookStack](https://github.com/linuxserver/docker-bookstack)
+
+## **Document-Management:**
+
+> filebrowser und mydrive sind zwei sehr einfache file share services, die mit einer schönen kleinen Weboberfläche kommen
+> Nextcloud ist etwas mächtiger, zwar auch deutlich hübscher und mit Android/iOS app etc. Aber eben auch etwas komplexer. Ist aber machbar
+> PaperlessNGX ist ein Dokumentenspeichersystem, hauptsächlich für pdf dateien. Ich lasse mir dort täglich und regelmäßig aus meinen Mailpostfächern die .pdf Dateien, die als Rechnung deklariert sind automatisch in mein System einspielen. Automatisierungstechnisch ein Traum!
+
+- [filebrowser](https://github.com/hurlenko/filebrowser-docker)
+- [my-drive](https://github.com/subnub/myDrive)
+- [nextcloud](https://hub.docker.com/_/nextcloud)
+- [PaperlessNGX](https://docs.paperless-ngx.com/setup/#docker)
+
+- [Immich](https://immich.app/docs/install/docker-compose) <- google photos clone, für zuhause! (Bessere Suchfunktion, Personenerkennung, Geodaten auf einer Map...)
+
+## **Git**
+
+- [GiTea](https://docs.gitea.com/next/installation/install-with-docker) <- Ressourceneffizienteste Option || Basis Funktionen
+- [OneDev](https://onedev.io/) <- Eher für DevOps gedacht, direkte CI/CD integration
+- [GitLab](https://docs.gitlab.com/install/docker/) <- Business option, meiner Meinung nach das hübscheste, allerdings auch das ressourcenintensivste
+
+## **Sonstige**
+
+### **Passwormanager**
+
+- [vaultwarden](https://github.com/dani-garcia/vaultwarden) <- das ist vaultwarden. Bitwarden + ohne zu Zahlen ^^
+
+### **docker helpers**
+
+- [diun](https://crazymax.dev/diun/) <- UpdateCheker with push notifications
+- [doozle](https://dozzle.dev/) <- docker dashboard for log and error management
+
+### **notifications**
+
+- [ntfy](https://ntfy.sh/) <- ich nutze diun in kombination mit ntfy, um genau zu wissen, wann neue updates verfügbar sind
+ > ntfy benachrichtigt mich auch _*IMMER*_ wenn per ssh ein login stattfindet, somit weiß ich SOFORT wenn etwas nicht stimmt, und jemand sich ohne mein wissen einloggt
+
+### **plug and play**
+
+- [Whoogle](https://github.com/benbusby/whoogle-search) <- Selbst gehostetes und privates google-frontend
+- [Excalidraw](https://hub.docker.com/r/excalidraw/excalidraw)
+- [PDF-Tools](https://github.com/Stirling-Tools/Stirling-PDF) <- Alles rund um pdf themen
+- [IT-Tools](https://github.com/CorentinTh/it-tools) <- Geile it-tools, gerne hier mal anschauen [Mein IT-Tools](https://it-tools.k4li.de/)
diff --git a/uploads/uri_map.json b/uploads/uri_map.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/uploads/uri_map.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file