Last active
May 8, 2025 21:03
-
-
Save chrisdone-artificial/99966c3f520e1c794375b3bf6ad622eb to your computer and use it in GitHub Desktop.
raspberry pi setup
This file contains hidden or 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
# The Caddyfile is an easy way to configure your Caddy web server. | |
# | |
# Unless the file starts with a global options block, the first | |
# uncommented line is always the address of your site. | |
# | |
# To use your own domain name (with automatic HTTPS), first make | |
# sure your domain's A/AAAA DNS records are properly pointed to | |
# this machine's public IP, then replace ":80" below with your | |
# domain name. | |
www.chrisdone.com, chrisdone.com { | |
# Set this path to your site's directory. | |
root * /var/www/html | |
# Enable the static file server. | |
file_server | |
handle /hooks/update-website { | |
reverse_proxy localhost:9000 | |
} | |
} | |
# Refer to the Caddy docs for more information: | |
# https://caddyserver.com/docs/caddyfile |
This file contains hidden or 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
- id: "update-website" | |
execute-command: "/tmp/website/update-website.sh" | |
# include-command-output-in-response: true | |
trigger-rule: | |
and: | |
- match: | |
type: "payload-hmac-sha256" | |
secret: "..." | |
parameter: | |
source: "header" | |
name: "X-Hub-Signature-256" |
This file contains hidden or 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/sh | |
set -e | |
cd /tmp/website/ | |
sudo -u chris git pull | |
hell website.hell | |
rsync --delete --recursive $(pwd)/webroot/ /var/www/html/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment