Docker added
This commit is contained in:
51
docker-compose.yml
Normal file
51
docker-compose.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
whatshooked:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: whatshooked-server
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
# Mount config file
|
||||
- ./config.json:/app/config.json:ro
|
||||
|
||||
# Mount sessions directory for WhatsApp authentication persistence
|
||||
- ./sessions:/app/sessions
|
||||
|
||||
# Mount media directory for storing downloaded media files
|
||||
- ./data/media:/app/data/media
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
# Health check
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
# Environment variables (optional - can override config.json settings)
|
||||
# environment:
|
||||
# - LOG_LEVEL=info
|
||||
|
||||
# Use host network mode if you need QR code scanning via terminal
|
||||
# network_mode: "host"
|
||||
|
||||
# Resource limits (optional)
|
||||
# deploy:
|
||||
# resources:
|
||||
# limits:
|
||||
# cpus: '1.0'
|
||||
# memory: 512M
|
||||
# reservations:
|
||||
# cpus: '0.25'
|
||||
# memory: 128M
|
||||
|
||||
# Optional: Add networks for more complex setups
|
||||
# networks:
|
||||
# whatshooked-network:
|
||||
# driver: bridge
|
||||
Reference in New Issue
Block a user