Quick way to get started with Script-Server docker
ssdir=script-server
mkdir -p /opt/${ssdir}/conf /opt/${ssdir}/runners /opt/${ssdir}/scripts /opt/${ssdir}/conf/theme
{
"access": {
"allowed_users": [ "*" ],
"admin_users": [ "*" ]
},
"logging": {
"execution_file": "$DATE-$ID.log",
"execution_date_format": "%y-%m-%d_%H-%M"
}
}
#!/bin/bash
ssdir=script-server
f_conf () {
cat <<-EOF
{
"access": {
"allowed_users": [ "*" ],
"admin_users": [ "*" ]
},
"logging": {
"execution_file": "$DATE-$ID.log",
"execution_date_format": "%y-%m-%d_%H-%M"
}
}
EOF
}
f_directories () {
for d in /opt/${ssdir}/conf /opt/${ssdir}/runners /opt/${ssdir}/scripts /opt/${ssdir}/conf/theme; do
if [ ! -d "${d}" ]; then
mkdir -p ${d}
fi
done
}
f_launch () {
local _port=8000:5000
local _name=jscript
local _wdir=/opt/${ssdir}
docker run -p ${_port} \
-v ${_wdir}/conf/conf.json:/app/conf/conf.json \
-v ${_wdir}/runners/:/app/conf/runners \
-v ${_wdir}/scripts/:/app/scripts/ \
-v ${_wdir}/conf/theme/:/app/conf/theme/ \
--name ${_name} \
bugy/script-server:dev
}
f_directories
if [ ! -f /opt/${ssdir}/conf/conf.json ]; then f_conf | tee /opt/${ssdir}/conf/conf.json; fi
f_launch
Info about theme customization
Simple theme switcher script