add dockerfile for hosting purposes
This commit is contained in:
parent
82ecf80068
commit
da2e7da762
5 changed files with 52 additions and 6 deletions
30
Dockerfile
Normal file
30
Dockerfile
Normal file
|
@ -0,0 +1,30 @@
|
|||
FROM oven/bun:alpine AS base
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bun.lock ./
|
||||
|
||||
RUN bun install -p
|
||||
|
||||
FROM base AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ARG DATABASE_URL
|
||||
|
||||
COPY --from=base /app/node_modules ./node_modules
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN bun install
|
||||
RUN bun run build
|
||||
|
||||
FROM base AS production
|
||||
|
||||
ENV NODE_ENV production
|
||||
|
||||
COPY --from=build /app/build .
|
||||
|
||||
EXPOSE 3000
|
||||
ENV PORT 3000
|
||||
CMD ["bun", "run", "./index.js"]
|
Loading…
Add table
Add a link
Reference in a new issue