feat: add reusable nextjs-deploy and nextjs-nginx-conf workflows
Some checks failed
Generate Nginx Config / generate-config (push) Failing after 33s

This commit is contained in:
sursini
2026-03-10 17:48:59 -03:00
commit c1748d6819
4 changed files with 271 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kalpasys — Maintenance</title>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: #0a0a0a;
color: #f0f0f0;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 1.5rem;
text-align: center;
padding: 2rem;
}
.logo {
font-size: 1.5rem;
font-weight: 700;
letter-spacing: -0.03em;
background: linear-gradient(90deg, #2F5BFF, #6B3BFF, #D62F8A);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
h1 {
font-size: clamp(1.5rem, 4vw, 2.5rem);
font-weight: 600;
letter-spacing: -0.02em;
}
p {
font-size: 1rem;
color: #6F6F6F;
max-width: 400px;
line-height: 1.6;
}
.dot {
display: inline-block;
width: 8px;
height: 8px;
background: #6B3BFF;
border-radius: 50%;
animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.4; transform: scale(0.8); }
}
</style>
</head>
<body>
<div class="logo">Kalpasys</div>
<span class="dot"></span>
<h1>Under maintenance</h1>
<p>We're working on something. Back shortly.</p>
</body>
</html>

View File

@@ -0,0 +1,37 @@
# Kalpasys generated by nextjs-nginx-conf.yaml
server {
listen 80;
server_name {{DOMAIN}};
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name {{DOMAIN}};
ssl_certificate /etc/letsencrypt/live/{{DOMAIN}}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{DOMAIN}}/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
error_page 502 503 504 /maintenance.html;
location = /maintenance.html {
root /var/www/errors;
internal;
}
location / {
proxy_intercept_errors on;
proxy_pass http://127.0.0.1:{{PORT}};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}