Files
apartment-dashboard-api/Dockerfile
Stephen Minakian 49bd77bec6
All checks were successful
Deploy Apartment API / deploy (push) Successful in 9m49s
Try to rebuild and deploy
2025-07-15 22:02:16 -06:00

27 lines
426 B
Docker

FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production
# Copy source code
COPY . .
# Create non-root user
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nodejs -u 1001
# Change ownership of the app directory
RUN chown -R nodejs:nodejs /app
USER nodejs
# Expose port
EXPOSE 8080
# Start the application
CMD ["npm", "start"]