To Caddy
This commit is contained in:
parent
bfac354ed3
commit
2d2e7eeb26
7 changed files with 25 additions and 108 deletions
|
@ -1 +0,0 @@
|
|||
</body>
|
|
@ -1,62 +0,0 @@
|
|||
<!doctype html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<style>
|
||||
*, *::before, *::after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'IosevkaLyte';
|
||||
font-display: swap;
|
||||
font-weight: 400;
|
||||
font-stretch: normal;
|
||||
font-style: normal;
|
||||
src: url('https://files.lyte.dev/iosevkalyte/iosevkalyteweb-regular.subset.woff2') format('woff2');
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html {
|
||||
color: #fff;
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0af;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #faf;
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: IosevkaLyte;
|
||||
}
|
||||
|
||||
pre, code {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
padding: 0.15em 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
display: none;
|
||||
}
|
||||
|
||||
h1, pre, p {
|
||||
display: block;
|
||||
max-width: 800px;
|
||||
margin: 0.5em auto;
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env fish
|
||||
set me (status -f)
|
||||
set dfp $argv[1]
|
||||
set h $argv[2]
|
||||
set c $argv[3]
|
||||
|
||||
pushd (dirname $me)
|
||||
function _cp
|
||||
sudo rm -f "$argv[2]"
|
||||
echo "Copying $argv[1] to $argv[2]"
|
||||
sudo cp "$argv[1]" "$argv[2]"
|
||||
end
|
||||
|
||||
_cp (pwd)/user-public-http.conf /etc/nginx/user-public-http.conf
|
||||
_cp (pwd)/user-public-server.conf /etc/nginx/user-public-server.conf
|
||||
_cp (pwd)/.nginx-autoindex-before.html /usr/share/nginx/html/.nginx-autoindex-before.html
|
||||
_cp (pwd)/.nginx-autoindex-after.html /usr/share/nginx/html/.nginx-autoindex-after.html
|
||||
|
||||
echo 'Don\'t forget to include the nginx files in your config inside their respective blocks!'
|
|
@ -1,13 +0,0 @@
|
|||
disable_symlinks off;
|
||||
|
||||
# for wasm games
|
||||
types {
|
||||
application/octet-stream clr;
|
||||
application/octet-stream pdb;
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 10240;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json application/xml application/wasm;
|
||||
gzip_disable msie6;
|
|
@ -1,13 +0,0 @@
|
|||
# need CORS?
|
||||
# location ~* \.(eot|ttf|woff|woff2)$ {
|
||||
# add_header Access-Control-Allow-Origin *;
|
||||
# }
|
||||
|
||||
location ~ ^/~(.+?)(/.*)?$ {
|
||||
disable_symlinks off;
|
||||
alias /home/$1/public$2;
|
||||
index index.html index.htm;
|
||||
autoindex on;
|
||||
add_before_body "/.nginx-autoindex-before.html";
|
||||
add_after_body "/.nginx-autoindex-after.html";
|
||||
}
|
8
host/layer/public-webserver/Caddyfile
Normal file
8
host/layer/public-webserver/Caddyfile
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
admin "unix//run/caddy/admin.socket"
|
||||
}
|
||||
|
||||
{system.hostname} {
|
||||
root * /usr/share/caddy
|
||||
file_server browse
|
||||
}
|
17
host/layer/public-webserver/dotfiles-setup.d.fish
Normal file
17
host/layer/public-webserver/dotfiles-setup.d.fish
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
pushd (dirname (status -f))
|
||||
set dfp $argv[1]
|
||||
set homedir $argv[2]
|
||||
set xdgconfdir $argv[3]
|
||||
set layerdir (pwd)
|
||||
|
||||
function _ln
|
||||
set source $argv[1]
|
||||
set dest $argv[2]
|
||||
sudo rm -f "$dest"
|
||||
echo "Copying $source to $dest"
|
||||
sudo ln -s "$source" "$dest"
|
||||
end
|
||||
|
||||
_ln $layerdir/Caddyfile /etc/caddy/Caddyfile
|
Reference in a new issue