From 047af505d4cc715e4b9e10d4678e3f585af93204 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 8 Nov 2025 10:44:08 +0000 Subject: [PATCH] Create Dockerfile for Discord bot on Spaceship cgen-1e87602c28c04011b924a79f6b69f338 --- discord-bot/Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 discord-bot/Dockerfile diff --git a/discord-bot/Dockerfile b/discord-bot/Dockerfile new file mode 100644 index 00000000..279b52f6 --- /dev/null +++ b/discord-bot/Dockerfile @@ -0,0 +1,22 @@ +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"]