summaryrefslogtreecommitdiff
path: root/capsule
diff options
context:
space:
mode:
Diffstat (limited to 'capsule')
-rw-r--r--capsule/Dockerfile21
-rw-r--r--capsule/gemini-server.conf30
-rw-r--r--capsule/molly.conf55
3 files changed, 41 insertions, 65 deletions
diff --git a/capsule/Dockerfile b/capsule/Dockerfile
index 945c93e..a55ae98 100644
--- a/capsule/Dockerfile
+++ b/capsule/Dockerfile
@@ -1,16 +1,17 @@
-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
+FROM openjdk:11
+RUN mkdir /opt/jgs/
+WORKDIR /opt/jgs/
EXPOSE 1965
+
VOLUME /etc/certs
-VOLUME /var/log/molly
+VOLUME /var/log/jgs
VOLUME /var/gemini
-COPY molly.conf /etc/molly.conf
+COPY docker-entrypoint.sh ./
+COPY server.jar ./
+COPY logback.xml ./
+COPY lib ./lib
+COPY gemini-server.conf ./
-ENTRYPOINT /opt/go/bin/molly-brown
+ENTRYPOINT /opt/jgs/docker-entrypoint.sh
diff --git a/capsule/gemini-server.conf b/capsule/gemini-server.conf
new file mode 100644
index 0000000..044d640
--- /dev/null
+++ b/capsule/gemini-server.conf
@@ -0,0 +1,30 @@
+# an example server configuration
+sni: false
+port: 1965
+hostname: "senders.io"
+
+hosts {
+ # for hosts with '.' make sure to encase it in quotes
+ "senders.io": {
+ docs: {
+ root: "/var/gemini/"
+ defaultLang: "en"
+ mimeOverrides: {
+ # specific file name overrides
+ files: {
+ # this is optional
+ "atom.xml": "application/atom+xml"
+ }
+ # extension based overrides, files take precedent
+ extensions: {
+ # example of the syntax - jgs handles gemini/gmi extensions by default
+ #"gmi": "text/gemini"
+ }
+ }
+ }
+ cert: {
+ file: "/etc/certs/senders.io.crt"
+ key: "/etc/certs/senders.io.enc.key"
+ }
+ }
+}
diff --git a/capsule/molly.conf b/capsule/molly.conf
deleted file mode 100644
index bd1a223..0000000
--- a/capsule/molly.conf
+++ /dev/null
@@ -1,55 +0,0 @@
-## 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"
-"favicon.txt$" = "text/plain"
-#
-## 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",
-#]