update compose.yaml (#438)

Simplify compose.yaml, remove resource limits.
This commit is contained in:
Michael Cammarata
2026-01-06 13:40:38 -05:00
committed by GitHub
parent 171521c51f
commit ca3253ac52

View File

@@ -4,11 +4,11 @@ services:
container_name: microsoft-rewards-script container_name: microsoft-rewards-script
restart: unless-stopped restart: unless-stopped
# Volume mounts: Specify a location where you want to save the files on your local machine. # Create and customize your accounts.json and config.json prior to deploying the container (default location: /src/)
volumes: volumes:
- ./src/accounts.json:/usr/src/microsoft-rewards-script/dist/accounts.json:ro - ./src/accounts.json:/usr/src/microsoft-rewards-script/dist/accounts.json:ro
- ./src/config.json:/usr/src/microsoft-rewards-script/dist/config.json:ro - ./src/config.json:/usr/src/microsoft-rewards-script/dist/config.json:ro
- ./sessions:/usr/src/microsoft-rewards-script/dist/browser/sessions # Optional, saves your login session - ./sessions:/usr/src/microsoft-rewards-script/dist/browser/sessions
environment: environment:
TZ: 'America/Toronto' # Set your timezone for proper scheduling TZ: 'America/Toronto' # Set your timezone for proper scheduling
@@ -16,20 +16,15 @@ services:
CRON_SCHEDULE: '0 7 * * *' # Customize your schedule, use crontab.guru for formatting CRON_SCHEDULE: '0 7 * * *' # Customize your schedule, use crontab.guru for formatting
RUN_ON_START: 'true' # Runs the script immediately on container startup RUN_ON_START: 'true' # Runs the script immediately on container startup
# Add scheduled start-time randomization (uncomment to customize or disable, default: enabled) # Add a small random delay to the scheduled start time (uncomment to customize delay, or disable)
#MIN_SLEEP_MINUTES: "5" #MIN_SLEEP_MINUTES: "5"
#MAX_SLEEP_MINUTES: "50" #MAX_SLEEP_MINUTES: "50"
SKIP_RANDOM_SLEEP: 'false' SKIP_RANDOM_SLEEP: 'false'
# Optionally set how long to wait before killing a stuck script run (prevents blocking future runs, default: 8 hours) # Set a timeout for stuck script runs (default: 8h, uncomment to customize)
#STUCK_PROCESS_TIMEOUT_HOURS: "8" #STUCK_PROCESS_TIMEOUT_HOURS: "8"
# Optional resource limits for the container # Health check: ensures cron is running, container marked unhealthy if cron stops
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: healthcheck:
test: ['CMD', 'sh', '-c', 'pgrep cron > /dev/null || exit 1'] test: ['CMD', 'sh', '-c', 'pgrep cron > /dev/null || exit 1']
interval: 60s interval: 60s