CoolFace
Apppublic

multimodalart/queue_app

sourceHugging Facemitupdated 3y agoView on Hugging Face
0likes
Dockerfile35 linesDownload Raw Back to root
1# Use Node.js as base image2FROM node:143 4# Install PM2 and NGINX5RUN npm install -g pm2 \6    && apt-get update \7    && apt-get install -y nginx8 9# Set working directory and set permissions10RUN mkdir -p /app && chown -R node:node /app11 12# Change the user from root to node13USER node14 15WORKDIR /app16 17# Copy package.json and package-lock.json18COPY --chown=node:node package*.json ./19 20# Install dependencies21RUN npm install22 23# Copy app.js and generate-config.js24COPY --chown=node:node app.js .25COPY --chown=node:node generate-config.js .26 27# Copy NGINX main config file28COPY --chown=node:node nginx.conf /etc/nginx/29 30# Generate config files and start the applications at runtime31CMD ["sh", "-c", "node generate-config.js && cp default.conf /etc/nginx/conf.d/ && pm2 start ecosystem.config.js && nginx -g 'daemon off;'"]32 33# Expose ports34EXPOSE 786035