orchard
mirrorEvery site I host, in one repo, along with the Cloudflare Tunnel and Caddy that front them. It's all Go, Vite, and SQLite, and it runs on a desktop at home with nothing listening on an inbound port.
blogbuncaddycloudflare-tunneldockergogolanghomelabhtml-templatemonorepoself-hostedseosqlitestatic-sitetypstuptime-monitoringviteweb-analytics
1.PHONY: run build clean
2
3# Two services, both in docker-compose.yml, so `make deploy SITE=search.bythewood.me`
4# from the repo root builds and brings up the site and its model together.
5#
6# The model image is llm/, built here rather than borrowed: llama.cpp compiled
7# for this card behind llama-swap, which starts the model on demand and unloads
8# it after the ttl in llm/config.yaml. The first build compiles CUDA kernels and
9# takes a while; after that it is cached.
10#
11# To run the site outside Docker against the deployed model, join its network:
12#
13# sudo docker network connect orchard-search-model bythewood-webdev
14# make run
15
16# SEARCH_DEV_NOAUTH skips the auth check, which only works in a build without
17# -tags embed. See devOpen in main.go.
18run:
19 SEARCH_DEV_NOAUTH=1 LLM_URL=$${LLM_URL:-http://orchard-search-llm:8091} go run .
20
21build:
22 go build -trimpath -ldflags="-s -w" -o ../../bin/search.bythewood.me .
23
24clean:
25 rm -rf build