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
|
# Stage 1: Bygg applikationen
|
||||||
FROM node:22-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Kopiera backend-filer
|
# Kopiera backend-filer
|
||||||
COPY backend/package.json ./
|
COPY package.json ./
|
||||||
COPY backend/prisma ./prisma
|
COPY prisma ./prisma
|
||||||
COPY backend/src ./src
|
COPY src ./src
|
||||||
COPY backend/tsconfig.json ./
|
COPY tsconfig.json ./
|
||||||
COPY backend/nest-cli.json ./
|
COPY nest-cli.json ./
|
||||||
|
|
||||||
# Köra npm install
|
# Köra npm install
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|||||||
+2
-2
@@ -15,8 +15,8 @@ services:
|
|||||||
|
|
||||||
recipe-api:
|
recipe-api:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: ./backend
|
||||||
dockerfile: backend/Dockerfile
|
dockerfile: Dockerfile
|
||||||
image: recipe-api:local
|
image: recipe-api:local
|
||||||
container_name: recipe-api
|
container_name: recipe-api
|
||||||
restart: unless-stopped
|
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