Spaces:
Sleeping
Sleeping
File size: 885 Bytes
cb666c5 2bf9711 32a9e13 cb666c5 fe53290 cb666c5 0b6faa3 cb666c5 32a9e13 2bf9711 c235b9c cb666c5 617d6a7 cb666c5 f95abd8 |
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 33 34 35 36 37 38 39 40 41 42 43 44 |
# 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
|