feat: Allow providing Steam credentials for download
This commit is contained in:
parent
2355f6f9cc
commit
0b76ab9022
4 changed files with 22 additions and 2 deletions
|
|
@ -16,6 +16,11 @@ ENV DEPOT_ID=996562
|
||||||
# Set a specific manifest ID to download an older version of the server, defaults to latest version
|
# Set a specific manifest ID to download an older version of the server, defaults to latest version
|
||||||
ENV MANIFEST_ID=7306793446776857728
|
ENV MANIFEST_ID=7306793446776857728
|
||||||
|
|
||||||
|
# Steam credentials
|
||||||
|
ENV STEAM_USER=anonymous
|
||||||
|
ENV STEAM_PASSWORD=""
|
||||||
|
ENV STEAM_GUARD_CODE=""
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y libicu-dev gosu && \
|
apt-get install -y libicu-dev gosu && \
|
||||||
|
|
|
||||||
11
README.md
11
README.md
|
|
@ -26,6 +26,10 @@ services:
|
||||||
# To use a specific server version, uncomment the next line and set a manifest ID.
|
# To use a specific server version, uncomment the next line and set a manifest ID.
|
||||||
# See the "Using an Older Server Version" section for details.
|
# See the "Using an Older Server Version" section for details.
|
||||||
# - MANIFEST_ID=none
|
# - MANIFEST_ID=none
|
||||||
|
# If you need to use your own Steam credentials, uncomment and set the following variables.
|
||||||
|
# - STEAM_USER=your_steam_username
|
||||||
|
# - STEAM_PASSWORD=your_steam_password
|
||||||
|
# - STEAM_GUARD_CODE=your_2fa_code
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -65,6 +69,10 @@ docker run -d \
|
||||||
# To use a specific server version, uncomment the next line and set a manifest ID.
|
# To use a specific server version, uncomment the next line and set a manifest ID.
|
||||||
# See the "Using an Older Server Version" section for details.
|
# See the "Using an Older Server Version" section for details.
|
||||||
# -e MANIFEST_ID=none \
|
# -e MANIFEST_ID=none \
|
||||||
|
# If you need to use your own Steam credentials, uncomment and set the following variables.
|
||||||
|
# -e STEAM_USER=your_steam_username \
|
||||||
|
# -e STEAM_PASSWORD=your_steam_password \
|
||||||
|
# -e STEAM_GUARD_CODE=your_2fa_code \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
greenmatthew/scp-secret-laboratory-server:latest
|
greenmatthew/scp-secret-laboratory-server:latest
|
||||||
```
|
```
|
||||||
|
|
@ -87,6 +95,9 @@ Mounting the .config directory allows you to configure any server setting and ha
|
||||||
- `TZ`: [Timezone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) for the container (default: Etc/UTC). Examples: `America/Chicago`, `Europe/London`, `Asia/Tokyo`
|
- `TZ`: [Timezone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) for the container (default: Etc/UTC). Examples: `America/Chicago`, `Europe/London`, `Asia/Tokyo`
|
||||||
- `DEPOT_ID`: The Steam Depot ID for the server files (default: `996562`). This generally should not be changed.
|
- `DEPOT_ID`: The Steam Depot ID for the server files (default: `996562`). This generally should not be changed.
|
||||||
- `MANIFEST_ID`: The Steam Manifest ID for a specific server version (default: `none`). See the "Using an Older Server Version" section for details.
|
- `MANIFEST_ID`: The Steam Manifest ID for a specific server version (default: `none`). See the "Using an Older Server Version" section for details.
|
||||||
|
- `STEAM_USER`: Your Steam username (default: `anonymous`).
|
||||||
|
- `STEAM_PASSWORD`: Your Steam password (default: `""`).
|
||||||
|
- `STEAM_GUARD_CODE`: The 2FA code from your authenticator app (default: `""`). Only needed if your account has Steam Guard enabled.
|
||||||
|
|
||||||
## Using an Older Server Version
|
## Using an Older Server Version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,8 @@ services:
|
||||||
# - TZ=Etc/UTC
|
# - TZ=Etc/UTC
|
||||||
# To download a specific version of the server, uncomment the next line and set the value to a valid manifest ID.
|
# To download a specific version of the server, uncomment the next line and set the value to a valid manifest ID.
|
||||||
# - MANIFEST_ID=none
|
# - MANIFEST_ID=none
|
||||||
|
# If you need to use your own Steam credentials, uncomment and set the following variables.
|
||||||
|
# - STEAM_USER=your_steam_username
|
||||||
|
# - STEAM_PASSWORD=your_steam_password
|
||||||
|
# - STEAM_GUARD_CODE=your_2fa_code
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
|
||||||
4
start.sh
4
start.sh
|
|
@ -6,12 +6,12 @@ echo "Current user is: $(whoami)"
|
||||||
# Install/update SCP:SL server
|
# Install/update SCP:SL server
|
||||||
if [ "$MANIFEST_ID" = "none" ]; then
|
if [ "$MANIFEST_ID" = "none" ]; then
|
||||||
echo "MANIFEST_ID not set, downloading latest server version..."
|
echo "MANIFEST_ID not set, downloading latest server version..."
|
||||||
steamcmd +force_install_dir $SERVER_DIR +login anonymous +app_update 996560 validate +quit
|
steamcmd +force_install_dir $SERVER_DIR +login "$STEAM_USER" "$STEAM_PASSWORD" "$STEAM_GUARD_CODE" +app_update 996560 validate +quit
|
||||||
else
|
else
|
||||||
echo "MANIFEST_ID set to $MANIFEST_ID, downloading specific server version..."
|
echo "MANIFEST_ID set to $MANIFEST_ID, downloading specific server version..."
|
||||||
# download_depot downloads to a specific folder, not the one specified by force_install_dir
|
# download_depot downloads to a specific folder, not the one specified by force_install_dir
|
||||||
# It will be downloaded to <install_dir>/steamapps/content/app_<id>/depot_<id>
|
# It will be downloaded to <install_dir>/steamapps/content/app_<id>/depot_<id>
|
||||||
steamcmd +login anonymous +download_depot 996560 $DEPOT_ID $MANIFEST_ID +quit
|
steamcmd +login "$STEAM_USER" "$STEAM_PASSWORD" "$STEAM_GUARD_CODE" +download_depot 996560 $DEPOT_ID $MANIFEST_ID +quit
|
||||||
|
|
||||||
DEPOT_DOWNLOAD_DIR="$INSTALL_DIR/steamapps/content/app_996560/depot_$DEPOT_ID"
|
DEPOT_DOWNLOAD_DIR="$INSTALL_DIR/steamapps/content/app_996560/depot_$DEPOT_ID"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue