mirror of
https://github.com/TheNetsky/Microsoft-Rewards-Script.git
synced 2026-01-12 19:27:43 +00:00
38 lines
1.6 KiB
YAML
38 lines
1.6 KiB
YAML
services:
|
|
microsoft-rewards-script:
|
|
build: .
|
|
container_name: microsoft-rewards-script
|
|
restart: unless-stopped
|
|
|
|
# Create and customize your accounts.json and config.json prior to deploying the container (default location: /src/)
|
|
volumes:
|
|
- ./src/accounts.json:/usr/src/microsoft-rewards-script/dist/accounts.json:ro
|
|
- ./src/config.json:/usr/src/microsoft-rewards-script/dist/config.json:ro
|
|
- ./sessions:/usr/src/microsoft-rewards-script/dist/browser/sessions
|
|
|
|
environment:
|
|
TZ: 'America/Toronto' # Set your timezone for proper scheduling
|
|
NODE_ENV: 'production'
|
|
CRON_SCHEDULE: '0 7 * * *' # Customize your schedule, use crontab.guru for formatting
|
|
RUN_ON_START: 'true' # Runs the script immediately on container startup
|
|
|
|
# Add a small random delay to the scheduled start time (uncomment to customize delay, or disable)
|
|
#MIN_SLEEP_MINUTES: "5"
|
|
#MAX_SLEEP_MINUTES: "50"
|
|
SKIP_RANDOM_SLEEP: 'false'
|
|
|
|
# Set a timeout for stuck script runs (default: 8h, uncomment to customize)
|
|
#STUCK_PROCESS_TIMEOUT_HOURS: "8"
|
|
|
|
# Health check: ensures cron is running, container marked unhealthy if cron stops
|
|
healthcheck:
|
|
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
|