aethex-forge/discord-bot/Dockerfile
Builder.io 047af505d4 Create Dockerfile for Discord bot on Spaceship
cgen-1e87602c28c04011b924a79f6b69f338
2025-11-08 10:44:08 +00:00

22 lines
443 B
Docker

FROM node:18-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install --production
# Copy bot source
COPY . .
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/health', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"
# Start bot
CMD ["npm", "start"]