Add PunktFri Flask landing page
- Landing page with hero, problemet, målgruppe, idé, disclaimer sections - Signup form → SQLite + file log (navn, email, domæner, egne_ns, kommentar) - /tak confirmation page - /admin with HTTP Basic Auth - /health endpoint - Mobile-first minimal CSS, Danish throughout - Honest 'under undersøgelse' framing — no premature organisational claims
This commit is contained in:
45
README.md
45
README.md
@@ -0,0 +1,45 @@
|
||||
# PunktFri.dk
|
||||
|
||||
Flask landing page for PunktFri — a Danish non-profit registrar initiative for self-hosters.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python app.py
|
||||
```
|
||||
|
||||
Visit `http://localhost:5000`
|
||||
|
||||
## Environment variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `PORT` | `5000` | Port to listen on |
|
||||
| `DATABASE` | `punktfri.db` | SQLite database path |
|
||||
| `LOG_FILE` | `signups.log` | Signup log file path |
|
||||
| `ADMIN_USER` | `admin` | Admin username |
|
||||
| `ADMIN_PASS` | `punktfri2024` | Admin password |
|
||||
|
||||
Change `ADMIN_USER` and `ADMIN_PASS` before deploying publicly.
|
||||
|
||||
## Routes
|
||||
|
||||
- `/` — Landing page + signup form
|
||||
- `/tak` — Confirmation page after signup
|
||||
- `/admin` — Signup table (HTTP Basic Auth)
|
||||
- `/health` — Health check (returns `{"status": "ok"}`)
|
||||
|
||||
## Data
|
||||
|
||||
Signups are stored in two places:
|
||||
- **SQLite** (`punktfri.db`) — queryable, used by `/admin`
|
||||
- **Log file** (`signups.log`) — append-only plaintext log
|
||||
|
||||
Both are created automatically on first run.
|
||||
|
||||
## Admin
|
||||
|
||||
Visit `http://localhost:5000/admin` and enter the credentials above.
|
||||
|
||||
Reference in New Issue
Block a user