aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrodokk <brodokk@brodokk.space>2021-11-16 19:37:21 +0100
committerbrodokk <brodokk@brodokk.space>2021-11-16 19:37:21 +0100
commit2fd1f9e4b04a5f81aaf5e1cdaf9a8de97ee721dd (patch)
tree15bca1a5cfbcc97c5bc88653ac42cfa829ec9152
parentcef0b02205c9bd409ecc2fc021ade564c7ff36d9 (diff)
downloadneosvr_docker-2fd1f9e4b04a5f81aaf5e1cdaf9a8de97ee721dd.tar.xz
neosvr_docker-2fd1f9e4b04a5f81aaf5e1cdaf9a8de97ee721dd.zip
Update env var
-rw-r--r--docker-compose.yml12
-rw-r--r--entrypoint.sh20
2 files changed, 20 insertions, 12 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index 7801d44..72aff3a 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,13 +7,15 @@ services:
environment:
LAUNCH_APP: 740250
INSTALL_APPS: 740250
- LOGIN: user
- PASSWORD: pwd
- BETA_NAME: headless-client
- BETA_KEY: ***
+ STEAM_USER: ${STEAM_USER}
+ STEAM_PWD: ${STEAM_PWD}
+ STEAM_BETA_NAME: headless-client
+ STEAM_BETA_KEY: ${STEAM_BETAKEY}
+ NEOSVR_USER: ${NEOSVR_USER}
+ NEOSVR_PWD: ${NEOSVR_PWD}
volumes:
- ./steam:/steam
- ./logs:/logs
- - ./config:/steam/740250/Config:ro
+ - ./config:/steam/740250/Config
stdin_open: true
tty: true
diff --git a/entrypoint.sh b/entrypoint.sh
index c5a49de..907d27a 100644
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -7,21 +7,27 @@ if [ -n "${INSTALL_APPS}" ]; then
steamcmd_binary="steamcmd"
password_bypass=""
beta_cmd=""
- if [ -n "${BETA_NAME}" ]; then
- beta_cmd=" -beta ${BETA_NAME}"
- if [ -n "${BETA_KEY}" ]; then
- beta_cmd="${beta_cmd} -betapassword ${BETA_KEY}"
+ if [ -n "${STEAM_BETA_NAME}" ]; then
+ beta_cmd=" -beta ${STEAM_BETA_NAME}"
+ if [ -n "${STEAM_BETA_KEY}" ]; then
+ beta_cmd="${beta_cmd} -betapassword ${STEAM_BETA_KEY}"
fi
fi
- if [ -n "${PASSWORD}" ]; then
- password_bypass="echo '${PASSWORD}' | "
+ if [ -n "${STEAM_PWD}" ]; then
+ password_bypass="echo '${STEAM_PWD}' | "
fi
echo "Check if ${app} is up to date"
- /bin/sh -c "${steamcmd_binary} +login ${LOGIN} ${PASSWORD} +force_install_dir /steam/${app} +app_update ${app}${beta_cmd} validate +quit"
+ /bin/sh -c "${steamcmd_binary} +login ${STEAM_USER} ${STEAM_PWD} +force_install_dir /steam/${app} +app_update ${app}${beta_cmd} validate +quit"
done
IFS=$OLD_IFS
fi
+echo "setting up neos config from env"
+
+CONFIG_PATH='/steam/740250/Config'
+
+cat $CONFIG_PATH | jq --arg u "${NEOSVR_USER}" '.loginCredential = $u' | jq --arg p "${NEOSVR_PWD}" '.loginPassword = $p' | sponge $CONFIG_PATH
+
arguments=$@
case "$arguments" in
"/"*)