mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-08-28 05:27:41 +00:00
Move docker-compose.yaml to the repo root and add docker-compose.prod.yaml that stands up a Caddy 2 sidecar on 80/443 proxying to the fabro service on 32276 (the CLI's default port). Auto-HTTPS is handled by Caddy when FABRO_DOMAIN is set; certs persist in named volumes. Switch the container's internal listener from 80 to 32276, which lets us drop libcap2-bin and the CAP_NET_BIND_SERVICE file capability.
42 lines
1.3 KiB
Docker
42 lines
1.3 KiB
Docker
# syntax=docker/dockerfile:1.9
|
|
#
|
|
# Runtime image for the Fabro server.
|
|
#
|
|
# Binaries are supplied pre-built via the release workflow:
|
|
# docker-context/amd64/fabro (x86_64-unknown-linux-gnu)
|
|
# docker-context/arm64/fabro (aarch64-unknown-linux-gnu)
|
|
#
|
|
# The image serves the HTTP API (with embedded web UI) on port 32276,
|
|
# persists state to /storage, and runs as the unprivileged `fabro` user.
|
|
|
|
FROM debian:trixie-slim
|
|
|
|
ARG TARGETARCH
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
git \
|
|
tini \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN groupadd --system --gid 1000 fabro \
|
|
&& useradd --system --uid 1000 --gid fabro \
|
|
--home-dir /var/fabro --shell /usr/sbin/nologin fabro \
|
|
&& install -d -o fabro -g fabro -m 0755 /var/fabro /storage \
|
|
&& install -d -m 0755 /etc/fabro
|
|
|
|
COPY --chmod=0755 docker-context/${TARGETARCH}/fabro /usr/local/bin/fabro
|
|
|
|
COPY docker/settings.toml /etc/fabro/settings.toml
|
|
COPY --chmod=0755 docker/entrypoint.sh /usr/local/bin/fabro-entrypoint
|
|
|
|
ENV FABRO_HOME=/var/fabro \
|
|
FABRO_CONFIG=/etc/fabro/settings.toml
|
|
|
|
VOLUME ["/storage"]
|
|
EXPOSE 32276
|
|
|
|
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/fabro-entrypoint"]
|
|
CMD ["fabro", "server", "start", "--foreground", "--bind", "0.0.0.0:32276"]
|