Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
tharaka911 authored Nov 25, 2024
1 parent 630bda5 commit c219e1d
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ FROM node:${NODE_VERSION}-alpine
# Use production node environment by default.
ENV NODE_ENV=production

# Define build arguments
ARG JWT_SECRET
ARG MONGO_URI
ARG PORT

# Set environment variables
ENV JWT_SECRET=$JWT_SECRET
ENV MONGO_URI=$MONGO_URI
ENV PORT=$PORT

WORKDIR /usr/src/app

# Download dependencies as a separate step to take advantage of Docker's caching.
Expand All @@ -32,8 +22,9 @@ USER node
# Copy the rest of the source files into the image.
COPY . .

#copy the .env file to workdir
#COPY .env .

# Expose the port that the application listens on.
EXPOSE 9005

# Run the application
CMD ["node", "index.js"]

0 comments on commit c219e1d

Please sign in to comment.