-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (37 loc) · 1.2 KB
/
Copy pathDockerfile
File metadata and controls
50 lines (37 loc) · 1.2 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
FROM golang:1.26.1 AS builder
ARG TARGETPLATFORM
COPY ./announce /app/announce
COPY ./auth /app/auth
COPY ./cmd /app/cmd
COPY ./dev-scripts/build-backend /app/dev-scripts/build-backend
COPY ./email /app/email
COPY ./handlers /app/handlers
COPY ./markdown /app/markdown
COPY ./metadata /app/metadata
COPY ./passwordreset /app/passwordreset
COPY ./random /app/random
COPY ./ratelimit /app/ratelimit
COPY ./screenjournal /app/screenjournal
COPY ./store /app/store
COPY ./go.* /app/
WORKDIR /app
RUN TARGETPLATFORM="${TARGETPLATFORM}" \
./dev-scripts/build-backend prod
FROM scratch AS artifact
COPY --from=builder /app/bin/screenjournal ./
FROM litestream/litestream:0.3.13 AS litestream
FROM alpine:3.15
RUN apk add --no-cache bash tzdata
ARG TZ
RUN if [[ -n "${TZ}" ]]; then \
ln -snf "/usr/share/zoneinfo/${TZ}" /etc/localtime && \
echo "${TZ}" > /etc/timezone; \
fi
COPY --from=builder /app/bin/screenjournal /app/screenjournal
COPY --from=litestream /usr/local/bin/litestream /app/litestream
COPY ./docker-entrypoint /app/docker-entrypoint
COPY ./litestream.yml /etc/litestream.yml
COPY ./LICENSE /app/LICENSE
WORKDIR /app
ENV DB_PATH=/data/store.db
ENTRYPOINT ["/app/docker-entrypoint"]