Skip to content

Commit

Permalink
cool
Browse files Browse the repository at this point in the history
  • Loading branch information
adnan wahab committed Oct 18, 2024
1 parent fd015d5 commit d2db546
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 21 deletions.
41 changes: 41 additions & 0 deletions scripts/_bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,45 @@
# divide - install.sh + bootstrap.sh -blah;adlgapsdok
# merge scripts - make them good -> infra -> levels + shipfast jam stack shit


# To install a new plugin in Caddy, you need to build Caddy from source with the desired plugin included.
# Here is a step-by-step guide to do this:

# Step 1: Install Go
# Caddy requires Go to be installed on your system. You can install it using the following commands:
# sudo apt update
# sudo apt install -y golang-go

# Step 2: Set up Go environment
# It's a good practice to set up a Go workspace. Add the following lines to your ~/.bashrc or ~/.zshrc:
# export GOPATH=$HOME/go
# export PATH=$PATH:$GOPATH/bin
# source ~/.bashrc

# Step 3: Get xcaddy
# xcaddy is a command-line tool to build Caddy with plugins.
# go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest

# Step 4: Build Caddy with the plugin
# Use xcaddy to build Caddy with the desired plugin. Replace 'github.com/your/plugin' with the actual plugin repository.
# xcaddy build --with github.com/your/plugin

# Step 5: Replace existing Caddy binary
# Once built, replace the existing Caddy binary with the new one.
# sudo mv ./caddy /usr/bin/caddy

# Step 6: Verify installation
# Verify that the plugin is installed by running:
# caddy list-modules | grep your-plugin

# Note: Ensure that the plugin you want to install is compatible with your version of Caddy.
# xcaddy build --with github.com/abiosoft/caddy-exec

#caddy add-package github.com/abiosoft/caddy-exec
# caddy add-package github.com/caddy-dns/porkbun





# run this on jetson to install hashirama platform + desktop
Expand Down
44 changes: 24 additions & 20 deletions scripts/infra/caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,39 @@ files.hashirama.blog {
header Access-Control-Allow-Methods "GET, POST, OPTIONS"
header Access-Control-Allow-Headers "Content-Type"
}

#health, robotics-odyssey, hello, api/*
hashirama.blog {
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
resolvers 1.1.1.1
}

route / {
root * /home/adnan/homelab_status_page/web-ui/docs
file_server
}

route /health {
respond "ok"
}

route /robotics-odyssey {
redir https://roboticsodyssey.com #static bundle
}

route /hello {
respond "hello world"
}

route /api/* {
reverse_proxy localhost:8080
}

header Access-Control-Allow-Origin *
header Access-Control-Allow-Methods "GET, POST, OPTIONS"
header Access-Control-Allow-Headers "Content-Type"
reverse_proxy localhost:8080



# Add logging for this site
log {
Expand Down Expand Up @@ -64,21 +86,3 @@ hashirama.blog {
# #reverse_proxy localhost:8080
# respond "hi world"
# }
# files.hashirama.blog {
# tls {
# dns cloudflare {env.CLOUDFLARE_API_TOKEN}
# resolvers 1.1.1.1
# }
# respond "hi world"
# }
#respond "hi world"
# header Access-Control-Allow-Origin *
# header Access-Control-Allow-Methods "GET, POST, OPTIONS"
# header Access-Control-Allow-Headers "Content-Type"
# reverse_proxy localhost:8080

#reverse_proxy localhost:8080
# log {
# output file /var/log/caddy/access.log
# level INFO
# }
5 changes: 4 additions & 1 deletion web-ui/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,7 @@ https://docs.trossenrobotics.com/

https://docs.trossenrobotics.com/

curl -LsSf https://astral.sh/uv/install.sh | sh
curl -LsSf https://astral.sh/uv/install.sh | sh



0 comments on commit d2db546

Please sign in to comment.