mirror of
https://github.com/TheNetsky/Microsoft-Rewards-Script.git
synced 2026-01-10 18:36:17 +00:00
Merge pull request #89 from mgrimace/docker
Clarify docker instructions, add basic compose.yaml support
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,4 +5,5 @@ package-lock.json
|
||||
accounts.json
|
||||
notes
|
||||
accounts.dev.json
|
||||
accounts.main.json
|
||||
accounts.main.json
|
||||
.DS_Store
|
||||
|
||||
23
README.md
23
README.md
@@ -17,9 +17,26 @@ Under development, however mainly for personal use!
|
||||
|
||||
## Docker (Experimental) ##
|
||||
1. Download the source code
|
||||
2. Make changes to your `accounts.json` and/or `config.json`
|
||||
3. Run `docker build -t microsoft-rewards-script-docker .`
|
||||
- Docker container has to be recreated for any changes regarding the `config.json` and/or `accounts.json`!
|
||||
2. Make changes to your `accounts.json`
|
||||
3. Make sure to change `"headless": false` to `"headless": true` in your `config.json`
|
||||
4. Note, the container has to be recreated for any changes regarding the `config.json` and/or `accounts.json`!
|
||||
### Option 1: build and run with docker run
|
||||
|
||||
1. Run `docker build -t microsoft-rewards-script-docker .` to build the container
|
||||
2. Run the container with `docker run --name netsky -d microsoft-rewards-script-docker` or, omit the detached flag `-d` to view the script output in your terminal.
|
||||
3. Optionally, change the name of the container by changing `--name netsky` to your preferred container name
|
||||
4. The container will exit after completing the script, run it again using `docker start netsky`
|
||||
5. If you are running the container `-d` detached, you can view logs with `docker logs netsky`
|
||||
|
||||
### Option 2: use docker compose
|
||||
|
||||
1. A basic docker compose.yaml has been provided, which can be run with `docker compose up -d` or, omit the detached flag `-d` to view the script output in your terminal.
|
||||
|
||||
2. The container will exit after completing the script, run it again using `docker start netsky`
|
||||
|
||||
3. If you are running the container `-d` detached, you can view logs with `docker logs netsky`
|
||||
|
||||
|
||||
|
||||
## Config ##
|
||||
| Setting | Description | Default |
|
||||
|
||||
8
compose.yaml
Normal file
8
compose.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
services:
|
||||
microsoft-rewards-script:
|
||||
build: .
|
||||
container_name: netsky
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
volumes:
|
||||
- .:/usr/src/microsoft-rewards-script
|
||||
Reference in New Issue
Block a user