From 2d197223cf1809ee4660bc9f9e4528d400dc22b0 Mon Sep 17 00:00:00 2001 From: Dustin Decker Date: Sun, 29 Jan 2023 12:28:20 -0800 Subject: [PATCH] add supervisor (#16) * add supervisor * fix perms --- Dockerfile | 3 ++- docker-entrypoint.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e8427d5..e8da813 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM node:16 RUN mkdir /app/ WORKDIR /app/ +RUN npm install pm2 -g COPY front-end/ /app/front-end/ WORKDIR /app/front-end/ @@ -25,7 +26,7 @@ COPY docker-entrypoint.sh /app/ RUN chmod +x /app/docker-entrypoint.sh COPY templates /app/templates -USER 1111 +USER node # Start the server ENTRYPOINT ["/app/docker-entrypoint.sh"] diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 13a52ac..4ee6ef3 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash echo "Starting server..." -node server.js +pm2-runtime server.js