💾 Archived View for rawtext.club › ~sloum › geminilist › 002515.gmi captured on 2020-09-24 at 01:08:50. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
Peter Vernigorov pitr.vern at gmail.com
Sat Aug 29 01:50:02 BST 2020
- - - - - - - - - - - - - - - - - - -
This is slightly different from other capsule hosting sites. Insteadof hosting .gmi files, glv.one will run your Docker image with Geminiservice. Obviously the barrier of entry is higher than sftp-ing textfiles to a server, but I see some folks here who want to build dynamicgemini sites but not able to host them themselves.
It all started when I was annoyed with complicated deployment of mygemini servers (egsam, wikipedia proxy, geddit) and wanted somethingsimple, like a `docker push`. So I've built a Platform-as-a-Service(think Heroku, AWS Elastic Beanstalk etc). My sites have been runningon it for about a month now.
ADD example /ADD my.crt /my.crtADD my.key /my.key
CMD ["/example"]```
import "github.com/pitr/gig"
func main() { g := gig.Default()
g.Handle("/", func(c gig.Context) error { return c.Gemini("# Hello, World!") })
g.Run("my.crt", "my.key")}```
Now run the following:- `go mod init example`- `GOOS=linux GOARCH=amd64 go build`- `openssl req -x509 -out my.crt -keyout my.key -newkey rsa:2048-nodes -sha256 -subj '/CN=example.glv.one' -extensions EXT -config <(printf "[dn]\nCN=example.glv.one\n[req]\ndistinguished_name =dn\n[EXT]\nsubjectAltName=DNS:example.glv.one\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")`- `docker build -t deploy.glv.one/USER/example:v1 .`- `docker push deploy.glv.one/USER/example:v1`
That's it, it's deployed. More information, such as how to access DB,is available once authenticated at gemini://glv.one