File size: 772 Bytes
060c5f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Use the Node.js 20 base image
FROM node:20

# Switch to non-root user
USER node

# Clone the repository
RUN git clone https://github.com/SuhailTechInfo/suhailmd-2.0 /home/node/blue

# Set the working directory
WORKDIR /home/node/blue

# Grant full permissions to the directory (this step should help if there are permission issues)
RUN chmod -R 777 /home/node/blue/

# Install dependencies
RUN yarn install && yarn add http

# Copy server and start script into the directory (ensure these files exist in the new repo or adjust as needed)
COPY server.js .
COPY start.sh .

# Print the contents of the directory to verify files are present (useful for troubleshooting)
RUN ls -la /home/node/blue

# Run the start script
CMD ["bash", "start.sh"]