chore: prepare official supabase self-host setup

This commit is contained in:
Philipp
2026-06-09 21:48:31 +02:00
parent 310573e3ea
commit 206dc48403
7 changed files with 93 additions and 10 deletions
+9 -4
View File
@@ -8,9 +8,13 @@ WORKER_CONCURRENCY=5
CONSOLE_PROXY_ADDR=:8081 CONSOLE_PROXY_ADDR=:8081
# Supabase/Postgres # Supabase/Postgres
DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable DATABASE_URL=postgres://postgres:postgres@localhost:54322/postgres?sslmode=disable
SUPABASE_JWKS_URL=http://localhost:54321/auth/v1/.well-known/jwks.json SUPABASE_URL=http://localhost:8000
SUPABASE_ISSUER=http://localhost:54321/auth/v1 SUPABASE_AUTH_EXTERNAL_URL=http://localhost:8000/auth/v1
SUPABASE_JWKS_URL=http://localhost:8000/auth/v1/.well-known/jwks.json
SUPABASE_ISSUER=http://localhost:8000/auth/v1
SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
# Redis/asynq # Redis/asynq
REDIS_ADDR=localhost:6379 REDIS_ADDR=localhost:6379
@@ -21,5 +25,6 @@ MASTER_KEY_BASE64=
# Frontend # Frontend
VITE_API_BASE_URL=http://localhost:8080 VITE_API_BASE_URL=http://localhost:8080
VITE_SUPABASE_URL=http://localhost:54321 VITE_SUPABASE_URL=http://localhost:8000
VITE_SUPABASE_ANON_KEY= VITE_SUPABASE_ANON_KEY=
APP_SITE_URL=http://localhost:5173
+1
View File
@@ -17,6 +17,7 @@ node_modules/
dist/ dist/
frontend/dist/ frontend/dist/
frontend/.vite/ frontend/.vite/
*.tsbuildinfo
# Logs # Logs
*.log *.log
+1
View File
@@ -4,3 +4,4 @@
- E0-T01 begonnen: Monorepo-Grundstruktur, Root-Dokumentation, Env-Beispiel und minimale Service-Startpunkte angelegt. - E0-T01 begonnen: Monorepo-Grundstruktur, Root-Dokumentation, Env-Beispiel und minimale Service-Startpunkte angelegt.
- Annahme dokumentiert: vorlaeufiger Modulpfad ist `proxui`. - Annahme dokumentiert: vorlaeufiger Modulpfad ist `proxui`.
- E0-T02 vorbereitet: Makefile-Targets und ESLint-Config angelegt; fehlgeschlagener reduzierter Supabase-Compose wurde entfernt, naechster Ansatz ist die offizielle Supabase-Self-Hosted-Konfiguration.
+37
View File
@@ -0,0 +1,37 @@
SHELL := /bin/sh
GOCACHE ?= $(CURDIR)/.tmp/go-build
GO := env GOCACHE=$(GOCACHE) go
COMPOSE := docker compose
.PHONY: dev dev-down dev-logs migrate test lint build frontend-build verify clean
dev:
@echo "Dev infrastructure is not configured yet. Next step: official Supabase self-host stack."
dev-down:
@echo "No dev infrastructure is configured."
dev-logs:
@echo "No dev infrastructure is configured."
migrate:
@echo "No migrations configured yet. E2-T01 will wire golang-migrate."
test:
env GOCACHE="$(GOCACHE)" go test ./backend/... ./worker/... ./console-proxy/...
lint:
env GOCACHE="$(GOCACHE)" go vet ./backend/... ./worker/... ./console-proxy/...
npm run lint --prefix frontend
build:
env GOCACHE="$(GOCACHE)" go build ./backend/cmd/api ./worker/cmd/worker ./console-proxy/cmd/console-proxy
frontend-build:
npm run build --prefix frontend
verify: lint test build frontend-build
clean:
rm -rf frontend/dist ".tmp/go-build"
+12 -4
View File
@@ -19,11 +19,19 @@ Multi-Tenant-Konsole fuer Proxmox auf Basis von Go, Supabase Postgres/Auth, Redi
4. `.env.example` nach `.env` kopieren und lokale Werte setzen. 4. `.env.example` nach `.env` kopieren und lokale Werte setzen.
5. Abhaengigkeiten installieren: `npm install --prefix frontend`. 5. Abhaengigkeiten installieren: `npm install --prefix frontend`.
6. Go-Abhaengigkeiten installieren: `go work sync`. 6. Go-Abhaengigkeiten installieren: `go work sync`.
7. Backend starten: `go run ./backend/cmd/api`. 7. Lokale Infrastruktur starten: wird mit der offiziellen Supabase-Self-Hosted-Konfiguration ergaenzt.
8. Console-Proxy starten: `go run ./console-proxy/cmd/console-proxy`. 8. Backend starten: `go run ./backend/cmd/api`.
9. Frontend starten: `npm run dev --prefix frontend`. 9. Console-Proxy starten: `go run ./console-proxy/cmd/console-proxy`.
10. Frontend starten: `npm run dev --prefix frontend`.
`make dev`, `make migrate`, `make test` und `make lint` werden mit E0-T02 angelegt, sobald die lokale Docker-Umgebung steht. Aktuelle Targets:
- `make test`: Go-Tests
- `make build`: Go-Builds
- `make frontend-build`: Frontend-Production-Build
- `make lint`: Go Vet und Frontend-ESLint
- `make verify`: Lint, Tests und Builds
- `make migrate`: Platzhalter bis E2-T01 `golang-migrate` einbindet
## Sicherheitsregeln ## Sicherheitsregeln
+11 -2
View File
@@ -10,10 +10,16 @@ Arbeitsliste auf Basis von `proxmox-console-entwicklungsplan.md`. Die Entwurfsda
- [x] Minimale Startpunkte fuer Backend, Worker, Console-Proxy und Frontend angelegt - [x] Minimale Startpunkte fuer Backend, Worker, Console-Proxy und Frontend angelegt
- [x] Lokale Toolchain geprueft: Go 1.26.4 ist im PATH - [x] Lokale Toolchain geprueft: Go 1.26.4 ist im PATH
- [x] Erste Build-/Test-Kommandos ausgefuehrt - [x] Erste Build-/Test-Kommandos ausgefuehrt
- [ ] E0-T02: Lokale Dev-Umgebung mit offizieller Supabase-Self-Hosted-Konfiguration und Redis
- [x] `Makefile` mit `dev`, `migrate`, `test`, `lint`, `build`, `frontend-build`, `verify` angelegt
- [x] Reduzierten Supabase-Compose-Versuch entfernt
- [ ] Offizielle Supabase-Self-Hosted-Dateien einbinden
- [ ] Projekt-spezifische ENV-Datei aus offizieller Vorlage ableiten
- [ ] Infrastruktur testweise starten
- [ ] Healthchecks/Erreichbarkeit pruefen
## Naechste Aufgaben ## Naechste Aufgaben
- [ ] E0-T02: Lokale Dev-Umgebung mit Docker Compose, Supabase-nahem Postgres/Auth-Setup und Redis
- [ ] E0-T03: CI-Pipeline mit Build, Lint, Tests und Secret-Scan - [ ] E0-T03: CI-Pipeline mit Build, Lint, Tests und Secret-Scan
- [ ] E0-T04: Konfigurations- und Logging-Layer fuer Go-Dienste - [ ] E0-T04: Konfigurations- und Logging-Layer fuer Go-Dienste
- [ ] E2-T01: Migrations-Setup mit `golang-migrate` - [ ] E2-T01: Migrations-Setup mit `golang-migrate`
@@ -34,7 +40,7 @@ Arbeitsliste auf Basis von `proxmox-console-entwicklungsplan.md`. Die Entwurfsda
## Annahmen ## Annahmen
- Modulpfad vorlaeufig: `proxui`. Falls spaeter ein Git-Remote/Org-Name feststeht, wird der Go-Modulpfad angepasst. - Modulpfad vorlaeufig: `proxui`. Falls spaeter ein Git-Remote/Org-Name feststeht, wird der Go-Modulpfad angepasst.
- Bis die Supabase-CLI-Konfiguration festgelegt ist, startet die lokale Datenbank zuerst als normaler Postgres-Service plus Redis. - Supabase wird lokal nicht mehr per reduziertem Eigenbau gestartet; naechster Ansatz ist die offizielle Self-Hosted-Konfiguration.
- UI-Texte werden Deutsch, Code-Identifier Englisch. - UI-Texte werden Deutsch, Code-Identifier Englisch.
## Verifikation ## Verifikation
@@ -44,3 +50,6 @@ Arbeitsliste auf Basis von `proxmox-console-entwicklungsplan.md`. Die Entwurfsda
- 2026-06-09: `go build ./backend/cmd/api ./worker/cmd/worker ./console-proxy/cmd/console-proxy` erfolgreich. - 2026-06-09: `go build ./backend/cmd/api ./worker/cmd/worker ./console-proxy/cmd/console-proxy` erfolgreich.
- 2026-06-09: `npm install --prefix frontend` erfolgreich; 0 Vulnerabilities. - 2026-06-09: `npm install --prefix frontend` erfolgreich; 0 Vulnerabilities.
- 2026-06-09: `npm run build --prefix frontend` erfolgreich. - 2026-06-09: `npm run build --prefix frontend` erfolgreich.
- 2026-06-09: `make verify` erfolgreich.
- 2026-06-09: Orbstack geprueft: Docker-Kontext `orbstack`, Engine `OrbStack`, Architektur `aarch64`, Docker `29.4.0`.
- 2026-06-09: Reduzierter Supabase-Compose-Versuch entfernt; lokale Container und Volumes per `docker compose down -v --remove-orphans` geloescht.
+22
View File
@@ -0,0 +1,22 @@
import js from "@eslint/js";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
ignores: ["dist/**", "node_modules/**"]
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ["src/**/*.{ts,tsx}", "*.ts"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
document: "readonly",
console: "readonly",
window: "readonly"
}
}
}
);