diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4e2ca72 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tls \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7878f53 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM golang:1.22-alpine as builder + +ADD . /go +ENV GOPATH /go +RUN go install tildegit.org/solderpunk/molly-brown@latest + + +FROM alpine + +RUN addgroup -S --gid 10001 mb && \ + adduser -S -G mb -u 10000 -s /bin/sh -h /mb mb +USER 10000 + +COPY --from=builder --chown=10000:10001 /go/bin/molly-brown /mb +COPY ./molly.conf /etc/molly.conf + +CMD /mb/molly-brown \ No newline at end of file diff --git a/molly.conf b/molly.conf new file mode 100644 index 0000000..dd5214d --- /dev/null +++ b/molly.conf @@ -0,0 +1,55 @@ +## Basic settings +# +Port = 1965 +Hostname = "localhost" +CertPath = "/mb/tls/cert.pem" +KeyPath = "/mb/tls/key.pem" +DocBase = "/gemini/" +HomeDocBase = "users" +GeminiExt = "gmi" +DefaultLang = "en" +AccessLog = "-" +ReadMollyFiles = true + +## Directory listing +# +DirectoryListing = true +DirectorySort = "Time" +DirectorySubdirsFirst = false +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", +#]