fix: Update Docker configuration and documentation for improved deployment process

This commit is contained in:
2025-11-13 21:10:10 +01:00
parent 6ed77b120f
commit 17021b00d6
6 changed files with 323 additions and 185 deletions

View File

@@ -1,6 +1,8 @@
services:
microsoft-rewards-script:
build: .
build:
context: ..
dockerfile: docker/Dockerfile
container_name: microsoft-rewards-bot
restart: unless-stopped
@@ -20,23 +22,22 @@ services:
#MIN_SLEEP_MINUTES: "5"
#MAX_SLEEP_MINUTES: "50"
SKIP_RANDOM_SLEEP: "false"
# Optionally set how long to wait before killing a stuck script run (prevents blocking future runs, default: 8 hours)
#STUCK_PROCESS_TIMEOUT_HOURS: "8"
# Optional resource limits for the container
# Optional resource limits for the container
mem_limit: 4g
cpus: 2
# Health check - monitors if cron daemon is running to ensure scheduled jobs can execute
# Container marked unhealthy if cron process dies
healthcheck:
test: ["CMD", "sh", "-c", "pgrep cron > /dev/null || exit 1"]
test: [ "CMD", "sh", "-c", "pgrep cron > /dev/null || exit 1" ]
interval: 60s
timeout: 10s
retries: 3
start_period: 30s
# Security hardening
security_opt:
- no-new-privileges:true