Environment files

This commit is contained in:
2023-02-26 21:45:05 +00:00
parent f8f7c3e0cd
commit 9b1e1e401d
3 changed files with 30 additions and 2 deletions
+5 -1
View File
@@ -1,6 +1,9 @@
# pull the base image
FROM node:alpine
# Build args
ARG NODE_ENV
# set the working direction
#WORKDIR /app
WORKDIR /usr/src/app
@@ -8,6 +11,7 @@ WORKDIR /usr/src/app
# add `/app/node_modules/.bin` to $PATH
# ENV PATH /app/node_modules/.bin:$PATH
ENV PATH /usr/src/app/node_modules/.bin:$PATH
ENV NODE_ENV=$NODE_ENV
# install app dependencies
COPY package.json ./
@@ -20,4 +24,4 @@ RUN npm install
COPY . ./
# start app
CMD ["npm", "start"]
CMD ["npm", "start"]