feat(docker): add automatic container entrypoint seeding script
Some checks failed
Production Build & Deploy / build-and-deploy (push) Failing after 9s
Some checks failed
Production Build & Deploy / build-and-deploy (push) Failing after 9s
This commit is contained in:
@@ -18,16 +18,18 @@ ENV HOST=0.0.0.0
|
||||
ENV PORT=3000
|
||||
ENV DATA_DIR=/app/data
|
||||
|
||||
# Erstelle Kunden-Volume Ordner
|
||||
RUN mkdir -p /app/data && chown -R node:node /app
|
||||
# Ordner anlegen & Schreibrechte vorbereiten
|
||||
RUN mkdir -p /app/data
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci --only=production
|
||||
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
||||
|
||||
USER node
|
||||
# Ausführungsrechte für das Entrypoint-Skript setzen
|
||||
RUN chmod +x /app/docker-entrypoint.sh
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
@@ -35,4 +37,5 @@ EXPOSE 3000
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1
|
||||
|
||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||
CMD ["node", "./dist/server/entry.mjs"]
|
||||
|
||||
Reference in New Issue
Block a user