Skip to content

Commit b7be944

Browse files
fix: copy shared to /shared before WORKDIR /app
1 parent 7270f8a commit b7be944

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
FROM node:20-alpine
22

3+
# Copy shared to root first, before setting WORKDIR
4+
COPY shared/ /shared/
5+
6+
# Now set up the app directory
37
WORKDIR /app
48

5-
# Copy server package files and install dependencies
9+
# Copy server package files and install dependencies
610
COPY server/package*.json ./
711
RUN npm install --production
812

913
# Copy server source code
1014
COPY server/ ./
1115

12-
# Copy shared INTO parent directory so ../shared works
13-
# This creates /shared (parent of /app)
14-
RUN mkdir -p ../shared
15-
COPY shared/ ../shared/
16-
1716
# Environment
1817
ENV NODE_ENV=production
1918
EXPOSE 5000

0 commit comments

Comments
 (0)