musfi_prod / Dockerfile
abubasith86
Test
f95abd8
raw
history blame
885 Bytes
# FROM node:23.7.0
# # Set working directory
# WORKDIR /app
# # Copy deployment script
# COPY deploy.py /deploy.py
# # Set non-root user
# RUN useradd -m appuser && chown -R appuser /app
# USER appuser
# # Run deployment script
# CMD ["python3", "/deploy.py"]
# Use the official Node.js image as the base image
FROM node:23.7.0 as builder
# Install git
RUN apt-get update && apt-get install -y git
# Clone the GitHub repository
RUN git clone https://github.com/abubasith456/Node-WLA.git /usr/src/app
# Print the last commit message
RUN git log -1 --pretty=format:"Last commit: %h - %s"
# Set the working directory
WORKDIR /usr/src/app
# Install npm dependencies
RUN npm install
RUN npm ci
# Expose the port your application runs on
EXPOSE 5000
# Start the application
# CMD ["npm", "start"]
CMD git --no-pager log -1 --pretty=format:"Last commit: %h - %s" && npm start