summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--atom/Dockerfile12
-rwxr-xr-xatom/docker-entrypoint.sh10
-rw-r--r--capsule/Dockerfile16
-rw-r--r--capsule/molly.conf54
-rw-r--r--docker-compose.yml18
-rw-r--r--gemini/hello-world.gmi33
-rw-r--r--gemini/index.gmi9
8 files changed, 157 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6ff34e3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+volumes
+gemini/feed
+atom/gemfeed
+vim-syntax
+*.swp
diff --git a/atom/Dockerfile b/atom/Dockerfile
new file mode 100644
index 0000000..d29c97d
--- /dev/null
+++ b/atom/Dockerfile
@@ -0,0 +1,12 @@
+FROM python:latest
+
+COPY gemfeed/gemfeed.py /
+COPY gemfeed/setup.py /
+COPY docker-entrypoint.sh /
+
+RUN python -m pip install -e .
+
+VOLUME /feed
+VOLUME /gemini
+
+CMD /docker-entrypoint.sh
diff --git a/atom/docker-entrypoint.sh b/atom/docker-entrypoint.sh
new file mode 100755
index 0000000..5e53cc3
--- /dev/null
+++ b/atom/docker-entrypoint.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env sh
+set -ex
+python gemfeed.py \
+ -b gemini://senders.io \
+ -d /gemini/ \
+ -o /feed/atom.xml \
+ -e stephen+gemini@senders.io \
+ -a senders \
+ -t "Senders' Capsule"
+
diff --git a/capsule/Dockerfile b/capsule/Dockerfile
new file mode 100644
index 0000000..945c93e
--- /dev/null
+++ b/capsule/Dockerfile
@@ -0,0 +1,16 @@
+FROM debian:stable-slim
+
+RUN apt-get update && apt-get install -y golang git
+RUN mkdir /opt/go
+ENV GOPATH=/opt/go
+RUN go get github.com/BurntSushi/toml
+RUN go get tildegit.org/solderpunk/molly-brown
+
+EXPOSE 1965
+VOLUME /etc/certs
+VOLUME /var/log/molly
+VOLUME /var/gemini
+
+COPY molly.conf /etc/molly.conf
+
+ENTRYPOINT /opt/go/bin/molly-brown
diff --git a/capsule/molly.conf b/capsule/molly.conf
new file mode 100644
index 0000000..e4363d4
--- /dev/null
+++ b/capsule/molly.conf
@@ -0,0 +1,54 @@
+## Basic settings
+#
+Port = 1965
+Hostname = "senders.io"
+CertPath = "/etc/certs/live/senders.io/fullchain.pem"
+KeyPath = "/etc/certs/live/senders.io/privkey.pem"
+DocBase = "/var/gemini/"
+#HomeDocBase = "users"
+GeminiExt = "gmi"
+DefaultLang = "en"
+AccessLog = "/var/log/molly/access.log"
+ErrorLog = "/var/log/molly/error.log"
+#ReadMollyFiles = true
+#
+## Directory listing
+#
+#DirectorySort = "Time"
+#DirectoryReverse = true
+#DirectoryTitles = true
+#
+## Dynamic content
+#
+#CGIPaths = [
+# "/var/gemini/cgi-bin",
+# "/var/gemini/users/*/cgi-bin/", # Unsafe!
+#]
+#
+#[SCGIPaths]
+#"/scgi-app-1/" = "/var/run/scgi1.sock"
+#"/scgi-app-2/" = "/var/run/scgi2.sock"
+#
+## MIME type overrides
+#
+#[MimeOverrides]
+"atom.xml$" = "application/atom+xml"
+"rss.xml$" = "application/rss+xml"
+#
+## Redirects
+#
+#[TempRedirects]
+#"/old/path/file.ext" = "/new/path/file.ext"
+#[PermRedirects]
+#"/old/path/file.ext" = "/new/path/file.ext"
+#
+## Certificate zones
+#
+#[CertificateZones]
+#"^/secure-zone-1/" = [
+# "d146953386694266175d10be3617427dfbeb751d1805d36b3c7aedd9de02d9af",
+#]
+#"^/secure-zone-2/" = [
+# "d146953386694266175d10be3617427dfbeb751d1805d36b3c7aedd9de02d9af",
+# "786257797c871bf617e0b60acf7a7dfaf195289d8b08d1df5ed0e316092f0c8d",
+#]
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..10ea63d
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,18 @@
+version: '3'
+services:
+ gemini-capsule:
+ build: capsule/
+ ports:
+ - "1965:1965"
+ restart: unless-stopped
+ volumes:
+ - "${PWD}/volumes/log:/var/log/molly"
+ - "${PWD}/gemini:/var/gemini"
+ - "${PWD}/volumes/feed/atom.xml:/var/gemini/feed/atom.xml"
+ - "/etc/letsencrypt/certs:/etc/certs:ro"
+ gemini-feed:
+ build: atom/
+ volumes:
+ - "${PWD}/gemini:/gemini:ro"
+ - "${PWD}/volumes/feed:/feed"
+
diff --git a/gemini/hello-world.gmi b/gemini/hello-world.gmi
new file mode 100644
index 0000000..c87de10
--- /dev/null
+++ b/gemini/hello-world.gmi
@@ -0,0 +1,33 @@
+# Hello world
+
+Hi, all. I am testing out self-hosting a gemini server. It's probably overkill, but to start I went with:
+=> https://tildegit.org/solderpunk/molly-brown [https] molly-brown
+It was sitch to setup and I figured before I dive head first into making my own server this might be the simplest start.
+
+## Who am I
+
+I am not the most anonymous person on the net, but I try to keep things private to a fault. I'm a software engineer (surprise) who like messing around in home server stuff. I mostly write about projects I work on, but sometimes I end up with other random stuff out there.
+
+## Why gemini
+
+I had been interested in gemini for a while and took the plunge. I plan on mirroring my webpage here, which already focused on being a very frugal website. No javascript, basic html5 and css features, simple! However, I am currently writing _all_ of that in html, which for me is actually enjoyable, isn't condusive to easy writing. I intend to move to markdown and use python-markdown or some similar tool to compile my entries into their html files. Having writing this and some test pages, I do enjoy the very direct nature of gemtext as a markup language. But even Markdown can be tedious at times. For html, removing the _strengths_ of the language for ease of writing is something I don't enjoy personally: alt-text anchors dynamic styling for the sake of emphasis. But that is on the GUI of the WWW which this is not. So I have a feeling I'll enjoy the minimalist nature of gemini.
+
+## Intentions for this capsule
+
+I intend to mirror my website, as I said above, but also just make more frequent small gemlogs and other quick bits. Connecting with folks who come across my space, really anything.
+
+## Final thoughts
+
+Before I post this unproofed quick hello-world document, with my server exposing 1965 to the internet, fingers crossed, I want to just say hi. And thank you for reading. I am slightly skeptical of _just how minimal_ this space is. I enjoy the unix-y nature of "if you want to comment on something someone wrote: email them" but at the same time, cataloging all of the interaction in a singular space with the power to do so _is really the logical progression_ of internet-interaction. So we will see. Maybe there is an IRC I can lurk on too.
+
+P.S I promise to be less ramble-y in later posts.
+
+### Care to help a newbie
+
+If you have anything useful or need to let me know I am leaking all my data to the internet you can reach me via email at admin (at) senders.io
+
+# External Links
+
+=> ../ Back
+=> https://senders.io [https] homepage
+
diff --git a/gemini/index.gmi b/gemini/index.gmi
new file mode 100644
index 0000000..8f3f966
--- /dev/null
+++ b/gemini/index.gmi
@@ -0,0 +1,9 @@
+# Senders' Capsule
+
+Hi, welcome to my capsule. I have some about me in my introductory post. I've only recently gotten started so sorry it is a bit empty around here.
+
+## Links
+
+=> /hello-world.gmi Hello-World!
+=> /feed/atom.xml [atom] Feed
+=> https://senders.io [https] My Webpage