feat: Phase 4.5 — Déploiement multi-plateforme v0.4.5
CI / test (push) Successful in 2m26s

- service.v: --install-service / --uninstall-service / --service-status
  Windows (sc.exe SCM), Linux systemd, Linux openrc — auto-détection OS
- main.v: nouveaux flags service, help mis à jour
- Dockerfile: multi-stage (V from source → alpine:3.20 minimal)
- docker-compose.yml: prêt à l'emploi avec healthcheck
- scripts/install.sh: one-liner Linux (detect OS/arch, build, install)
- scripts/install.ps1: one-liner Windows PowerShell

Docs: ROADMAP Phase 4.5 marqué DONE, version 0.4.5
This commit is contained in:
2026-08-03 16:51:24 -04:00
parent 26341578fa
commit 45e349e79d
8 changed files with 434 additions and 19 deletions
+29
View File
@@ -0,0 +1,29 @@
# ── Build stage: compile ntfy-bridge from source ──────────────────────────
FROM alpine:3.20 AS builder
RUN apk add --no-cache gcc musl-dev git make
# Build V from source
RUN git clone --depth 1 https://github.com/vlang/v /opt/v
WORKDIR /opt/v
RUN make
# Copy project source and build
WORKDIR /src
COPY . .
RUN /opt/v/v -prod -o /ntfy-bridge .
# ── Runtime stage: minimal image ───────────────────────────────────────────
FROM alpine:3.20
RUN apk add --no-cache ca-certificates tzdata
COPY --from=builder /ntfy-bridge /usr/local/bin/ntfy-bridge
WORKDIR /etc/ntfy-bridge
EXPOSE 9090
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:9090/health || exit 1
ENTRYPOINT ["/usr/local/bin/ntfy-bridge"]
CMD ["--quiet", "--config", "/etc/ntfy-bridge/ntfy-bridge.yaml"]