-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 1.43 KB
/
Dockerfile
File metadata and controls
40 lines (30 loc) · 1.43 KB
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
33
34
35
36
37
38
39
FROM node:20-alpine
# OCI labels for metadata
LABEL org.opencontainers.image.title="Whatseerr" \
org.opencontainers.image.description="WhatsApp bot for Seerr that allows users to search and request media via WhatsApp messages" \
org.opencontainers.image.version="1.0.0" \
org.opencontainers.image.authors="WhatSeerr Contributors" \
org.opencontainers.image.url="https://github.com/sufxgit/whatseerr" \
org.opencontainers.image.source="https://github.com/sufxgit/whatseerr" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.documentation="https://github.com/sufxgit/whatseerr#readme"
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies (if any)
RUN npm ci --only=production || true
# Copy application code
COPY . .
# Copy config folder to /config in container (example config will be available)
# If host mounts a config volume, it will override this
RUN mkdir -p /config && \
if [ -d config ] && [ "$(ls -A config 2>/dev/null)" ]; then \
cp -r config/* /config/; \
fi
# Expose webhook port (default 3006, but configurable)
EXPOSE 3006
# Health check - verify server is running
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD node -e "require('http').get('http://localhost:3006/', (r) => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"
# Run the WhatsApp bot
CMD ["node", "whatsapp-bot.js"]