Add Docker setup
This commit is contained in:
1 parent
7c8c9f329f
commit
fd6603682a
4 files changed
+64
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
FROM oven/bun:1.4 AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bun.lock* ./
|
||||
RUN bun install
|
||||
|
||||
COPY . .
|
||||
RUN bun --bun vite build
|
||||
|
||||
FROM oven/bun:1.4 AS runtime
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ffmpeg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY package.json bun.lock* ./
|
||||
RUN bun install --production --ignore-scripts
|
||||
|
||||
COPY --from=build /app/build ./build
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
EXPOSE 3000
|
||||
|
||||
USER bun
|
||||
CMD ["bun", "./build/index.js"]
|
||||
Reference in new issue
Block a user