Skip to content

Instantly share code, notes, and snippets.

@sdesalas
Last active September 10, 2024 17:57
Show Gist options
  • Save sdesalas/fd613c5b5bff1b37e1453c590d4ab1a2 to your computer and use it in GitHub Desktop.
Save sdesalas/fd613c5b5bff1b37e1453c590d4ab1a2 to your computer and use it in GitHub Desktop.
Launch script, upgrade, add docker and caddy
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
}
}
#! /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
@sdesalas
Copy link
Author

sdesalas commented Sep 9, 2024

curl -fsSL https://shorturl.at/rQdiG -o launch.sh
chmod +x launch.sh
./lauch.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment