-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (28 loc) · 830 Bytes
/
Dockerfile
File metadata and controls
39 lines (28 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Use Node.js 20 LTS as the base image (required for NestJS 11)
FROM node:20-alpine
# Set the working directory in the container to /app
WORKDIR /app
# Copy package.json, package-lock.json and yarn.lock to the working directory
COPY package*.json ./
# Copy the rest of the application to the working directory
COPY . .
# Install the global npm dependencies
RUN npm install
WORKDIR /app/client
RUN npm install
WORKDIR /app/server
RUN npm install
WORKDIR /app
RUN npm run build --workspaces
# # Build the client application
# WORKDIR /app/client
# RUN yarn install
# RUN yarn build
# # Build the server application
# WORKDIR /app/server
# RUN npm install
# RUN npm run build
# Set the working directory back to /app
WORKDIR /app/server
# Set the command to start the server application
CMD [ "npm", "run", "start" ]