Update startup scripts (see below)
1. Set NODE_ENV to production and skip dev dependencies when running from scripts. 2. Remove pkg leftovers. Indicate current environment instead.
This commit is contained in:
+4
-1
@@ -12,11 +12,14 @@ ENTRYPOINT [ "tini", "--" ]
|
||||
# Create app directory
|
||||
WORKDIR ${APP_HOME}
|
||||
|
||||
# Set NODE_ENV to production
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Install app dependencies
|
||||
COPY package*.json post-install.js ./
|
||||
RUN \
|
||||
echo "*** Install npm packages ***" && \
|
||||
npm install && npm cache clean --force
|
||||
npm i --no-audit --no-fund --quiet --omit=dev && npm cache clean --force
|
||||
|
||||
# Bundle app source
|
||||
COPY . ./
|
||||
|
||||
Reference in New Issue
Block a user