Giancarmine Salucci 1df1078cf2
All checks were successful
Build and publish farmacia-bot images / Build and push client's image to Gitea's registry (push) Successful in 16s
Build and publish farmacia-bot images / deploy_ovh (push) Successful in 10s
fix dockerfile
2025-04-15 13:40:09 +02:00

15 lines
485 B
Docker

FROM node:23-alpine
WORKDIR /home/node
USER node
RUN mkdir -p app/logs && chown -R node:node app
WORKDIR /home/node/app
COPY --chown=node:node package*.json ./
RUN npm install
COPY --chown=node:node main.js util.js worker.js ./
# Expose logs directory as a volume
VOLUME ["/home/node/app/logs"]
# Use an environment variable for thread count (default to 0 to use auto)
ENV THREAD_COUNT=0
# Run the application - using JSON array format
CMD ["sh", "-c", "node main.js ${THREAD_COUNT}"]