Use SITE_ROOT
parent
3f5e9edfbe
commit
c78f4efc98
|
@ -1 +1,2 @@
|
||||||
.nvimlog
|
.nvimlog
|
||||||
|
*.priv.*
|
|
@ -3,12 +3,12 @@
|
||||||
auto_https off
|
auto_https off
|
||||||
}
|
}
|
||||||
|
|
||||||
http://static-mat-services.fly.dev/ {
|
http://static-mat-services.fly.dev {
|
||||||
redir https://mat.services/
|
redir https://mat.services
|
||||||
}
|
}
|
||||||
|
|
||||||
:8080 {
|
:8080 {
|
||||||
root * /var/www
|
root * {$SITE_ROOT}
|
||||||
encode gzip
|
encode gzip
|
||||||
file_server
|
file_server
|
||||||
|
|
||||||
|
@ -20,12 +20,16 @@ http://static-mat-services.fly.dev/ {
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log {
|
||||||
|
output stdout
|
||||||
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
# disable FLoC tracking
|
# disable FLoC tracking
|
||||||
Permissions-Policy interest-cohort=()
|
Permissions-Policy interest-cohort=()
|
||||||
# enable HSTS
|
# enable HSTS
|
||||||
# currently ramping up max-age as per https://hstspreload.org/
|
# currently ramping up max-age as per https://hstspreload.org/
|
||||||
Strict-Transport-Security max-age=604800; includeSubDomains
|
Strict-Transport-Security max-age=2592000; includeSubDomains
|
||||||
# disable clients from sniffing the media type
|
# disable clients from sniffing the media type
|
||||||
X-Content-Type-Options nosniff
|
X-Content-Type-Options nosniff
|
||||||
# clickjacking protection
|
# clickjacking protection
|
||||||
|
@ -37,8 +41,9 @@ http://static-mat-services.fly.dev/ {
|
||||||
# sandbox allow-popups: enable target="_blank" links to open in new tabs
|
# sandbox allow-popups: enable target="_blank" links to open in new tabs
|
||||||
Content-Security-Policy "default-src 'none';
|
Content-Security-Policy "default-src 'none';
|
||||||
img-src 'self';
|
img-src 'self';
|
||||||
style-src 'self' https://cdn.jsdelivr.net/ 'unsafe-inline';
|
style-src 'self' 'unsafe-inline';
|
||||||
font-src 'self' https://cdn.jsdelivr.net/;
|
font-src 'self';
|
||||||
|
script-src 'self';
|
||||||
form-action 'none';
|
form-action 'none';
|
||||||
frame-ancestors 'none';
|
frame-ancestors 'none';
|
||||||
base-uri 'none';
|
base-uri 'none';
|
||||||
|
@ -54,4 +59,3 @@ http://static-mat-services.fly.dev/ {
|
||||||
header Cache-Control max-age=180
|
header Cache-Control max-age=180
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@ RUN nix \
|
||||||
|
|
||||||
FROM caddy:latest
|
FROM caddy:latest
|
||||||
|
|
||||||
|
ENV SITE_ROOT /var/www
|
||||||
|
|
||||||
COPY Caddyfile /etc/caddy/Caddyfile
|
COPY Caddyfile /etc/caddy/Caddyfile
|
||||||
COPY --from=0 /code/result /var/www
|
COPY --from=0 /code/result ${SITE_ROOT}
|
||||||
RUN caddy
|
RUN caddy
|
|
@ -5,7 +5,7 @@ kill_signal = "SIGINT"
|
||||||
kill_timeout = 5
|
kill_timeout = 5
|
||||||
processes = []
|
processes = []
|
||||||
|
|
||||||
[[env]]
|
[env]
|
||||||
|
|
||||||
[experimental]
|
[experimental]
|
||||||
allowed_public_ports = []
|
allowed_public_ports = []
|
||||||
|
|
Loading…
Reference in New Issue