-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
34 lines (27 loc) · 845 Bytes
/
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
FROM node:22-slim AS node
WORKDIR /root
COPY . /root
RUN npm ci --only=production \
&& npm run minify \
&& sed -i '' server/static/**/*
FROM golang:1.23-bookworm AS go
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Set up directory structures
WORKDIR /root/
RUN mkdir -p .
COPY . .
COPY --from=node /root/server/static ./server/static
# App-specific setup
RUN make bins
FROM debian:bookworm-slim
LABEL maintainer="[email protected]"
EXPOSE 5003
RUN apt-get update && apt-get install -y --no-install-recommends \
curl `: Basic-packages` \
&& rm -rf /var/lib/apt/lists/*
HEALTHCHECK --interval=5s --timeout=3s CMD ./healthcheck.sh || exit 1
WORKDIR /root/
COPY --from=go /root/reaction-pics .
COPY --from=go /root/bin/healthcheck.sh .
RUN mkdir -p /root/logs/app
CMD ["./reaction-pics"]