From 7091e273b67a9fa8ba15d25cd6fe9b0cab8027c2 Mon Sep 17 00:00:00 2001 From: norimicry Date: Sun, 24 Mar 2024 14:11:06 -0400 Subject: [PATCH 1/6] Improve README formatting and update Dockerfile Made formatting changes to README.md for improved readability and updated Dockerfile to use Debian 11 as base image, and fetch correct version of dotnet-sdk. `.gitignore` file has been updated to ignore more unnecessary files. Changes reflect more updated development environment and recent build processes. --- .gitignore | 28 ++++++++++++++++++- README.md | 71 ++++++++++++++++++++++++++++++++++------------- docker/Dockerfile | 15 +++++----- 3 files changed, 86 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index 507f135..b9ab72e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,27 @@ -valley_saves +# Docker project generated files to ignore +# if you want to ignore files created by your editor/tools, +# please consider a global .gitignore https://help.github.com/articles/ignoring-files +.vagrant* +bin +docker/docker +.*.swp +a.out +*.orig +build_src +.flymake* +.idea +.DS_Store +docs/_build +docs/_static +docs/_templates +.gopath/ +.dotcloud +*.test +bundles/ +.hg/ +.git/ +vendor/pkg/ +pyenv +Vagrantfile + +valley_saves \ No newline at end of file diff --git a/README.md b/README.md index 7633b5e..34db9c0 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,18 @@ This project aims to autostart a Stardew Valley Multiplayer Server as easy as po ## Notes - - Updating to most recent version requires a rebuild: `docker-compose build --no-cache` - - Although I'm trying to put out updates, I don't have the time for testing thoroughly, so if you find issues, including game updates, please put in an issue request and I will try to help. - - Thanks printfuck for the base code and baolatui for helping with hosting files. +- Updating to most recent version requires a rebuild: `docker-compose build --no-cache` +- Although I'm trying to put out updates, I don't have the time for testing thoroughly, so if you find issues, including + game updates, please put in an issue request and I will try to help. +- Thanks printfuck for the base code and baolatui for helping with hosting files. ## Setup ### Configuration -Edit the docker-compose.yml with your desired configuration settings. Setting values are quite descriptive as to what they set. +Edit the docker-compose.yml with your desired configuration settings. Setting values are quite descriptive as to what +they set. + ``` environment: - "VNC_PASSWORD=insecure" @@ -133,7 +136,7 @@ environment: ``` ### Docker-Compose - + ``` git clone https://github.com/norimicry/stardew-multiplayer-docker.git @@ -142,13 +145,19 @@ docker-compose up ## Game Setup -Intially, you have to create or load a game once via VNC or web interface. After that, the Autoload Mod jumps into the previously loaded game save everytime you restart or rebuild the container. The AutoLoad Mod config file is by default mounted as a volume, since it keeps the state of the ongoing game save, but you can also copy your existing game save to the `Saves` volume and define the game save's name in the environment variables. Once started, press the Always On Hotkey (default F9) to enter server mode. +Intially, you have to create or load a game once via VNC or web interface. After that, the Autoload Mod jumps into the +previously loaded game save everytime you restart or rebuild the container. The AutoLoad Mod config file is by default +mounted as a volume, since it keeps the state of the ongoing game save, but you can also copy your existing game save to +the `Saves` volume and define the game save's name in the environment variables. Once started, press the Always On +Hotkey (default F9) to enter server mode. ### VNC -Use a VNC client like `TightVNC` on Windows or plain `vncviewer` on any Linux distribution to connect to the server. You can modify the VNC Port and IP address and Password in the `docker-compose.yml` file like this: +Use a VNC client like `TightVNC` on Windows or plain `vncviewer` on any Linux distribution to connect to the server. You +can modify the VNC Port and IP address and Password in the `docker-compose.yml` file like this: Localhost: + ``` # Server is only reachable on localhost on port 2342... ports: @@ -158,21 +167,36 @@ Localhost: - VNCPASS=insecure ``` -### Web Interface +### Web Interface -On port 5900 (mapped to 5902 by default) inside the container is a web interface. This is a bit easier and more accessible than just the VNC interface. Although you will be asked for the vnc password, I wouldn't recommend exposing the port to the outside world. +On port 5900 (mapped to 5902 by default) inside the container is a web interface. This is a bit easier and more +accessible than just the VNC interface. Although you will be asked for the vnc password, I wouldn't recommend exposing +the port to the outside world. ![img](https://store.eris.cc/uploads/859865e1ab5b23fb223923d9a7e4806b.PNG) ## Accessing the server -- Friends List: Your Steam or GoG friends should be able to see your game and join at will the same way they would normally. -- Direct IP: If you want to set a up direct IP access over the internet "Join LAN Game" you need to open (or forward) port 24642. Or use Server Port Changer to choose a different port.Then give people your external IP. -- Invite Code: Invite Code connections are routed through Steam/GoG . I've provided two methods for delivering your game's current invite code to players: -Invite Code Auto Copy/Paste: The server will copy the most up-to-date invite code to the clipboard (on by default in the config.json file) whenever it changes. You can then use a macro program of your choice to paste that code into the chat service of your choice so that your non-steam friends can always have access to the most up-to-date invite code even when you are not there. For your convenience I've included an AutoHotkey script under the Files Tab> Optional Files here on Nexus that you can use. Run the Game Server>Run the AutoHotKey Script>Open Discord or other chat service and click into the chatbox of that service. The current invite code for your game will be pasted and sent every two minutes. Do not close the chat window of your chat service or click out of the chat box or it will not work. When the game server is turned off it will no longer copy the key so be sure to turn off AutoHotKey as well. -Invite Code Bot: The server will copy the invite code to an "InviteCode.txt" file in the same folder as the mod. You can use this to make a bot for a chat service/website/etc. I've provided the code for a node.js Discord bot in the "Discord Bots" section at the bottom of this page. +- Friends List: Your Steam or GoG friends should be able to see your game and join at will the same way they would + normally. +- Direct IP: If you want to set a up direct IP access over the internet "Join LAN Game" you need to open (or forward) + port 24642. Or use Server Port Changer to choose a different port.Then give people your external IP. +- Invite Code: Invite Code connections are routed through Steam/GoG . I've provided two methods for delivering your + game's current invite code to players: + Invite Code Auto Copy/Paste: The server will copy the most up-to-date invite code to the clipboard (on by default in + the config.json file) whenever it changes. You can then use a macro program of your choice to paste that code into the + chat service of your choice so that your non-steam friends can always have access to the most up-to-date invite code + even when you are not there. For your convenience I've included an AutoHotkey script under the Files Tab> Optional + Files here on Nexus that you can use. Run the Game Server>Run the AutoHotKey Script>Open Discord or other chat + service and click into the chatbox of that service. The current invite code for your game will be pasted and sent + every two minutes. Do not close the chat window of your chat service or click out of the chat box or it will not work. + When the game server is turned off it will no longer copy the key so be sure to turn off AutoHotKey as well. + Invite Code Bot: The server will copy the invite code to an "InviteCode.txt" file in the same folder as the mod. You + can use this to make a bot for a chat service/website/etc. I've provided the code for a node.js Discord bot in the " + Discord Bots" section at the bottom of this page. -(Taken from mod description. See [Always On Server](https://www.nexusmods.com/stardewvalley/mods/2677?tab=description) for more info.) +(Taken from mod description. See [Always On Server](https://www.nexusmods.com/stardewvalley/mods/2677?tab=description) +for more info.) ## Mods @@ -189,16 +213,25 @@ Invite Code Bot: The server will copy the invite code to an "InviteCode.txt" ### Waiting for Day to End -Check VNC just to make sure the host hasn't gotten stuck on a prompt. +Check VNC just to make sure the host hasn't gotten stuck on a prompt. ### Error Messages in Console -Usually you should be able to ignore any message there. If the game doesn't start or any errors appear, you should look for messages like "cannot open display", which would most likely indicate permission errors. +Usually you should be able to ignore any message there. If the game doesn't start or any errors appear, you should look +for messages like "cannot open display", which would most likely indicate permission errors. ### VNC -Access the game via VNC to initially load or start a pre-generated savegame. You can control the server from there or edit the config.json files in the configs folder. +Access the game via VNC to initially load or start a pre-generated savegame. You can control the server from there or +edit the config.json files in the configs folder. ## Disclaimer -This multiplayer server container is designed to distribute game files for the purpose of facilitating multiplayer gaming experiences. By utilizing this server container, you acknowledge and agree that you are expected to possess a legal copy of the game for which the files are being distributed. These files are intended solely for the purpose of running a multiplayer server and should not be used in any other manner. The distributed game files are to be strictly used for the operation of multiplayer servers. Any other use, including but not limited to reproduction, modification, or distribution for personal or commercial gain, is strictly prohibited. The distribution of these game files does not imply endorsement or sponsorship by the creators or owners of the game. We are solely providing a platform for multiplayer gaming experiences. \ No newline at end of file +This multiplayer server container is designed to distribute game files for the purpose of facilitating multiplayer +gaming experiences. By utilizing this server container, you acknowledge and agree that you are expected to possess a +legal copy of the game for which the files are being distributed. These files are intended solely for the purpose of +running a multiplayer server and should not be used in any other manner. The distributed game files are to be strictly +used for the operation of multiplayer servers. Any other use, including but not limited to reproduction, modification, +or distribution for personal or commercial gain, is strictly prohibited. The distribution of these game files does not +imply endorsement or sponsorship by the creators or owners of the game. We are solely providing a platform for +multiplayer gaming experiences. \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 44d3c80..00cfe8b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ # Pull base image. -FROM jlesage/baseimage-gui:debian-10 +FROM jlesage/baseimage-gui:debian-11-v4 # Set the name of the application. ENV APP_NAME="StardewValley" @@ -16,16 +16,15 @@ RUN mkdir -p /data/Stardew && \ tar xf /data/latest.tar.gz -C /data/Stardew && \ rm /data/latest.tar.gz -RUN wget -qO dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/6788a5a5-1879-4095-948d-72c7fbdf350f/c996151548ec9f24d553817db64c3577/dotnet-sdk-5.0.402-linux-x64.tar.gz \ -#RUN wget -qO dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/95352809-7f41-40f3-974d-8d530321a8e4/0024d7bf0c872f176ceba7a63a34915b/dotnet-runtime-6.0.0-linux-musl-x64.tar.gz \ - && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ - && rm dotnet.tar.gz \ - && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet +RUN wget -qO dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/d4b71fac-a2fd-4516-ac58-100fb09d796a/e79d6c2a8040b59bf49c0d167ae70a7b/dotnet-sdk-5.0.408-linux-arm64.tar.gz &&\ + tar -zxf dotnet.tar.gz -C /usr/share/dotnet &&\ + rm dotnet.tar.gz &&\ + ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet RUN wget https://mirror.cloudcraft.info/SMAPI_latest.zip -qO /data/nexus.zip && \ unzip /data/nexus.zip -d /data/nexus/ && \ - /bin/bash -c "SMAPI_NO_TERMINAL=true SMAPI_USE_CURRENT_SHELL=true echo -e \"2\n\n\" | /data/nexus/SMAPI\ 4.0.1\ installer/internal/linux/SMAPI.Installer --install --game-path \"/data/Stardew/game\"" || : - + SMAPI_INSTALLER=$(find /data/nexus -name 'SMAPI*.installer' -type f | head -n 1) && \ + /bin/bash -c "SMAPI_NO_TERMINAL=true SMAPI_USE_CURRENT_SHELL=true echo -e "2\n\n" | $SMAPI_INSTALLER --install --game-path "/data/Stardew/game"" || : # Add Mods & Scripts COPY ["mods/", "/data/Stardew/game/Mods/"] From 0718a55ab1f338eace88a7db6c5cd8bf8aab76e1 Mon Sep 17 00:00:00 2001 From: norimicry Date: Sun, 24 Mar 2024 14:15:02 -0400 Subject: [PATCH 2/6] Revised environment variables in README.md The environment variables under the VNC section in README.md have been reformatted for improved readability. Additionally, provided some comments aid better understanding of the configuration. --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 34db9c0..3e1b994 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,11 @@ they set. ``` environment: - - "VNC_PASSWORD=insecure" - - "DISPLAY_HEIGHT=900" - - "DISPLAY_WIDTH=1200" + ## VNC + - VNC_PASSWORD=insecure + - DISPLAY_HEIGHT=900 + - DISPLAY_WIDTH=1200 + ## Always On Server mod # Removing this will probably defeat the point of ever using this? - ENABLE_ALWAYSONSERVER_MOD=${ENABLE_ALWAYSONSERVER_MOD-true} From 594a355fc05b1bc04c8ec4f3ff58b128eb251462 Mon Sep 17 00:00:00 2001 From: norimicry Date: Sat, 30 Mar 2024 11:12:11 -0400 Subject: [PATCH 3/6] Updated Dockerfile and added .gitattributes Adjusted Docker `FROM` statement in Dockerfile and removed app-icon installation. Updated SMAPI installer command to search in the correct directory. Added .gitattributes file to ensure line-endings are consistent by converting all CRLF to LF. --- .gitattributes | 3 +++ docker/Dockerfile | 11 ++++------- 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c248938 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=auto +*.sh text eol=lf +*.conf text eol=lf \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 1401625..08c96a2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,13 +1,10 @@ # Pull base image. -FROM jlesage/baseimage-gui:debian-11-v4 +FROM jlesage/baseimage-gui:debian-11 # Set the name of the application. ENV APP_NAME="StardewValley" -RUN apt-get update -RUN apt-get install -y wget unzip tar strace mono-complete xterm gettext-base jq netcat procps -RUN APP_ICON_URL=https://stardewcommunitywiki.com/mediawiki/images/4/48/Fiddlehead_Fern.png && \ - install_app_icon.sh "$APP_ICON_URL" +RUN apt-get update && apt-get install -y wget unzip tar strace mono-complete xterm gettext-base jq netcat procps && apt-get clean # Game + ModLoader 1.6.2 4.0.1 RUN mkdir -p /data/Stardew && \ @@ -23,8 +20,8 @@ RUN wget -qO dotnet.tar.gz https://download.visualstudio.microsoft.com/download/ RUN wget https://mirror.cloudcraft.info/SMAPI_latest.zip -qO /data/nexus.zip && \ unzip /data/nexus.zip -d /data/nexus/ && \ - SMAPI_INSTALLER=$(find /data/nexus -name 'SMAPI*.installer' -type f | head -n 1) && \ - /bin/bash -c "SMAPI_NO_TERMINAL=true SMAPI_USE_CURRENT_SHELL=true echo -e "2\n\n" | $SMAPI_INSTALLER --install --game-path "/data/Stardew/game"" || : + SMAPI_INSTALLER=$(find /data/nexus -name 'SMAPI*.*Installer' -type f -path "*/SMAPI * installer/internal/linux/*" | head -n 1) && \ + /bin/bash -c "SMAPI_NO_TERMINAL=true SMAPI_USE_CURRENT_SHELL=true echo -e '2\n\n' | \"$SMAPI_INSTALLER\" --install --game-path '/data/Stardew/game'" || : # Add Mods & Scripts COPY ["mods/", "/data/Stardew/game/Mods/"] From 97bb66912c5f88977efb1cd933fe9622ae0c50f1 Mon Sep 17 00:00:00 2001 From: norimicry Date: Sat, 30 Mar 2024 11:21:47 -0400 Subject: [PATCH 4/6] Update commenting format in docker-compose file and improve README instructions This revision cleans up the commenting and syntax layout of the docker-compose file enhancing its readability. The build and setup instructions in the README have been delineated more clearly, contributing to increased user-friendliness and ease of use. --- README.md | 72 +++++++++++++++++++++++----------------------- docker-compose.yml | 54 +++++++++++++++++----------------- 2 files changed, 64 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index d01e1cc..df14c7e 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,21 @@ This project aims to autostart a Stardew Valley Multiplayer Server as easy as po ## Notes -- Updating to most recent version requires a rebuild: `docker-compose build --no-cache` +- Updating to most recent version requires a rebuild: `git pull` and `docker-compose build --no-cache` - Although I'm trying to put out updates, I don't have the time for testing thoroughly, so if you find issues, including game updates, please put in an issue request and I will try to help. - Thanks printfuck for the base code and baolatui for helping with hosting files. ## Setup +### Docker-Compose + +``` +git clone https://github.com/norimicry/stardew-multiplayer-docker.git + +docker-compose up +``` + ### Configuration Edit the docker-compose.yml with your desired configuration settings. Setting values are quite descriptive as to what @@ -18,13 +26,13 @@ they set. ``` environment: - ## VNC + # VNC - VNC_PASSWORD=insecure - DISPLAY_HEIGHT=900 - DISPLAY_WIDTH=1200 - ## Always On Server mod - # Removing this will probably defeat the point of ever using this? + # Always On Server mod + ## Removing this will probably defeat the point of ever using this? - ENABLE_ALWAYSONSERVER_MOD=${ENABLE_ALWAYSONSERVER_MOD-true} - ALWAYS_ON_SERVER_HOTKEY=${ALWAYS_ON_SERVER_HOTKEY-F9} - ALWAYS_ON_SERVER_PROFIT_MARGIN=${ALWAYS_ON_SERVER_PROFIT_MARGIN-100} @@ -56,35 +64,35 @@ environment: - ALWAYS_ON_SERVER_DANCE_OF_JELLIES_TIMEOUT=${ALWAYS_ON_SERVER_DANCE_OF_JELLIES_TIMEOUT-120} - ALWAYS_ON_SERVER_FESTIVAL_OF_ICE_TIMEOUT=${ALWAYS_ON_SERVER_FESTIVAL_OF_ICE_TIMEOUT-120 } - ## Auto Load Game mod - # Removing this will mean you need to VNC in to manually start the game each boot + # Auto Load Game mod + ## Removing this will mean you need to VNC in to manually start the game each boot - ENABLE_AUTOLOADGAME_MOD=${ENABLE_AUTOLOADGAME-null} - AUTO_LOAD_GAME_LAST_FILE_LOADED=${AUTO_LOAD_GAME_LAST_FILE_LOADED-null} - AUTO_LOAD_GAME_FORGET_LAST_FILE_ON_TITLE=${AUTO_LOAD_GAME_FORGET_LAST_FILE_ON_TITLE-true} - AUTO_LOAD_GAME_LOAD_INTO_MULTIPLAYER=${AUTO_LOAD_GAME_LOAD_INTO_MULTIPLAYER-true} - ## Save Backup mod - # Disabling this will stop saves being backed up + # Save Backup mod + ## Disabling this will stop saves being backed up - ENABLE_SAVEBACKUP_MOD=${ENABLE_SAVEBACKUP_MOD-true} - ## Chat Commands mod + # Chat Commands mod - ENABLE_CHATCOMMANDS_MOD=${ENABLE_CHATCOMMANDS_MOD-false} - ## Console Commands mod + # Console Commands mod - ENABLE_CONSOLECOMMANDS_MOD=${ENABLE_CONSOLECOMMANDS_MOD-false} - ## Time Speed mod + # Time Speed mod - ENABLE_TIMESPEED_MOD=${ENABLE_TIMESPEED_MOD-false} - # Days are only 20 hours long - # 7.0 = 14 mins per in game day (default) - # 10.0 = 20 mins - # 15.0 = 30 mins - # 20.0 = 40 mins - # 30.0 = 1 hour - # 120.0 = 4 hours - # 300.0 = 10 hours - # 600.0 = 20 hours (realtime) + ## Days are only 20 hours long + ## 7.0 = 14 mins per in game day (default) + ## 10.0 = 20 mins + ## 15.0 = 30 mins + ## 20.0 = 40 mins + ## 30.0 = 1 hour + ## 120.0 = 4 hours + ## 300.0 = 10 hours + ## 600.0 = 20 hours (realtime) - TIME_SPEED_DEFAULT_TICK_LENGTH=${TIME_SPEED_DEFAULT_TICK_LENGTH-7.0} - TIME_SPEED_TICK_LENGTH_BY_LOCATION_INDOORS=${TIME_SPEED_TICK_LENGTH_BY_LOCATION_INDOORS-7.0} @@ -100,7 +108,7 @@ environment: - TIME_SPEED_KEYS_DECREASE_TICK_INTERVAL=${TIME_SPEED_KEYS_DECREASE_TICK_INTERVAL-OemComma} - TIME_SPEED_KEYS_RELOAD_CONFIG=${TIME_SPEED_KEYS_RELOAD_CONFIG-B} - ## Crops Anytime Anywhere mod + # Crops Anytime Anywhere mod - ENABLE_CROPSANYTIMEANYWHERE_MOD=${ENABLE_CROPSANYTIMEANYWHERE_MOD-false} - CROPS_ANYTIME_ANYWHERE_ENABLE_IN_SEASONS_SPRING=${CROPS_ANYTIME_ANYWHERE_ENABLE_IN_SEASONS_SPRING-true} @@ -115,7 +123,7 @@ environment: - CROPS_ANYTIME_ANYWHERE_FORCE_TILLABLE_STONE=${CROPS_ANYTIME_ANYWHERE_FORCE_TILLABLE_STONE-false} - CROPS_ANYTIME_ANYWHERE_FORCE_TILLABLE_OTHER=${CROPS_ANYTIME_ANYWHERE_FORCE_TILLABLE_OTHER-false} - ## Friends Forever mod + # Friends Forever mod - ENABLE_FRIENDSFOREVER_MOD=${ENABLE_FRIENDSFOREVER_MOD-false} - FRIENDS_FOREVER_AFFECT_SPOUSE=${FRIENDS_FOREVER_AFFECT_SPOUSE-false} @@ -123,24 +131,16 @@ environment: - FRIENDS_FOREVER_AFFECT_EVERYONE_ELSE=${FRIENDS_FOREVER_AFFECT_EVERYONE_ELSE-true} - FRIENDS_FOREVER_AFFECT_ANIMALS=${FRIENDS_FOREVER_AFFECT_ANIMALS-true} - ## No Fence Decay mod + # No Fence Decay mod - ENABLE_NOFENCEDECAY_MOD=${ENABLE_NOFENCEDECAY_MOD-false} - ## Non-destructive NPCs mod + # Non-destructive NPCs mod - ENABLE_NONDESTRUCTIVENPCS_MOD=${ENABLE_NONDESTRUCTIVENPCS_MOD-false} ``` -### Docker-Compose - -``` -git clone https://github.com/norimicry/stardew-multiplayer-docker.git - -docker-compose up -``` - ## Game Setup -Intially, you have to create or load a game once via VNC or web interface. After that, the Autoload Mod jumps into the +Initially, you have to create or load a game once via VNC or web interface. After that, the Autoload Mod jumps into the previously loaded game save everytime you restart or rebuild the container. The AutoLoad Mod config file is by default mounted as a volume, since it keeps the state of the ongoing game save, but you can also copy your existing game save to the `Saves` volume and define the game save's name in the environment variables. Once started, press the Always On @@ -154,9 +154,9 @@ can modify the VNC Port and IP address and Password in the `docker-compose.yml` Localhost: ``` - # Server is only reachable on localhost on port 2342... + # Server is only reachable on localhost on port 5902... ports: - - 127.0.0.1:2342:5900 + - 127.0.0.1:5902:5900 # ... with the password "insecure" environment: - VNCPASS=insecure @@ -164,7 +164,7 @@ Localhost: ### Web Interface -On port 5900 (mapped to 5902 by default) inside the container is a web interface. This is a bit easier and more +On port 5800 (mapped to 5801 by default) inside the container is a web interface. This is a bit easier and more accessible than just the VNC interface. Although you will be asked for the vnc password, I wouldn't recommend exposing the port to the outside world. diff --git a/docker-compose.yml b/docker-compose.yml index 1aaec2f..d2d397f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,11 +5,13 @@ services: build: docker container_name: stardew environment: - - "VNC_PASSWORD=insecure" - - "DISPLAY_HEIGHT=900" - - "DISPLAY_WIDTH=1200" - ## Always On Server mod - # Removing this will probably defeat the point of ever using this? + # VNC + - VNC_PASSWORD=insecure + - DISPLAY_HEIGHT=900 + - DISPLAY_WIDTH=1200 + + # Always On Server mod + ## Removing this will probably defeat the point of ever using this? - ENABLE_ALWAYSONSERVER_MOD=${ENABLE_ALWAYSONSERVER_MOD-true} - ALWAYS_ON_SERVER_HOTKEY=${ALWAYS_ON_SERVER_HOTKEY-F9} - ALWAYS_ON_SERVER_PROFIT_MARGIN=${ALWAYS_ON_SERVER_PROFIT_MARGIN-100} @@ -41,35 +43,35 @@ services: - ALWAYS_ON_SERVER_DANCE_OF_JELLIES_TIMEOUT=${ALWAYS_ON_SERVER_DANCE_OF_JELLIES_TIMEOUT-120} - ALWAYS_ON_SERVER_FESTIVAL_OF_ICE_TIMEOUT=${ALWAYS_ON_SERVER_FESTIVAL_OF_ICE_TIMEOUT-120 } - ## Auto Load Game mod - # Removing this will mean you need to VNC in to manually start the game each boot - - ENABLE_AUTOLOADGAME_MOD=${ENABLE_AUTOLOADGAME-true} + # Auto Load Game mod + ## Removing this will mean you need to VNC in to manually start the game each boot + - ENABLE_AUTOLOADGAME_MOD=${ENABLE_AUTOLOADGAME-null} - AUTO_LOAD_GAME_LAST_FILE_LOADED=${AUTO_LOAD_GAME_LAST_FILE_LOADED-null} - AUTO_LOAD_GAME_FORGET_LAST_FILE_ON_TITLE=${AUTO_LOAD_GAME_FORGET_LAST_FILE_ON_TITLE-true} - AUTO_LOAD_GAME_LOAD_INTO_MULTIPLAYER=${AUTO_LOAD_GAME_LOAD_INTO_MULTIPLAYER-true} - ## Save Backup mod - # Disabling this will stop saves being backed up + # Save Backup mod + ## Disabling this will stop saves being backed up - ENABLE_SAVEBACKUP_MOD=${ENABLE_SAVEBACKUP_MOD-true} - ## Chat Commands mod + # Chat Commands mod - ENABLE_CHATCOMMANDS_MOD=${ENABLE_CHATCOMMANDS_MOD-false} - ## Console Commands mod + # Console Commands mod - ENABLE_CONSOLECOMMANDS_MOD=${ENABLE_CONSOLECOMMANDS_MOD-false} - ## Time Speed mod + # Time Speed mod - ENABLE_TIMESPEED_MOD=${ENABLE_TIMESPEED_MOD-false} - # Days are only 20 hours long - # 7.0 = 14 mins per in game day (default) - # 10.0 = 20 mins - # 15.0 = 30 mins - # 20.0 = 40 mins - # 30.0 = 1 hour - # 120.0 = 4 hours - # 300.0 = 10 hours - # 600.0 = 20 hours (realtime) + ## Days are only 20 hours long + ## 7.0 = 14 mins per in game day (default) + ## 10.0 = 20 mins + ## 15.0 = 30 mins + ## 20.0 = 40 mins + ## 30.0 = 1 hour + ## 120.0 = 4 hours + ## 300.0 = 10 hours + ## 600.0 = 20 hours (realtime) - TIME_SPEED_DEFAULT_TICK_LENGTH=${TIME_SPEED_DEFAULT_TICK_LENGTH-7.0} - TIME_SPEED_TICK_LENGTH_BY_LOCATION_INDOORS=${TIME_SPEED_TICK_LENGTH_BY_LOCATION_INDOORS-7.0} @@ -85,7 +87,7 @@ services: - TIME_SPEED_KEYS_DECREASE_TICK_INTERVAL=${TIME_SPEED_KEYS_DECREASE_TICK_INTERVAL-OemComma} - TIME_SPEED_KEYS_RELOAD_CONFIG=${TIME_SPEED_KEYS_RELOAD_CONFIG-B} - ## Crops Anytime Anywhere mod + # Crops Anytime Anywhere mod - ENABLE_CROPSANYTIMEANYWHERE_MOD=${ENABLE_CROPSANYTIMEANYWHERE_MOD-false} - CROPS_ANYTIME_ANYWHERE_ENABLE_IN_SEASONS_SPRING=${CROPS_ANYTIME_ANYWHERE_ENABLE_IN_SEASONS_SPRING-true} @@ -100,7 +102,7 @@ services: - CROPS_ANYTIME_ANYWHERE_FORCE_TILLABLE_STONE=${CROPS_ANYTIME_ANYWHERE_FORCE_TILLABLE_STONE-false} - CROPS_ANYTIME_ANYWHERE_FORCE_TILLABLE_OTHER=${CROPS_ANYTIME_ANYWHERE_FORCE_TILLABLE_OTHER-false} - ## Friends Forever mod + # Friends Forever mod - ENABLE_FRIENDSFOREVER_MOD=${ENABLE_FRIENDSFOREVER_MOD-false} - FRIENDS_FOREVER_AFFECT_SPOUSE=${FRIENDS_FOREVER_AFFECT_SPOUSE-false} @@ -108,10 +110,10 @@ services: - FRIENDS_FOREVER_AFFECT_EVERYONE_ELSE=${FRIENDS_FOREVER_AFFECT_EVERYONE_ELSE-true} - FRIENDS_FOREVER_AFFECT_ANIMALS=${FRIENDS_FOREVER_AFFECT_ANIMALS-true} - ## No Fence Decay mod + # No Fence Decay mod - ENABLE_NOFENCEDECAY_MOD=${ENABLE_NOFENCEDECAY_MOD-false} - ## Non-destructive NPCs mod + # Non-destructive NPCs mod - ENABLE_NONDESTRUCTIVENPCS_MOD=${ENABLE_NONDESTRUCTIVENPCS_MOD-false} ports: From 656ee0bcb52001f78bb25afef0f53c174d4c978e Mon Sep 17 00:00:00 2001 From: norimicry Date: Sat, 30 Mar 2024 12:19:04 -0400 Subject: [PATCH 5/6] Set default ENABLE_AUTOLOADGAME_MOD to true in docker-compose The ENABLE_AUTOLOADGAME_MOD variable has been updated to default to 'true' instead of 'null' in the docker-compose configuration. This change sets the game to autoload by default, eliminating the need for manual start of the game at each boot. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d2d397f..1e7ee25 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,7 +45,7 @@ services: # Auto Load Game mod ## Removing this will mean you need to VNC in to manually start the game each boot - - ENABLE_AUTOLOADGAME_MOD=${ENABLE_AUTOLOADGAME-null} + - ENABLE_AUTOLOADGAME_MOD=${ENABLE_AUTOLOADGAME-true} - AUTO_LOAD_GAME_LAST_FILE_LOADED=${AUTO_LOAD_GAME_LAST_FILE_LOADED-null} - AUTO_LOAD_GAME_FORGET_LAST_FILE_ON_TITLE=${AUTO_LOAD_GAME_FORGET_LAST_FILE_ON_TITLE-true} - AUTO_LOAD_GAME_LOAD_INTO_MULTIPLAYER=${AUTO_LOAD_GAME_LOAD_INTO_MULTIPLAYER-true} From df0ef12af005f50c0c8492398baa93bfc230edb8 Mon Sep 17 00:00:00 2001 From: norimicry Date: Wed, 3 Apr 2024 08:37:55 -0400 Subject: [PATCH 6/6] Update .gitattributes for Dockerfile Added a line in the .gitattributes file to enforce LF line endings for Dockerfile. This is to avoid any potential issues with line endings when working cross-platform, ensuring that Dockerfile will consistently use LF regardless of the environment. --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index c248938..640b54b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ * text=auto +Dockerfile text eol=lf *.sh text eol=lf *.conf text eol=lf \ No newline at end of file