Last active
July 7, 2024 04:33
-
-
Save jukbot/289784bdea2909463249a9ef82371f32 to your computer and use it in GitHub Desktop.
A example of Dockerfile to run elysia static server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM oven/bun:latest AS build-stage | |
WORKDIR /app | |
ADD package.json bun.lockb ./ | |
RUN bun install --frozen-lockfile | |
ADD . . | |
RUN bun run build | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment