fix: prevent container stop from timing out

This switches the CMDs to array syntax to avoid invoking a shell, which seems to prevent the stop signal from working correctly in both containers. Also switches from pm2 to pm2-runtime, as is recommended for running pm2 inside Docker.
This commit is contained in:
Matthew Lopez
2024-06-03 19:13:51 -04:00
parent bee33c2373
commit c446e4ec58
2 changed files with 2 additions and 2 deletions

View File

@@ -43,4 +43,4 @@ COPY package.json .
COPY --from=dependencies ${app_dir}/node_modules ${app_dir}/node_modules
COPY --from=build ${app_dir}/dist ${app_dir}/dist
CMD pm2 start . --no-daemon
CMD ["pm2-runtime", "start", "."]

View File

@@ -69,4 +69,4 @@ COPY nginx.default.conf /opt/nginx/conf/nginx.conf
EXPOSE 80 443
# * Start nginx
CMD nginx -g 'daemon off;'
CMD ["nginx", "-g", "daemon off;"]