Docker updates and maintenance (#164)

- Update run_daily.sh to use compose.yaml env var overrides if present on scheduled jobs, not just first run. Defaults back to config.json values if no override specified.
- update sample compose.yaml with volume mapping to keep config.json, accounts.json, and sessions folder persistent on local machine (e.g., to keep data persistent through updates).
This commit is contained in:
mgrimace
2024-10-14 13:21:36 +00:00
committed by GitHub
parent 5afd8cbe1d
commit 7151f2351a
3 changed files with 18 additions and 5 deletions

View File

@@ -10,4 +10,13 @@ services:
- CRON_START_TIME=0 5,11 * * *
### Run on start, set to false to only run the script per the cron schedule
- RUN_ON_START=true
restart: unless-stopped
volumes:
### Replace "/path/to/" with the actual path to where you want to save the files on your local machine.
- /path/to/accounts.json:/usr/src/microsoft-rewards-script/dist/accounts.json
- /path/to/config.json:/usr/src/microsoft-rewards-script/dist/config.json
- /path/to/sessions:/usr/src/microsoft-rewards-script/dist/browser/sessions #optional, saves your login session
deploy:
resources:
limits:
memory: 2048M
restart: unless-stopped