face / Dockerfile
aliroohan179's picture
feat: implement core backend POS API with authentication, role-based access control, menu management, and order processing logic.
1e480b5
Raw History Blame Contribute Delete
703 Bytes
# Use official Node.js 20 slim image as the base
FROM node:20-slim
# Create app directory
WORKDIR /app
# Copy package files first to leverage Docker layer caching
COPY package*.json ./
# Install only production dependencies
RUN npm ci --omit=dev
# Copy the rest of the application code
COPY src/ ./src/
# Change ownership of the app directory to the pre-configured 'node' user (UID 1000)
# Hugging Face Spaces requires running as UID 1000
RUN chown -R node:node /app
# Switch to non-root user 'node'
USER node
# Set default environment variables
ENV PORT=7860
ENV NODE_ENV=production
# Expose the standard Hugging Face Spaces port
EXPOSE 7860
# Run the node server
CMD ["node", "src/server.js"]