update: deploy
- add deploy dockerfile, tests ok! Signed-off-by: pakintada@gmail.com <Pakin>
This commit is contained in:
parent
bbb30f7624
commit
21174fc1ad
6 changed files with 44 additions and 1 deletions
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Stage 1: Build
|
||||
FROM oven/bun:latest AS builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN bun install --frozen-lockfile
|
||||
RUN bun run build
|
||||
|
||||
# Stage 2: Production Runtime
|
||||
FROM oven/bun:latest
|
||||
WORKDIR /app
|
||||
# Copy only necessary files from the builder
|
||||
COPY --from=builder /app/build ./build
|
||||
COPY --from=builder /app/package.json .
|
||||
|
||||
ENV PORT=3167
|
||||
EXPOSE 3167
|
||||
USER bun
|
||||
# Run the application from the build directory
|
||||
CMD ["bun", "build/index.js"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue