File size: 800 Bytes
fabf2bd 1a98e93 fabf2bd 961aae0 fabf2bd cf09021 fabf2bd 6e2b24a fabf2bd 961aae0 |
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 |
# Base image: Node.js version 18 (which supports the required Node.js version 7.6.0+)
FROM node:18
# Set working directory
WORKDIR /app
# Clone the Node-Web-Console repository
RUN git clone https://github.com/ChrisCindy/node-web-console.git .
# Ensure correct permissions for the /app/static directory
RUN mkdir -p /app/static && chmod -R 777 /app/static
# Install pm2 globally
RUN npm install -g pm2
# Install dependencies
RUN npm install
# Expose the port the app will run on (3000 by default)
EXPOSE 7860
# Copy configuration file and set user/password
#COPY config/index.js /app/config/index.js
# Set environment variables (if needed)
ENV NODE_ENV=production
# Run the production build
RUN npm run client:build
# Command to run the server using pm2
CMD ["pm2", "start", "server/app.js"] |