Closed thejcpalma closed 7 months ago
Some explanations on some things:
-passthrough-logs
in supercronic -> Improves logging as it keeps supercronic job start and end and its status but improves readability of what the job prints:
2024-02-04 16:31:00 palworld-dedicated-server | time="2024-02-04T16:31:00Z" level=info msg=starting iteration=1 job.command="backup_manager --create" job.position=0 job.schedule="*/1 * * * *"
2024-02-04 16:31:00 palworld-dedicated-server | Broadcasted: 16-31-00-Saving-in-5-seconds
2024-02-04 16:31:05 palworld-dedicated-server | Broadcasted: Saving-world...
2024-02-04 16:31:05 palworld-dedicated-server | Complete Save
2024-02-04 16:31:06 palworld-dedicated-server | Broadcasted: Saving-done
2024-02-04 16:31:06 palworld-dedicated-server | Broadcasted: Creating-backup
2024-02-04 16:31:08 palworld-dedicated-server | Broadcasted: Backup-done
2024-02-04 16:31:08 palworld-dedicated-server | >> Backup 'saved-20240204_163100.tar.gz' created successfully.
2024-02-04 16:31:08 palworld-dedicated-server | time="2024-02-04T16:31:08Z" level=info msg="job succeeded" iteration=1 job.command="backup_manager --create" job.position=0 job.schedule="*/1 * * * *"
docs/
dir now has all new .md used to specify topics and help without cluttering the main README.md
Any questions just ask 😉
Example image of autobackup creation:
As discussed #179 continues this PR and was just merged to develop. Closing this as agreed.
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
orchown
on the host. (Effectively achieving what I wanted in #147)Changes
VOLUME
andUSER
directives from Dockerfile to fix permissions issues.rcon.yaml
to be enforced ifRCON_EBABLED=true
andRCON_PORT=<rcon_port_number>
andADMIN_PASSWORD=<your_admin_pw>
all exist and are set, independently of the value inSERVER_SETTING_MODE
.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.