-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
98 lines (70 loc) · 1.95 KB
/
Dockerfile
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# renovate: datasource=github-releases depName=aptible/supercronic
ARG SUPERCRONIC_VERSION=v0.2.29
# renovate: datasource=github-releases depName=DarthSim/overmind
ARG OVERMIND_VERSION=v2.4.0
# Binary file names
ARG SUPERCRONIC=supercronic-linux-amd64
ARG OVERMIND=overmind-${OVERMIND_VERSION}-linux-amd64
FROM vaultwarden/server:1.30.5-alpine as vaultwarden
#
# Supercronic
#
FROM alpine:3.19 as supercronic
ARG SUPERCRONIC_VERSION
ARG OVERMIND_VERSION
ARG SUPERCRONIC
ARG OVERMIND
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/${SUPERCRONIC_VERSION}/${SUPERCRONIC}
WORKDIR /
RUN wget "$SUPERCRONIC_URL" && chmod +x "$SUPERCRONIC"
#
# Overmind
#
FROM alpine:3.19 as overmind
ARG OVERMIND_VERSION
ARG SUPERCRONIC
ARG OVERMIND
ENV OVERMIND_FILE=overmind-${OVERMIND_VERSION}-linux-amd64.gz
ENV OVERMIND_URL=https://github.com/DarthSim/overmind/releases/download/${OVERMIND_VERSION}/${OVERMIND_FILE}
WORKDIR /
RUN wget "$OVERMIND_URL" && gunzip ${OVERMIND_FILE} && chmod +x "$OVERMIND"
#
# Fly app
#
FROM caddy:2.7.6-alpine
ARG SUPERCRONIC
ARG OVERMIND
ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
ROCKET_PORT=8080 \
SSL_CERT_DIR=/etc/ssl/certs
ENV OVERMIND_CAN_DIE=setupmsmtp
RUN apk add --no-cache \
ca-certificates \
curl \
openssl \
tzdata \
iptables \
ip6tables \
tmux \
sqlite \
restic \
msmtp \
mailx
VOLUME /data
EXPOSE 80
WORKDIR /
RUN ln -sf /usr/bin/msmtp /usr/bin/sendmail
RUN ln -sf /usr/bin/msmtp /usr/sbin/sendmail
COPY --from=supercronic /${SUPERCRONIC} /usr/bin/supercronic
COPY --from=overmind /${OVERMIND} /usr/bin/overmind
COPY --from=vaultwarden /web-vault ./web-vault
COPY --from=vaultwarden /vaultwarden .
COPY --from=vaultwarden /healthcheck.sh .
COPY --from=vaultwarden /start.sh ./vaultwarden.sh
COPY config/crontab .
COPY config/Procfile .
COPY config/Caddyfile /etc/caddy/Caddyfile
COPY scripts/restic-backup.sh .
COPY scripts/setup-msmtp.sh .
CMD ["overmind", "start"]