-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (50 loc) · 2.83 KB
/
Copy pathDockerfile
File metadata and controls
56 lines (50 loc) · 2.83 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
# ╔═══════════════════════════════════════════════════════════════════════════╗
# ║ Vaultwarden Deployment ║
# ╚═══════════════════════════════════════════════════════════════════════════╝
FROM vaultwarden/server:latest-alpine
# ── 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 \
ROCKET_PORT=8080
WORKDIR $WORKDIR
# ── Config Files ──────────────────────────────────────────────────────────────
COPY config/crontab \
config/Procfile \
config/Caddyfile \
scripts/restic.sh \
/
# ── Dependencies ──────────────────────────────────────────────────────────────
RUN apk add --no-cache \
curl \
ca-certificates \
openssl \
tzdata \
openntpd \
caddy \
restic \
tmux \
sqlite \
msmtp \
mailx \
iptables \
ip6tables \
iputils-ping \
# 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 cache
&& rm -rf /var/cache/apk/*
# ── Startup ───────────────────────────────────────────────────────────────────
ENTRYPOINT []
CMD ["overmind", "start"]