-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 845 Bytes
/
Dockerfile
File metadata and controls
32 lines (23 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Production EloWard Twitch Bot - ECS Fargate Container
FROM node:18-alpine
# Create app directory
WORKDIR /usr/src/app
# Copy package files
COPY package*.json ./
# Install dependencies (production only)
RUN npm ci --only=production && npm cache clean --force
# Copy application code
COPY bot.js ./
# Create non-root user
RUN addgroup -g 1001 -S elowardbot && \
adduser -S elowardbot -u 1001 -G elowardbot
# Change ownership to non-root user
RUN chown -R elowardbot:elowardbot /usr/src/app
USER elowardbot
# Health check for container orchestration
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD node -e "console.log('Bot health: OK')" || exit 1
# No exposed ports needed - bot only makes outbound connections
# (Twitch IRC, Cloudflare Workers, Upstash Redis)
# Start the bot
CMD ["node", "bot.js"]