")
")
=> /guestbook Back to guestbook")
")
")
entryn", name))
=> /guestbook/setname Set custom name
")
> %s
", name, txt))
")
=> /guestbook Back to guestbook")
> %s
", createdAt.Format("2006-01-02"), name, message))
")
|
||
|---|---|---|
| internal | ||
| pages | ||
| .gitignore | ||
| build.sh | ||
| dev.sh | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE.md | ||
| main.go | ||
| README.md | ||
Personal Gemini Capsule
My own little corner of Geminispace. A partner Gemini capsule to my personal website https://travisshears.com
gemini://travisshears.com/
General Gemini resources and inspiration
- https://jonathanmh.com/p/mirroring-next-blog-to-gemini/
- https://bombadillo.colorfield.space/docs/
- https://github.com/kulak/gemini
- https://geminiprotocol.net/software/
- https://geminiprotocol.net/
Deployment
This capsule is selfhosted on my Nomad backed homelab.
To deploy simply run the ./build.sh script. That will build the docker image and
push it to ECR. After that just re-deploy the nomad job and it will run it in the cluster.
VPC Setup
The travisshears.com domain points to one of my VPCs. There http traffic after some cool ai blocking steps routes to my Astro.js web server running in the homelab. The gemini capsule works similarly. To route gemini traffic to the capsule docker container I also use nginx. Here is what the nginx config looks like:
stream {
upstream gemini_backend {
server homelab:XXXX;
}
server {
listen 1965;
proxy_pass gemini_backend;
}
}
This uses the stream module which allows for TCP connections to be proxied.
Don't forget to open the firewall port:
$ sudo ufw allow 1965/tcp
Dev
Generate self-signed certificate:
$ openssl genrsa -out localhost_key.pem 2048
$ openssl req -new -key localhost_key.pem -out localhost_cert.csr
$ openssl x509 -req -days 365 -in localhost_cert.csr -signkey locslhost_key.pem -out cert.crt.pem
common name is the domain name ex 'localhost'
Run server on local:
$ ./dev.sh
Visit it:
$ bombadillo gemini://localhost:8080