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
911 stars 158 forks source link

Refactor file structure, enhance backup manager functionality and fix permissions issues #160

Closed thejcpalma closed 7 months ago

thejcpalma commented 8 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 8 months ago

Some explanations on some things:

Any questions just ask 😉

Example image of autobackup creation: image

jammsen commented 7 months ago

As discussed #179 continues this PR and was just merged to develop. Closing this as agreed.