mlbserver 2022.8.6 → 2022.8.11

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,24 @@
1
+ FROM node:16-alpine
2
+
3
+ RUN apk update && apk add tzdata
4
+
5
+ # Create app directory
6
+ WORKDIR /mlbserver
7
+
8
+ # Add data directory
9
+ VOLUME /mlbserver/data_directory
10
+
11
+ # Install app dependencies
12
+ # A wildcard is used to ensure both package.json AND package-lock.json are copied
13
+ # where available (npm@5+)
14
+ COPY package*.json ./
15
+
16
+ RUN npm install
17
+ # If you are building your code for production
18
+ # RUN npm ci --only=production
19
+
20
+ # Bundle app source
21
+ COPY . .
22
+
23
+ EXPOSE 9999 10000
24
+ CMD [ "node", "index.js", "--env" ]
package/README.md CHANGED
@@ -1,24 +1,94 @@
1
1
  # mlbserver
2
2
 
3
- Current version 2022.08.06
3
+ Current version 2022.08.11
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
+ - data_directory=/mlbserver/data_directory
42
+ - account_username=your.account.email@example.com
43
+ - account_password=youraccountpassword
44
+ - zip_code=0
45
+ - fav_teams=0
46
+ #- zip_code=00000
47
+ #- fav_teams=ARI,ATL
48
+ #- debug=false
49
+ #- port=9999
50
+ #- multiview_port=10000
51
+ #- multiview_path=
52
+ #- ffmpeg_path=
53
+ #- ffmpeg_encoder=
54
+ #- page_username=
55
+ #- page_password=
56
+ #- content_protect=
57
+ #- gamechanger_delay=0
58
+ ports:
59
+ - 9999:9999
60
+ - 10000:10000
61
+ volumes:
62
+ - /mlbserver/data_directory
63
+ ```
64
+ Then launch it with ```docker-compose up --detach```
65
+
66
+ ### docker-cli
67
+ Update the environment variables in the command below and run it:
68
+ ```
69
+ docker run -d \
70
+ --name mlbserver \
71
+ --env TZ="America/New_York" \
72
+ --env data_directory=/mlbserver/data_directory \
73
+ --env account_username=your.account.email@example.com \
74
+ --env account_password=youraccountpassword \
75
+ --env zip_code=0 \
76
+ --env fav_teams=0 \
77
+ -p 9999:9999 \
78
+ -p 10000:10000 \
79
+ --volume /mlbserver/data_directory \
80
+ tonywagner/mlbserver
81
+ ```
82
+ Subsequent runs can be launched with ```docker start mlbserver```
83
+
84
+ Docker installs may require further configuration to get multiview streaming to work.
85
+
86
+
87
+ ## Usage
18
88
 
19
- and follow the prompts. Load the resulting web URL in a browser to start using the server and to see more documentation.
89
+ 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
90
 
21
- Basic command line options:
91
+ Basic command line or Docker environment options:
22
92
 
23
93
  ```
24
94
  --port or -p (primary port to run on; defaults to 9999 if not specified)
@@ -27,9 +97,10 @@ Basic command line options:
27
97
  --logout or -l (logs out and clears session)
28
98
  --session or -s (clears session)
29
99
  --cache or -c (clears cache)
100
+ --env or -e (use environment variables instead of command line arguments; necessary for Docker)
30
101
  ```
31
102
 
32
- Advanced command line options:
103
+ Advanced command line or Docker environment options:
33
104
 
34
105
  ```
35
106
  --account_username (email address, default will use stored credentials or prompt user to enter them)
@@ -0,0 +1,29 @@
1
+ version: "3"
2
+ services:
3
+ mlbserver:
4
+ image: tonywagner/mlbserver:latest
5
+ container_name: mlbserver
6
+ environment:
7
+ - TZ=America/New York
8
+ - data_directory=/mlbserver/data_directory
9
+ - account_username=your.account.email@example.com
10
+ - account_password=youraccountpassword
11
+ - zip_code=0
12
+ - fav_teams=0
13
+ #- zip_code=00000
14
+ #- fav_teams=ARI,ATL
15
+ #- debug=false
16
+ #- port=9999
17
+ #- multiview_port=10000
18
+ #- multiview_path=
19
+ #- ffmpeg_path=
20
+ #- ffmpeg_encoder=
21
+ #- page_username=
22
+ #- page_password=
23
+ #- content_protect=
24
+ #- gamechanger_delay=0
25
+ ports:
26
+ - 9999:9999
27
+ - 10000:10000
28
+ volumes:
29
+ - /mlbserver/data_directory