Fix Docker volume permissions for backend runtime

This commit is contained in:
Ryan Lancaster
2026-03-17 14:08:46 -04:00
parent ca46302aff
commit 7cd0005cba
4 changed files with 337 additions and 3 deletions

View File

@@ -5,16 +5,18 @@ ENV NODE_ENV=production
WORKDIR /app
COPY package*.json ./
RUN apk add --no-cache curl && npm install --omit=dev
RUN apk add --no-cache curl su-exec && npm install --omit=dev
COPY . .
RUN chown -R node:node /app
USER node
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
EXPOSE 4000
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD curl -f http://localhost:4000/health || exit 1
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["node", "index.js"]