Containerfile
Raw
1FROM oven/bun:1 AS base
2WORKDIR /app
3
4RUN apt-get --update install -y --no-install-recommends \
5 tini openssh-client git-core zstd \
6 && rm -rf /var/lib/apt/lists/*
7
8# Copy public first so postinstall can write vendor files into it
9COPY public ./public
10
11# Install dependencies (postinstall vendors simplewebauthn + jxl-polyfill into public/)
12COPY package.json bun.lock* ./
13RUN bun install --frozen-lockfile --production
14
15# Copy source
16COPY src ./src
17COPY tsconfig.json ./
18
19EXPOSE 3000
20
21ENV DATA_DIR=/data
22VOLUME ["/data"]
23
24ENTRYPOINT ["/usr/bin/tini", "--"]
25CMD ["sh", "-c", "bun run db:init && bun run start"]
26