jammsen / docker-palworld-dedicated-server

Docker container to easily provision and manage Palworld Dedicated Server
https://hub.docker.com/r/jammsen/palworld-dedicated-server
MIT License
898 stars 151 forks source link

[Fix PR #160] Refactor file structure, enhance backup manager functionality and fix permissions issues #179

Closed thejcpalma closed 5 months ago

thejcpalma commented 5 months ago

Enhancements and Refactoring

Summary

This PR introduces several enhancements and changes aimed at improving the organization, readability, and functionality of the project. It includes restructuring the file structure, refactoring the code, improving log output, enhancing the backup manager, and updating the Dockerfile and README.md.

Motivation

The motivation behind these changes were to enhance the project's already great structure and functionality. I wanted to do linting on the code to ensure it adheres to best practices and standardization, allowing for the addition of the flow to check shell linting. I also wanted to improve the log output for better readability, hence the new log messages (still to improve). Also, to enhance the backup manager to accept arguments for multiple backup operations. And to fix the permissions issues with the Dockerfile and the volumes, leading to users having to run chmod or chown on the host. (Effectively achieving what I wanted in #147)

Changes

Testing

The changes were validated by running the project locally multiple times with different setups of docker compose, volumes and named volumes and verifying permissions and correct ownership of the main script running on the image. The refactored code was tested with ShellCheck. The improved log output was checked for better readability on both live logging and inspection. The enhanced backup manager was tested with multiple backup operations, during multiple stages of the container, to ensure the best usage and minimize risk scenarios. The updated Dockerfile was used to build a Docker image and run a container to confirm the fixed permissions issues. The new entrypoint script was executed to verify it handles permissions and launches servermanager.sh as the steam user. The updated README.md was reviewed to ensure it accurately reflects the changes and improves usability.

Additional Information

These changes collectively aim to improve the project's overall quality and usability. Also complete/fix #147. Fixes #156. Fixes #117.

thejcpalma commented 5 months ago
  • Added the setup of rcon.yaml to be enforced if RCON_EBABLED=true and RCON_PORT=<rcon_port_number> and ADMIN_PASSWORD=<your_admin_pw> all exist and are set, independently of the value in SERVER_SETTING_MODE.

Might need to change this to act differently because the password should be retrieved from the settings file if the user sets SERVER_SETTING_MODE to manual.

jammsen commented 5 months ago

Whew phew .... what a load of work 🤣