Skip to content

Instantly share code, notes, and snippets.

@jukbot
Last active July 7, 2024 04:33
Show Gist options
  • Save jukbot/289784bdea2909463249a9ef82371f32 to your computer and use it in GitHub Desktop.
Save jukbot/289784bdea2909463249a9ef82371f32 to your computer and use it in GitHub Desktop.

Revisions

  1. jukbot revised this gist Jul 7, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Dockerfile
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ WORKDIR /app
    ADD package.json bun.lockb ./
    RUN bun install --frozen-lockfile
    ADD . .
    RUN bun run build-only
    RUN bun run build

    FROM oven/bun:1-alpine
    WORKDIR /app
  2. jukbot created this gist Jul 5, 2024.
    17 changes: 17 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    FROM oven/bun:latest AS build-stage
    WORKDIR /app
    ADD package.json bun.lockb ./
    RUN bun install --frozen-lockfile
    ADD . .
    RUN bun run build-only

    FROM oven/bun:1-alpine
    WORKDIR /app

    ENV NODE_ENV=production
    COPY --from=build-stage /app/dist ./dist
    ADD elysia.ts ./

    CMD ["bun", "run", "/app/elysia.ts"]

    EXPOSE 3000