Force nodemon to install during the container setup

Docker now starts through nodemon directly
This commit is contained in:
Isaac Abadi
2021-03-18 19:29:03 -06:00
parent 4c06bc750c
commit 4c1f975eae
2 changed files with 3 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ FROM alpine:3.12 as frontend
RUN apk add --no-cache \
npm
RUN npm install -g @angular/cli
RUN npm install -g @angular/cli nodemon
WORKDIR /build
COPY [ "package.json", "package-lock.json", "/build/" ]
@@ -42,4 +42,4 @@ COPY --chown=$UID:$GID [ "/backend/", "/app/" ]
EXPOSE 17442
ENTRYPOINT [ "/app/entrypoint.sh" ]
CMD [ "npm", "start" ]
CMD [ "nodemon", "app.js" ]

View File

@@ -1,7 +1,7 @@
#!/bin/sh
set -eu
CMD="npm start"
CMD="nodemon app.js"
# if the first arg starts with "-" pass it to program
if [ "${1#-}" != "$1" ]; then