token-consumer / Dockerfile
qwen2api's picture
Upload 11 files
e5f68c9 verified
Raw
History Blame Contribute Delete
616 Bytes
FROM node:20-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install production dependencies only
RUN npm ci --only=production
# Copy application files
COPY server.js .
COPY executor.js .
COPY storage.js .
COPY logger.js .
COPY token-consumer.html .
# Create data directory
RUN mkdir -p /app/data
# Expose port
EXPOSE 7860
# Set environment
ENV NODE_ENV=production
ENV PORT=7860
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:7860/health || exit 1
# Start server
CMD ["node", "server.js"]