major refactor, docker support. Check if there's a better way to do commands/index.ts

This commit is contained in:
2025-03-29 16:58:07 +01:00
parent a3b3f353f0
commit 447ed8dff0
9 changed files with 98 additions and 52 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM oven/bun AS base
WORKDIR /app
FROM base AS install
RUN mkdir -p /temp/dev
COPY package.json bun.lock /temp/dev/
RUN cd /temp/dev && bun install --frozen-lockfile
RUN mkdir -p /temp/prod
COPY package.json bun.lock /temp/prod/
RUN cd /temp/prod && bun install --frozen-lockfile --production
FROM base AS prerelease
COPY --from=install /temp/dev/node_modules node_modules
COPY . .
FROM base AS release
COPY --from=install /temp/prod/node_modules node_modules
COPY --from=prerelease /app/src ./src
COPY --from=prerelease /app/auth.json .
COPY --from=prerelease /app/package.json .
CMD [ "bun", "." ]