Compare commits

..

2 Commits

Author SHA1 Message Date
f4176e9f7e notes static site plz 2026-02-06 22:05:48 -07:00
9ac57684f0 add static site support 2026-02-06 22:05:24 -07:00
2 changed files with 21 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
nginx_ssl_enabled: true nginx_ssl_enabled: true
static_site: true
letsencrypt_email: "me@jthan.io" letsencrypt_email: "me@jthan.io"
linode_dns_token: "{{ lookup('bitwarden.secrets.lookup', '8849d676-e53e-4aef-a7e6-b3dc014dd698') }}" linode_dns_token: "{{ lookup('bitwarden.secrets.lookup', '8849d676-e53e-4aef-a7e6-b3dc014dd698') }}"

View File

@@ -33,6 +33,7 @@ server {
ssl_stapling_verify on; ssl_stapling_verify on;
server_name {{ inventory_hostname }}; server_name {{ inventory_hostname }};
{% if not static_site %}
location / { location / {
client_max_body_size 512M; client_max_body_size 512M;
proxy_pass http://localhost:3000; proxy_pass http://localhost:3000;
@@ -43,4 +44,13 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
} }
{% endif %}
{% if static_site %}
root /srv/http/{{ inventory_hostname }}/html;
index index.html;
error_page 404 /404.html;
location / {
try_files $uri $uri.html $uri/ =404;
}
{% endif %}
} }