diff --git a/Dockerfile b/Dockerfile index 87e1d22..a4d6685 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,12 +14,6 @@ RUN apk update \ && yarn cache clean \ && yarn autoclean --force - - - - - - # Stage 2: Production Stage FROM node:alpine3.19 @@ -32,4 +26,8 @@ RUN apk add --no-cache nginx openssl && \ chmod +x /home/node/start.sh STOPSIGNAL SIGINT + +HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=3 \ + CMD [ "curl", "-f", "${VITE_API_PROTOCOL}://localhost:${VITE_API_PORT}", "||", "exit", "1" ] + CMD ["/home/node/start.sh"] \ No newline at end of file diff --git a/start.sh b/start.sh index be0d6a9..35a6a58 100644 --- a/start.sh +++ b/start.sh @@ -19,7 +19,7 @@ VITE_MAX_FILE_SIZE=$VITE_MAX_FILE_SIZE " > client/.env -echo" +echo " CLIENT_DIST_DIRECTORY='client/dist/' ROOM_HASH_SECRET=$ROOM_HASH_SECRET