chore: Update Dockerfile paths and add .dockerignore files for backend and frontend
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
node_modules
|
||||
npm-debug.log
|
||||
.git
|
||||
.gitignore
|
||||
Dockerfile*
|
||||
dist
|
||||
coverage
|
||||
*.log
|
||||
*.tsbuildinfo
|
||||
.env
|
||||
+6
-6
@@ -1,15 +1,15 @@
|
||||
# Byggas från projektets rot: docker build -f backend/Dockerfile -t recipe-api:local .
|
||||
# Byggas från backend-mappen: docker build -t recipe-api:local .
|
||||
|
||||
# Stage 1: Bygg applikationen
|
||||
FROM node:22-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# Kopiera backend-filer
|
||||
COPY backend/package.json ./
|
||||
COPY backend/prisma ./prisma
|
||||
COPY backend/src ./src
|
||||
COPY backend/tsconfig.json ./
|
||||
COPY backend/nest-cli.json ./
|
||||
COPY package.json ./
|
||||
COPY prisma ./prisma
|
||||
COPY src ./src
|
||||
COPY tsconfig.json ./
|
||||
COPY nest-cli.json ./
|
||||
|
||||
# Köra npm install
|
||||
RUN npm install
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@ services:
|
||||
|
||||
recipe-api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: backend/Dockerfile
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
image: recipe-api:local
|
||||
container_name: recipe-api
|
||||
restart: unless-stopped
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
node_modules
|
||||
.next
|
||||
npm-debug.log
|
||||
.git
|
||||
.gitignore
|
||||
*.log
|
||||
*.tsbuildinfo
|
||||
.env
|
||||
Reference in New Issue
Block a user