summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--capsule/Dockerfile21
-rw-r--r--capsule/gemini-server.conf30
-rw-r--r--docker-compose.yml16
-rw-r--r--molly-capsule/Dockerfile16
-rw-r--r--molly-capsule/molly.conf (renamed from capsule/molly.conf)0
6 files changed, 72 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index c15a4f4..75721af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+capsule/*
+!gemini-server.conf
volumes
feed
atom/gemfeed
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/docker-compose.yml b/docker-compose.yml
index b7aaf49..b6e45dd 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,16 +1,26 @@
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"
+ # - "${PWD}/volumes/feed/gemlog.xml:/var/gemini/gemlog/feed/atom.xml"
+ # - "/etc/letsencrypt/certs:/etc/certs:ro"
gemini-capsule:
build: capsule/
ports:
- "1965:1965"
- restart: unless-stopped
volumes:
- - "${PWD}/volumes/log:/var/log/molly"
+ - "${PWD}/volumes/log/jgs:/var/log/jgs"
- "${PWD}/gemini:/var/gemini"
- "${PWD}/volumes/feed/atom.xml:/var/gemini/feed/atom.xml"
- "${PWD}/volumes/feed/gemlog.xml:/var/gemini/gemlog/feed/atom.xml"
- - "/etc/letsencrypt/certs:/etc/certs:ro"
+ - "${PWD}/capsule/certs/senders.io:/etc/certs:ro"
gemini-feed:
build: atom/
volumes:
diff --git a/molly-capsule/Dockerfile b/molly-capsule/Dockerfile
new file mode 100644
index 0000000..945c93e
--- /dev/null
+++ b/molly-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/molly-capsule/molly.conf
index bd1a223..bd1a223 100644
--- a/capsule/molly.conf
+++ b/molly-capsule/molly.conf