From 4c1f975eaed45f908096539fe9057b2d7cf522df Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Thu, 18 Mar 2021 19:29:03 -0600 Subject: [PATCH] Force nodemon to install during the container setup Docker now starts through nodemon directly --- Dockerfile | 4 ++-- backend/entrypoint.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index db776d4..2a36777 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" ] diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh index 16c37ce..d30d4fc 100755 --- a/backend/entrypoint.sh +++ b/backend/entrypoint.sh @@ -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