diff --git a/kineto/Dockerfile b/kineto/Dockerfile new file mode 100644 index 0000000..5205697 --- /dev/null +++ b/kineto/Dockerfile @@ -0,0 +1,11 @@ +FROM golang:1.22 as build +WORKDIR /build +RUN git clone https://git.sr.ht/~sircmpwn/kineto +WORKDIR /build/kineto +RUN go mod download \ + && CGO_ENABLED=0 GOOS=linux go build -o kineto + +FROM alpine:3.19 +WORKDIR /app +COPY --from=build /build/kineto/kineto /app/kineto +ENTRYPOINT ["/app/kineto"] diff --git a/kineto/README.md b/kineto/README.md new file mode 100644 index 0000000..8eb8bab --- /dev/null +++ b/kineto/README.md @@ -0,0 +1,5 @@ +# Kineto + +[Kineto](https://git.sr.ht/~sircmpwn/kineto) is a lightweight HTTP to Gemini proxy. + +This folder holds the Docker config that I use to make my Gemini capsule available on the normal web. diff --git a/kineto/docker-compose.yaml b/kineto/docker-compose.yaml new file mode 100644 index 0000000..d9d371d --- /dev/null +++ b/kineto/docker-compose.yaml @@ -0,0 +1,11 @@ +services: + kineto: + restart: always + build: . + container_name: kineto + ports: + - "8081:8080" + volumes: + - ./style.css:/app/style.css + command: -s style.css gemini://capsule.jbowdre.lol + diff --git a/kineto/style.css b/kineto/style.css new file mode 100644 index 0000000..02fb353 --- /dev/null +++ b/kineto/style.css @@ -0,0 +1,117 @@ +html { + font-family: sans-serif; + color: #080808; +} + +body { + max-width: 920px; + margin: 0 auto; + padding: 1rem 2rem; +} + +blockquote { + background-color: #eee; + border-left: 3px solid #444; + margin: 1rem -1rem 1rem calc(-1rem - 3px); + padding: 1rem; +} + +ul { + margin-left: 0; + padding: 0; +} + +li { + padding: 0; +} + +li:not(:last-child) { + margin-bottom: 0.5rem; +} + +a { + position: relative; + text-decoration: dotted underline; +} + +a:hover { + text-decoration: solid underline; +} + +a:before { + content: '⇒'; + color: #999; + text-decoration: none; + font-weight: bold; + position: absolute; + left: -1.25rem; +} + +pre { + background-color: #eee; + margin: 0 -1rem; + padding: 1rem; + overflow-x: auto; +} + +details:not([open]) summary, +details:not([open]) summary a { + color: gray; +} + +details summary a:before { + display: none; +} + +dl dt { + font-weight: bold; +} + +dl dt:not(:first-child) { + margin-top: 0.5rem; +} + +@media(prefers-color-scheme:dark) { + html { + background-color: #111; + color: #eee; + } + + blockquote { + background-color: #000; + } + + pre { + background-color: #222; + } + + a { + color: #0087BD; + } + + a:visited { + color: #006ebd; + } +} + +label { + display: block; + font-weight: bold; + margin-bottom: 0.5rem; +} + +input { + display: block; + border: 1px solid #888; + padding: .375rem; + line-height: 1.25rem; + transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; + width: 100%; +} + +input:focus { + outline: 0; + border-color: #80bdff; + box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); +} +