initial commit
This commit is contained in:
17
backend/Dockerfile
Normal file
17
backend/Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM node:22-bookworm AS build
|
||||
WORKDIR /app/backend
|
||||
COPY backend/package*.json ./
|
||||
RUN npm install
|
||||
COPY backend ./
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22-bookworm-slim
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends docker.io awscli jq bash coreutils ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=build /app/backend/node_modules ./backend/node_modules
|
||||
COPY --from=build /app/backend/dist ./backend/dist
|
||||
COPY backend/migrations ./backend/migrations
|
||||
COPY frontend ./frontend
|
||||
WORKDIR /app/backend
|
||||
ENV NODE_ENV=production PUBLIC_DIR=/app/frontend
|
||||
CMD ["node", "dist/server.js"]
|
||||
Reference in New Issue
Block a user