Fixed dockerfile

This commit is contained in:
Antoni Nuñez Romeu
2026-07-22 13:04:37 +02:00
parent 4c41b501e5
commit 0f340d9a8d
2 changed files with 12 additions and 6 deletions
+7 -6
View File
@@ -2,21 +2,22 @@ FROM node:18-slim AS base
WORKDIR /app
# Install dumb-init for proper signal handling
RUN apt-get update && apt-get install -y --no-install-recommends dumb-init && rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y --no-install-recommends dumb-init && \
rm -rf /var/lib/apt/lists/*
# Copy dependency manifests first (layer cache)
COPY package.json package-lock.json* ./
RUN npm ci --omit=dev && npm cache clean --force
# Copy application code
# Copy application code and entrypoint
COPY src/ ./src/
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Create data directory for SQLite
RUN mkdir -p /app/data
EXPOSE 8000
USER node
ENTRYPOINT ["dumb-init", "--"]
CMD ["node", "src/index.js"]
CMD ["docker-entrypoint.sh"]