lab7: app security, Argon2id, mTLS, OpenBao client, least-privilege worker
This commit is contained in:
+4
-3
@@ -22,7 +22,8 @@ ARG BUILD_ID=unknown
|
||||
ENV BUILD_ID=$BUILD_ID
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV APP_PORT=8080
|
||||
ENV APP_PORT=8443
|
||||
ENV API_HEALTH_PORT=8081
|
||||
ENV DRAIN_DELAY_MS=5000
|
||||
COPY --from=build /usr/src/app/package.json /usr/src/app/package-lock.json ./
|
||||
COPY --from=build /usr/src/app/node_modules ./node_modules
|
||||
@@ -30,9 +31,9 @@ COPY --from=build /usr/src/app/dist ./dist
|
||||
|
||||
USER node
|
||||
|
||||
EXPOSE 8080
|
||||
EXPOSE 8443
|
||||
|
||||
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \
|
||||
CMD node -e "const port=process.env.APP_PORT||'8080'; fetch('http://127.0.0.1:'+port+'/health/ready').then((response) => { if (!response.ok) process.exit(1); }).catch(() => process.exit(1))"
|
||||
CMD node -e "const port=process.env.API_HEALTH_PORT||'8081'; fetch('http://127.0.0.1:'+port+'/health/ready').then((response) => { if (!response.ok) process.exit(1); }).catch(() => process.exit(1))"
|
||||
|
||||
CMD ["node", "dist/main.js"]
|
||||
|
||||
Reference in New Issue
Block a user