Spaces:
Sleeping
Sleeping
File size: 715 Bytes
628ea2d 73046d5 58b31c8 2888a5b 628ea2d 73046d5 2888a5b 628ea2d 58b31c8 2888a5b 628ea2d 73046d5 32a9e13 73046d5 628ea2d 73046d5 fe53290 73046d5 a5a3006 628ea2d 5d635fb 628ea2d |
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 |
FROM node:23.7.0 as builder
# Install git
RUN apt-get update && apt-get install -y git
# Clone the GitHub repository (if not already cloned)
RUN rm -rf /usr/src/app && git clone https://github.com/abubasith456/Node-WLA.git /usr/src/app
# Set the working directory
WORKDIR /usr/src/app
# Change ownership of the directory to the current user (node)
RUN chown -R node:node /usr/src/app
# Mark the repository directory as safe
USER node
RUN git config --global --add safe.directory /usr/src/app
# Install npm dependencies
RUN npm install
# Expose the port your application runs on
EXPOSE 5000
# Ensure that the latest code is pulled before starting the app
CMD git pull origin main && npm install && npm start
|