Skip to content

Commit e8b4092

Browse files
committed
Var & Init files
1 parent 60c73e7 commit e8b4092

5 files changed

Lines changed: 63 additions & 22 deletions

File tree

jenkins-vars.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
# jenkins variables
3+
project_name: docker-mstream
4+
external_type: github_stable
5+
release_type: stable
6+
release_tag: latest
7+
ls_branch: master
8+
repo_vars:
9+
- EXT_GIT_BRANCH = 'master'
10+
- EXT_USER = 'IrosTheBeggar'
11+
- EXT_REPO = 'mStream'
12+
- BUILD_VERSION_ARG = 'MSTREAM_RELEASE'
13+
- LS_USER = 'linuxserver'
14+
- LS_REPO = 'docker-mstream'
15+
- CONTAINER_NAME = 'mstream'
16+
- DOCKERHUB_IMAGE = 'linuxserver/mstream'
17+
- DEV_DOCKERHUB_IMAGE = 'lsiodev/mstream'
18+
- PR_DOCKERHUB_IMAGE = 'lspipepr/mstream'
19+
- DIST_IMAGE = 'alpine'
20+
- MULTIARCH='true'
21+
- CI='true'
22+
- CI_WEB='true'
23+
- CI_PORT='3000'
24+
- CI_SSL='false'
25+
- CI_DELAY='120'
26+
- CI_DOCKERENV='TZ=US/Pacific'
27+
- CI_AUTH='user:password'
28+
- CI_WEBPATH=''

readme-vars.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
project_name: mstream
2-
project_url: "https://github.com/IrosTheBeggar/mStream"
1+
project_name: mStream
2+
project_url: "https://mstream.io/"
33
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mstream.png"
44
project_blurb: |
5-
[{{ project_name|capitalize }}]({{ project_url }}) is a personal music streaming server. You can use mStream to stream your music from your home computer to any device, anywhere.
5+
[{{ project_name }}]({{ project_url }}) is a personal music streaming server. You can use mStream to stream your music from your home computer to any device, anywhere.
66
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
77

88
# supported architectures
@@ -22,13 +22,15 @@ param_ports:
2222
- { external_port: "3000", internal_port: "3000", port_desc: "The port for the mStream webinterface" }
2323
param_usage_include_env: true
2424
param_env_vars:
25+
- { env_var: "USER", env_value: "admin", desc: "Set username to login" }
26+
- { env_var: "PASSWORD", env_value: "password", desc: "Set password for user" }
27+
- { env_var: "USE_JSON", env_value: "true/false", desc: "Run mStream using the config specified at `/config/config.json`, note this will mean user/password is defined in `config.json`" }
2528
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use e.g. Europe/London" }
26-
2729
# application setup block
2830
app_setup_block_enabled: true
2931
app_setup_block: |
30-
Access the webui at `http://<your-ip>:3000`, for more information check out [{{ project_name|capitalize }}]({{ project_url }}).
32+
Access the webui at `http://<your-ip>:3000`, For most users specifying a USER and PASSWORD is sufficient, the `USE_JSON` option allows for more granular control of mStream, but with added complexity, requiring manual editing of `config.json` to configure your install, for more information check out [{{ project_name|capitalize }}](https://github.com/IrosTheBeggar/mStream/blob/master/docs/json_config.md#json-config).
3133
3234
# changelog
3335
changelogs:
34-
- { date: "28.09.16:", desc: "Inital Release" }
36+
- { date: "18.05.19:", desc: "Inital Release" }

root/defaults/config.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
22
"port": 3000,
33
"webAppDirectory": "public",
4-
"secret": "",
5-
"writeLogs": true,
6-
"noUpload": false,
4+
"writeLogs": false,
5+
"noUpload": true,
76
"scanOptions": {
8-
"skipImg": true,
7+
"skipImg": false,
98
"scanInterval": 1.5,
109
"pause": 50,
1110
"saveInterval": 500,
1211
"bootScanDelay": 15
1312
},
1413
"storage": {
1514
"albumArtDirectory": "/config/album-art",
16-
"dbDirectory": "/config",
17-
"logsDirectory": "/config/logs"
15+
"dbDirectory": "/config/db"
1816
},
1917
"folders": {
20-
"music": "/music"
18+
"library": "/music"
2119
},
2220
"users": {
2321
"admin": {
2422
"password":"password",
25-
"vpaths": "music"
26-
}
23+
"vpaths": "library",
24+
"lastfm-user": "username",
25+
"lastfm-password": "password"
26+
}
2727
}
28-
}
28+
}

root/etc/cont-init.d/30-config

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#!/usr/bin/with-contenv bash
22

3-
# make folders
4-
mkdir -p \
5-
/config/album_art \
6-
/config/db
3+
# make folders if don't exist
4+
[[ ! -d /config/album-art ]] && \
5+
mkdir -p /config/album-art
6+
7+
[[ ! - d /config/db ]] && \
8+
mkdir -p /config/db
9+
10+
# copy config.json if doesn't exist
11+
[[ ! -e /config/config.json ]] && \
12+
cp /defaults/config.json /config/config.json
713

814
# permissions
915
chown abc:abc -R \

root/etc/services.d/mstream/run

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22

33
cd /opt/mstream || exit
44

5-
exec \
6-
s6-setuidgid abc mstream -j /config/config.json
5+
if [ "$USE_JSON" == "true" ]; then
6+
exec \
7+
s6-setuidgid abc mstream -j /config/config.json
8+
else
9+
exec \
10+
s6-setuidgid abc mstream -m /music -I /config/album-art/ -d /config/db/ -u ${USER} -x ${PASSWORD}
11+
fi

0 commit comments

Comments
 (0)