-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathDockerfile
32 lines (26 loc) · 945 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
# syntax=docker/dockerfile:1
# check=error=true
FROM oven/bun:1-alpine AS runtime-dependencies
WORKDIR /app
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=bun.lock,target=bun.lock \
--mount=type=cache,target=/root/.bun/install/cache \
NODE_ENV=production bun install
FROM oven/bun:1-alpine
WORKDIR /app
# ffmpeg needed for get-audio-duration
RUN apk add --no-cache \
font-noto-emoji \
fontconfig \
ffmpeg \
font-liberation \
&& fc-cache -f -v
ENV NODE_ENV=production
ENV TZ=Europe/Berlin
COPY --from=runtime-dependencies /app/node_modules /app/node_modules
COPY ./ /app/
ARG RELEASE_IDENTIFIER
ARG BUILD_NUMBER
RUN echo "RELEASE_IDENTIFIER=${RELEASE_IDENTIFIER:-debug}" >> /app/.env && \
echo "BUILD_NUMBER=${BUILD_NUMBER:-0}" >> /app/.env
ENTRYPOINT ["bun", "src/app.ts"]