feat: add reusable nextjs-deploy and nextjs-nginx-conf workflows
Some checks failed
Generate Nginx Config / generate-config (push) Failing after 33s
Some checks failed
Generate Nginx Config / generate-config (push) Failing after 33s
This commit is contained in:
37
.gitea/templates/nginx-nextjs-site.conf.template
Normal file
37
.gitea/templates/nginx-nextjs-site.conf.template
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user