mlbserver 2022.7.23 → 2022.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Dockerfile ADDED
@@ -0,0 +1,21 @@
1
+ FROM node:16-alpine
2
+
3
+ RUN apk update && apk add tzdata
4
+
5
+ # Create app directory
6
+ WORKDIR /mlbserver
7
+
8
+ # Install app dependencies
9
+ # A wildcard is used to ensure both package.json AND package-lock.json are copied
10
+ # where available (npm@5+)
11
+ COPY package*.json ./
12
+
13
+ RUN npm install
14
+ # If you are building your code for production
15
+ # RUN npm ci --only=production
16
+
17
+ # Bundle app source
18
+ COPY . .
19
+
20
+ EXPOSE 9999 10000
21
+ CMD [ "node", "index.js", "--env" ]
package/README.md CHANGED
@@ -1,24 +1,88 @@
1
1
  # mlbserver
2
2
 
3
- Current version 2022.07.23
3
+ Current version 2022.08.09
4
4
 
5
5
  Credit to https://github.com/tonycpsu/streamglob and https://github.com/mafintosh/hls-decryptor
6
6
 
7
+ ## Installation
8
+
9
+ ### node-cli
7
10
  ```
8
11
  npm install -g mlbserver
9
12
  ```
10
13
 
11
- ## Usage
14
+ ### docker
15
+ ```
16
+ docker pull tonywagner/mlbserver
17
+ ```
18
+
12
19
 
13
- Launch the server
20
+ ## Launch
14
21
 
22
+ ### node-cli (follow the prompts on first run, or see below for possible command line options)
15
23
  ```
16
24
  mlbserver
17
25
  ```
26
+ or in application directory:
27
+ ```
28
+ node index.js
29
+ ```
30
+
31
+ ### docker-compose
32
+ Update the environment variables below and save it as docker-compose.yml:
33
+ ```
34
+ version: "3"
35
+ services:
36
+ mlbserver:
37
+ image: tonywagner/mlbserver:latest
38
+ container_name: mlbserver
39
+ environment:
40
+ - TZ=America/New York
41
+ - account_username=your.account.email@example.com
42
+ - account_password=youraccountpassword
43
+ - zip_code=0
44
+ - fav_teams=0
45
+ #- zip_code=00000
46
+ #- fav_teams=ARI,ATL
47
+ #- debug=false
48
+ #- port=9999
49
+ #- multiview_port=10000
50
+ #- multiview_path=
51
+ #- ffmpeg_path=
52
+ #- ffmpeg_encoder=
53
+ #- page_username=
54
+ #- page_password=
55
+ #- content_protect=
56
+ #- gamechanger_delay=0
57
+ ports:
58
+ - 9999:9999
59
+ - 10000:10000
60
+ ```
61
+ Then launch it with ```docker-compose up --detach```
62
+
63
+ ### docker-cli
64
+ Update the environment variables in the command below and run it:
65
+ ```
66
+ docker run -d \
67
+ --name=mlbserver \
68
+ --env TZ="America/New_York" \
69
+ --env account_username=your.account.email@example.com \
70
+ --env account_password=youraccountpassword \
71
+ --env zip_code=0 \
72
+ --env fav_teams=0 \
73
+ -p 9999:9999 \
74
+ -p 10000:10000 \
75
+ tonywagner/mlbserver
76
+ ```
77
+
78
+ Docker installs may require further configuration to get multiview streaming to work.
79
+
80
+
81
+ ## Usage
18
82
 
19
- and follow the prompts. Load the resulting web URL in a browser to start using the server and to see more documentation.
83
+ After launching the server or Docker container, you can access it at http://localhost:9999 on the same machine, or substitute your computer's IP address for localhost to access it from a different device. Load that address in a web browser to start using the server and to see more documentation.
20
84
 
21
- Basic command line options:
85
+ Basic command line or Docker environment options:
22
86
 
23
87
  ```
24
88
  --port or -p (primary port to run on; defaults to 9999 if not specified)
@@ -27,9 +91,10 @@ Basic command line options:
27
91
  --logout or -l (logs out and clears session)
28
92
  --session or -s (clears session)
29
93
  --cache or -c (clears cache)
94
+ --env or -e (use environment variables instead of command line arguments; necessary for Docker)
30
95
  ```
31
96
 
32
- Advanced command line options:
97
+ Advanced command line or Docker environment options:
33
98
 
34
99
  ```
35
100
  --account_username (email address, default will use stored credentials or prompt user to enter them)
@@ -0,0 +1,26 @@
1
+ version: "3"
2
+ services:
3
+ mlbserver:
4
+ image: tonywagner/mlbserver:latest
5
+ container_name: mlbserver
6
+ environment:
7
+ - TZ=America/New York
8
+ - account_username=your.account.email@example.com
9
+ - account_password=youraccountpassword
10
+ - zip_code=0
11
+ - fav_teams=0
12
+ #- zip_code=00000
13
+ #- fav_teams=ARI,ATL
14
+ #- debug=false
15
+ #- port=9999
16
+ #- multiview_port=10000
17
+ #- multiview_path=
18
+ #- ffmpeg_path=
19
+ #- ffmpeg_encoder=
20
+ #- page_username=
21
+ #- page_password=
22
+ #- content_protect=
23
+ #- gamechanger_delay=0
24
+ ports:
25
+ - 9999:9999
26
+ - 10000:10000