Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Docker Configuration with Custom Data Path and other Var #171

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DATA_PATH=/home/ubuntu/MRS_Data
HEADLESS=true # Do not change
NODE_ENV=production
TZ=America/Toronto # Change to your local timezone
### Run on start, set to false to only run the script per the cron schedule
RUN_ON_START=true
### Customize your run schedule, default 5:00 am and 11:00 am, use crontab.guru for formatting
CRON_START_TIME=0 5,11 * * *
23 changes: 11 additions & 12 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@ services:
build: .
container_name: netsky
environment:
- TZ=America/Toronto #change to your local timezone
- NODE_ENV=production
- HEADLESS=true #do not change
### Customize your run schedule, default 5:00 am and 11:00 am, use crontab.guru for formatting
- 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
- TZ=${TZ}
- NODE_ENV=${NODE_ENV} # Use the environment variable
- HEADLESS=${HEADLESS} # Use the environment variable
- CRON_START_TIME=${CRON_START_TIME}
- RUN_ON_START=${RUN_ON_START}
- DATA_PATH=${DATA_PATH} # Use the environment variable
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
### Use the environment variable for the file paths
- ${DATA_PATH}/accounts.json:/usr/src/microsoft-rewards-script/dist/accounts.json
- ${DATA_PATH}/config.json:/usr/src/microsoft-rewards-script/dist/config.json
- ${DATA_PATH}/sessions:/usr/src/microsoft-rewards-script/dist/browser/sessions # Optional, saves your login session
deploy:
resources:
limits:
memory: 2048M
memory: 2048M
restart: unless-stopped