add caddy for ssl termination
This commit is contained in:
parent
3fe25cd0aa
commit
714320a754
@ -31,10 +31,5 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": [
|
"notes": []
|
||||||
{
|
|
||||||
"text": "A reverse proxy that serves an SSL certificate is required. Otherwise the login will not work.",
|
|
||||||
"type": "warning"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,10 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt-get install -y caddy
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
NODE_VERSION="22" setup_nodejs
|
NODE_VERSION="22" setup_nodejs
|
||||||
fetch_and_deploy_gh_release "kutt" "thedevs-network/kutt" "tarball"
|
fetch_and_deploy_gh_release "kutt" "thedevs-network/kutt" "tarball"
|
||||||
|
|
||||||
@ -22,7 +26,19 @@ cp .example.env ".env"
|
|||||||
sed -i "s|JWT_SECRET=|JWT_SECRET=$(openssl rand -base64 32)|g" ".env"
|
sed -i "s|JWT_SECRET=|JWT_SECRET=$(openssl rand -base64 32)|g" ".env"
|
||||||
$STD npm install
|
$STD npm install
|
||||||
$STD npm run migrate
|
$STD npm run migrate
|
||||||
|
msg_ok "Configured Kutt"
|
||||||
|
|
||||||
|
msg_info "Configuring SSL"
|
||||||
|
LXCIP=$(hostname -I | awk '{print $1}')
|
||||||
|
cat <<EOF >/etc/caddy/Caddyfile
|
||||||
|
$LXCIP {
|
||||||
|
reverse_proxy localhost:3000
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
$STD systemctl restart caddy
|
||||||
|
msg_ok "Configured SSL"
|
||||||
|
|
||||||
|
msg_info "Creating Services"
|
||||||
cat <<EOF >/etc/systemd/system/kutt.service
|
cat <<EOF >/etc/systemd/system/kutt.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Kutt server
|
Description=Kutt server
|
||||||
@ -37,8 +53,8 @@ Restart=always
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now kutt
|
$STD systemctl enable -q --now kutt
|
||||||
msg_ok "Configured Kutt"
|
msg_ok "Created Services"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user