[ANN] glv.one - Gemini PaaS
Peter Vernigorov
pitr.vern at gmail.com
Sat Aug 29 01:50:02 BST 2020
This is slightly different from other capsule hosting sites. Instead
of hosting .gmi files, glv.one will run your Docker image with Gemini
service. Obviously the barrier of entry is higher than sftp-ing text
files to a server, but I see some folks here who want to build dynamic
gemini sites but not able to host them themselves.
It all started when I was annoyed with complicated deployment of my
gemini servers (egsam, wikipedia proxy, geddit) and wanted something
simple, like a `docker push`. So I've built a Platform-as-a-Service
(think Heroku, AWS Elastic Beanstalk etc). My sites have been running
on it for about a month now.
## What you get
- 1 docker container with 0.1 CPU shares and 10mb of RAM
- MySQL database with daily backups
- Domain MY_APP.glv.one with support for a custom (sub-)domain if you have one
- At no cost (my setup is pretty economical and I can easily support ~50 apps)
## How to use it
- Ping me for an account at this email address
- Login and create an app at gemini://glv.one (this is where you will
find an admin panel)
- Push your docker images to deploy.glv.one/USER/APP:VERSION
## Example
The following example deploys a simple Go app using gig framework, but
any language is supported as long as it can run inside Docker. To
start, create the following files:
### Dockerfile
```
FROM alpine:latest
ADD example /
ADD my.crt /my.crt
ADD my.key /my.key
CMD ["/example"]
```
### main.go
```
package main
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
More information about the Gemini
mailing list