Initial microservice-importer setup with NestJS backend and Next.js frontend

This commit is contained in:
Nils-Johan Gynther
2026-04-12 16:58:23 +02:00
commit 1608eb4d70
32 changed files with 1619 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
# Byggas från projektets rot: docker build -f backend/Dockerfile -t recipe-importer-api:local .
# Stage 1: Bygg applikationen
FROM node:22-alpine AS builder
WORKDIR /app
# Kopiera backend-filer
COPY backend/package.json ./
COPY backend/src ./src
COPY backend/tsconfig.json ./
COPY backend/nest-cli.json ./
# Köra npm install
RUN npm install
RUN npm run build
# Stage 2: Kör applikationen
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
EXPOSE 3001
CMD ["node", "dist/main"]