Skip to content

Commit 7b958e4

Browse files
feat: fixing deployment issues
1 parent 7179f57 commit 7b958e4

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

backend/Dockerfile.production

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,24 @@ RUN apk add --no-cache npm
55

66
WORKDIR /app
77

8-
COPY package.json ./
8+
COPY ./backend/package.json ./
99
RUN npm install
1010

11-
COPY . .
12-
COPY ./shared ./shared
13-
11+
COPY ./backend ./
12+
COPY ./shared ../shared
1413
RUN npm run build
1514

16-
# Stage 2: Run
15+
# # Stage 2: Run
1716
FROM node:22-alpine
1817
RUN apk add --no-cache npm
1918

2019
WORKDIR /app
2120

22-
COPY --from=build /app ./
21+
COPY --from=build /app/dist ./dist
22+
COPY --from=build /app/node_modules ./node_modules
23+
COPY --from=build /app/package-lock.json ./package-lock.json
24+
COPY --from=build /app/package.json ./package.json
2325

2426
EXPOSE 3000
2527

26-
CMD ["npm", "run", "start"]
28+
CMD ["npm","run","start"]

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"dev": "nodemon",
99
"build": "tsc && tsc-alias",
10-
"start": "node dist/src/index.js",
10+
"start": "node ./dist/app/src/index.js",
1111
"lint": "eslint src --ext .ts,.tsx",
1212
"lint:fix": "eslint src --ext .ts,.tsx --fix"
1313
},

0 commit comments

Comments
 (0)