-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
68 lines (62 loc) · 3.48 KB
/
Dockerfile
File metadata and controls
68 lines (62 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# ╔═══════════════════════════════════════════════════════════════════════════╗
# ║ Gotify Deployment ║
# ╚═══════════════════════════════════════════════════════════════════════════╝
FROM ghcr.io/gotify/server:latest
# ── Build Args ────────────────────────────────────────────────────────────────
ARG TARGETARCH
ARG SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.37/supercronic-linux-${TARGETARCH}
ARG OVERMIND_URL=https://github.com/DarthSim/overmind/releases/download/v2.5.1/overmind-v2.5.1-linux-${TARGETARCH}.gz
# ── Environment ───────────────────────────────────────────────────────────────
ENV WORKDIR=/app \
TZ="Asia/Shanghai" \
OVERMIND_PROCFILE=/Procfile \
OVERMIND_CAN_DIE=caddy,crontab \
OVERMIND_SHOW_TIMESTAMPS=0 \
GOTIFY_SERVER_PORT=8080 \
GOTIFY_SERVER_TRUSTEDPROXIES='["127.0.0.1"]'
WORKDIR $WORKDIR
# ── Config Files ──────────────────────────────────────────────────────────────
COPY config/crontab \
config/Procfile \
config/Caddyfile \
scripts/restic.sh \
/
# ── Dependencies ──────────────────────────────────────────────────────────────
RUN apt update && apt install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
gnupg \
debian-keyring \
debian-archive-keyring \
# Add Caddy repository
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' \
| gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main" \
> /etc/apt/sources.list.d/caddy-stable.list \
# Install packages
&& apt update && apt install -y --no-install-recommends \
caddy \
restic \
sqlite3 \
openssl \
tzdata \
ntpsec-ntpdate \
iptables \
iputils-ping \
tmux \
msmtp \
bsd-mailx \
# Download binary tools
&& curl -fsSL "$SUPERCRONIC_URL" -o /usr/local/bin/supercronic \
&& curl -fsSL "$OVERMIND_URL" | gunzip -c - > /usr/local/bin/overmind \
&& chmod +x /usr/local/bin/supercronic /usr/local/bin/overmind /restic.sh \
# Symlink msmtp for mail commands
&& ln -sf /usr/bin/msmtp /usr/bin/sendmail \
&& ln -sf /usr/bin/msmtp /usr/sbin/sendmail \
# Cleanup
&& apt -y autoremove \
&& rm -rf /var/lib/apt/lists/*
# ── Startup ───────────────────────────────────────────────────────────────────
ENTRYPOINT []
CMD ["overmind", "start"]