Add Docker deployment setup for web app
This commit is contained in:
10
.dockerignore
Normal file
10
.dockerignore
Normal file
@@ -0,0 +1,10 @@
|
||||
.git
|
||||
.venv
|
||||
__pycache__
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
*.log
|
||||
build/
|
||||
*.ics
|
||||
*.pdf
|
||||
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY web/requirements-web.txt /app/web/requirements-web.txt
|
||||
RUN pip install --no-cache-dir -r /app/web/requirements-web.txt
|
||||
|
||||
COPY . /app
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["python", "-m", "uvicorn", "web.app:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
@@ -36,6 +36,12 @@ Browser-Variante mit Upload + direktem ICS-Download:
|
||||
|
||||
Details siehe [WEB_README.md](WEB_README.md).
|
||||
|
||||
Docker-Variante (Server):
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ⚡ Schnellstart (60 Sekunden)
|
||||
|
||||
@@ -16,6 +16,53 @@ Danach im Browser öffnen:
|
||||
- Lokal: `http://localhost:8000`
|
||||
- Im Netzwerk (z. B. Smartphone): `http://<IP-des-Rechners>:8000`
|
||||
|
||||
## Docker (Server ohne VPN)
|
||||
|
||||
Diese Variante ist für deinen aktuellen Wunsch geeignet: öffentlich erreichbar ohne VPN.
|
||||
|
||||
### 1) Starten
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
Aufruf:
|
||||
- Direkt per IP/Port: `http://<SERVER-IP>:8000`
|
||||
- Oder mit Domain über Reverse Proxy (empfohlen)
|
||||
|
||||
### 2) Status und Logs
|
||||
|
||||
```bash
|
||||
docker compose ps
|
||||
docker compose logs -f pdf-to-ics-web
|
||||
```
|
||||
|
||||
### 3) Stoppen / Update
|
||||
|
||||
```bash
|
||||
docker compose down
|
||||
git pull
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
### 4) Optional: App-Login aktivieren
|
||||
|
||||
In `docker-compose.yml` die beiden Variablen aktivieren:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
- WEB_AUTH_USER=kalender
|
||||
- WEB_AUTH_PASSWORD=BitteSicheresPasswortSetzen
|
||||
```
|
||||
|
||||
Dann neu starten:
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
Hinweis: Ohne VPN ist mindestens HTTPS + Basic Auth empfohlen, wenn die App öffentlich im Internet hängt.
|
||||
|
||||
## Funktionen
|
||||
|
||||
- PDF-Datei hochladen
|
||||
|
||||
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
pdf-to-ics-web:
|
||||
build: .
|
||||
container_name: pdf-to-ics-web
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
# Optional aktivieren für App-Login:
|
||||
# - WEB_AUTH_USER=kalender
|
||||
# - WEB_AUTH_PASSWORD=BitteSicheresPasswortSetzen
|
||||
Reference in New Issue
Block a user