diff --git a/.dockerignore b/.dockerignore new file mode 100755 index 0000000..fa5d7b6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules +dist +.env +.DS_Store +*.log diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..b1b4bb7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM node:20-alpine AS builder + +WORKDIR /app +COPY package.json package-lock.json* ./ +RUN npm ci + +COPY . . +RUN npm run build + +FROM node:20-alpine AS runner +WORKDIR /app + +ENV NODE_ENV=production +ENV PROXY_PORT=11437 +ENV PROXY_HOST=0.0.0.0 + +COPY --from=builder /app/package.json ./ +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/dist ./dist + +EXPOSE 11437 + +CMD ["node", "dist/index.js"]