Last active
September 10, 2024 17:57
-
-
Save sdesalas/fd613c5b5bff1b37e1453c590d4ab1a2 to your computer and use it in GitHub Desktop.
Launch script, upgrade, add docker and caddy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my.domain.com { | |
reverse_proxy localhost:40001 | |
header -Server | |
header -X-Powered-By | |
log { | |
output file /var/log/caddy/my.domain.com-access.log | |
} | |
@ws { | |
header Connection *Upgrade* | |
header Upgrade websocket | |
} | |
} | |
http:// { | |
header -Server | |
respond /* "" 503 { | |
close | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash -xe | |
# Update/Upgrade | |
apt update | |
apt upgrade -y -qq | |
# Add docker | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
chmod +x get-docker.sh | |
./get-docker.sh | |
# Add Caddy | |
apt install -y debian-keyring debian-archive-keyring apt-transport-https curl | |
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg | |
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list | |
apt update | |
apt install caddy |
Author
sdesalas
commented
Sep 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment