mission-control/Worker.Dockerfile
GeorgeWebberley 77ba5d05fc
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Attempt 3 at fixing dockerfile
2026-01-29 07:45:53 +01:00

25 lines
689 B
Docker

# Use a build argument for the platform to satisfy the warning
ARG TARGETPLATFORM=linux/amd64
FROM --platform=${TARGETPLATFORM} node:20-bookworm-slim
WORKDIR /app
ENV NODE_ENV=production
# 1. Copy only the dependency files first (better caching)
COPY package*.json ./
# 2. Install only production dependencies
# This keeps the image small
RUN npm install --omit=dev && npm install -g tsx
# 3. Copy only the folders the worker actually needs
# This avoids copying the massive .next or .git folders
COPY scripts ./scripts
COPY lib ./lib
COPY config ./config
# 4. Create data directory
RUN mkdir -p /app/data
# 5. Run using tsx (already installed)
CMD ["tsx", "scripts/update-space.ts"]