From 849530158ad259f329e8cfa64f66d64e5566c2d5 Mon Sep 17 00:00:00 2001 From: Matthew Green Date: Tue, 8 Apr 2025 11:57:14 -0500 Subject: [PATCH] Reorganizing and updating. --- Dockerfile | 30 +++++++++++-------- LICENSE | 2 +- .../config_gameplay.txt | 0 .../config_localadmin_global.txt | 0 .../config_remoteadmin.txt | 0 .../localadmin_internal_data.json | 0 start.sh | 8 ++--- 7 files changed, 22 insertions(+), 18 deletions(-) rename config_gameplay.txt => config/config_gameplay.txt (100%) rename config_localadmin_global.txt => config/config_localadmin_global.txt (100%) rename config_remoteadmin.txt => config/config_remoteadmin.txt (100%) rename localadmin_internal_data.json => config/localadmin_internal_data.json (100%) diff --git a/Dockerfile b/Dockerfile index eda1993..80c74f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,17 @@ FROM steamcmd/steamcmd:latest ENV PORT=7777 -ENV UID=568 -ENV GID=568 -ENV HOME_DIR=/home/steam -ENV SERVER=$HOME_DIR/server -ENV CONFIGS=$HOME_DIR/.config/SCP\ Secret\ Laboratory/config/$PORT +ENV UID=1000 +ENV GID=1000 +# ENV HOME_DIR=/home/steam +# ENV SERVER=$HOME_DIR/server +# ENV CONFIGS=$HOME_DIR/.config/SCP\ Secret\ Laboratory/config/$PORT +ENV STEAM_DIR=/usr/lib/games/steam +ENV INSTALL_DIR=/home/steam +ENV SERVER_DIR=$INSTALL_DIR/server +ENV CONFIG_DIR=$INSTALL_DIR/.config -RUN mkdir -p $HOME_DIR $SERVER +RUN mkdir -p ${INSTALL_DIR} ${SERVER_DIR} ${CONFIG_DIR} RUN apt-get update && \ apt-get install -y libicu-dev @@ -16,13 +20,13 @@ RUN apt-get update && \ RUN addgroup --gid $GID steam && \ adduser --disabled-password --gecos '' --uid $UID --gid $GID steam -COPY start.sh /start.sh -COPY config_gameplay.txt $CONFIGS/config_gameplay.txt -COPY config_remoteadmin.txt $CONFIGS/config_remoteadmin.txt -COPY config_localadmin_global.txt $CONFIGS/../config_localadmin_global.txt -COPY localadmin_internal_data.json $CONFIGS/../localadmin_internal_data.json +COPY start.sh $INSTALL_DIR/start.sh +# COPY config_gameplay.txt $CONFIGS/config_gameplay.txt +# COPY config_remoteadmin.txt $CONFIGS/config_remoteadmin.txt +# COPY config_localadmin_global.txt $CONFIGS/../config_localadmin_global.txt +# COPY localadmin_internal_data.json $CONFIGS/../localadmin_internal_data.json # Change ownership of directories and set the start script as executable -RUN chown $UID:$GID -R $HOME_DIR /usr/lib/games/steam/ +RUN chown $UID:$GID -R ${STEAM_DIR} ${INSTALL_DIR} ${SERVER_DIR} ${CONFIG_DIR} -ENTRYPOINT /bin/sh /start.sh \ No newline at end of file +ENTRYPOINT /bin/sh ${INSTALL_DIR}/start.sh \ No newline at end of file diff --git a/LICENSE b/LICENSE index aa1f939..0c8f899 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Matthew Green +Copyright (c) 2025 Matthew Green Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/config_gameplay.txt b/config/config_gameplay.txt similarity index 100% rename from config_gameplay.txt rename to config/config_gameplay.txt diff --git a/config_localadmin_global.txt b/config/config_localadmin_global.txt similarity index 100% rename from config_localadmin_global.txt rename to config/config_localadmin_global.txt diff --git a/config_remoteadmin.txt b/config/config_remoteadmin.txt similarity index 100% rename from config_remoteadmin.txt rename to config/config_remoteadmin.txt diff --git a/localadmin_internal_data.json b/config/localadmin_internal_data.json similarity index 100% rename from localadmin_internal_data.json rename to config/localadmin_internal_data.json diff --git a/start.sh b/start.sh index 232d5b7..ce1df76 100644 --- a/start.sh +++ b/start.sh @@ -1,10 +1,10 @@ echo "Current user is: $(whoami)" -steamcmd +force_install_dir $SERVER +login anonymous +app_update 996560 validate +quit +steamcmd +force_install_dir $SERVER_DIR +login anonymous +app_update 996560 validate +quit -chown steam:steam -R $HOME_DIR +chown steam:steam -R $INSTALL_DIR su - steam echo "Current user is: $(whoami)" -cd $SERVER -export HOME=$HOME_DIR +cd $SERVER_DIR +export HOME=$SERVER_DIR ./LocalAdmin $PORT --config $CONFIGS