coreos-home-server/config/service/writefreely/Containerfile
Alex Palaistras a6416f9ea6 Add service for WriteFreely
This commit integrates WriteFreely as a systemd service, set up as a
single-user instance by default (as is probably appropriate for a
home-server setup); a default administrator is set up, and whoever
is managing the home-server is expected to update the username and
password after first login.

Though WriteFreely expects to have a hostname set up for the instance,
we do not listen on any specific hostname by default. It is expected,
rather, that the `nginx-proxy-http` service is used with a drop-in for
using the correct `writefreely` upstream.

Configuration for this will continue to evolve as required.
2021-11-27 17:37:46 +00:00

21 lines
832 B
Docker

FROM docker.io/debian:bullseye-slim
ARG VERSION=0.13.1
RUN apt-get update -y && apt-get upgrade -y && \
apt-get install -y --no-install-recommends curl ca-certificates gettext gosu
ENV PACKAGE_URL https://github.com/writefreely/writefreely/releases/download/v${VERSION}/writefreely_${VERSION}_linux_amd64.tar.gz
RUN curl -L ${PACKAGE_URL} | tar -C /opt --no-same-owner -xvzf - && \
mv /opt/writefreely/writefreely /bin/writefreely && chmod +x /bin/writefreely
RUN apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false curl
RUN addgroup --system --gid 10000 writefreely
RUN adduser --system --uid 10000 --ingroup writefreely --home /var/lib/writefreely writefreely
COPY container/config /etc/writefreely
COPY container/run-writefreely /run-writefreely
EXPOSE 8080
ENTRYPOINT ["/run-writefreely"]