-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (27 loc) · 814 Bytes
/
Dockerfile
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
40
FROM node:20
# Set the working directory in the container
WORKDIR /
# Copy package.json and package-lock.json to the container
COPY package*.json ./
# Copy the rest of the server application code to the container
COPY . .
# Install dependencies for the server
RUN npm install
# Build the server
RUN npm run build
# Set the working directory to the client folder
WORKDIR /client
# Copy client package.json and package-lock.json to the container
COPY client/package*.json ./
# Copy the rest of the client application code to the container
COPY client .
# Install dependencies for the client
RUN npm install
# Build the client
RUN npm run build
# Set the working directory back to the root
WORKDIR /
ENV HOST 0.0.0.0
EXPOSE 8080
# Specify the command to run when the container starts
CMD ["npm", "start"]