Core infrastructure: - Uber fx dependency injection - Chi router with middleware stack - SQLite database with embedded migrations - Embedded templates and static assets - Structured logging with slog Features implemented: - Authentication (login, logout, session management, argon2id hashing) - App management (create, edit, delete, list) - Deployment pipeline (clone, build, deploy, health check) - Webhook processing for Gitea - Notifications (ntfy, Slack) - Environment variables, labels, volumes per app - SSH key generation for deploy keys Server startup: - Server.Run() starts HTTP server on configured port - Server.Shutdown() for graceful shutdown - SetupRoutes() wires all handlers with chi router
61 lines
2.1 KiB
HTML
61 lines
2.1 KiB
HTML
{{define "base"}}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="robots" content="noindex, nofollow">
|
|
<title>{{block "title" .}}upaas{{end}}</title>
|
|
<link rel="stylesheet" href="/s/css/tailwind.css">
|
|
</head>
|
|
<body class="bg-gray-50 min-h-screen">
|
|
{{block "content" .}}{{end}}
|
|
<script src="/s/js/app.js"></script>
|
|
</body>
|
|
</html>
|
|
{{end}}
|
|
|
|
{{define "nav"}}
|
|
<nav class="app-bar">
|
|
<div class="max-w-6xl mx-auto flex justify-between items-center">
|
|
<a href="/" class="text-xl font-medium text-gray-900 hover:text-primary-600 transition-colors">
|
|
upaas
|
|
</a>
|
|
<div class="flex items-center gap-4">
|
|
<a href="/apps/new" class="btn-primary">
|
|
New App
|
|
</a>
|
|
<form method="POST" action="/logout" class="inline">
|
|
<button type="submit" class="btn-text">Logout</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
{{end}}
|
|
|
|
{{define "alert-error"}}
|
|
{{if .Error}}
|
|
<div class="alert-error" data-auto-dismiss="8000">
|
|
<div class="flex items-center">
|
|
<svg class="w-5 h-5 mr-2 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
|
|
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/>
|
|
</svg>
|
|
<span>{{.Error}}</span>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
|
|
{{define "alert-success"}}
|
|
{{if .Success}}
|
|
<div class="alert-success" data-auto-dismiss="5000">
|
|
<div class="flex items-center">
|
|
<svg class="w-5 h-5 mr-2 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
|
|
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
|
|
</svg>
|
|
<span>{{.Success}}</span>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|