hll_rcon_tool icon indicating copy to clipboard operation
hll_rcon_tool copied to clipboard

Update/simplify compose and docker files

Open cemathey opened this issue 5 months ago • 3 comments

This also includes the changes in PR #512 (I didn't discuss those changes here).

This takes advantage of the fact that all of our upstream Docker dependencies (redis and postgres and node) all provide multiple architecture images.

  • Remove the architecture specific Dockerfiles (the standard one will pull appropriate upstream images)
  • Remove the architecture specific Compose files
  • Update default.env to no longer hard code redis and postgres image names in the compose files so people can manage their deployments easier
  • Update default.env to include the server specific variables for up to 10 servers
  • Add a docker-build.yaml file for users who want to locally build their images (I know you can do that with some of the other compose files, but this has no extraneous compose settings in it and is explicitly named so it should be more clear I think)
  • Updates docker-compose-common-components to be architecture agnostic and to hold the container definitions for service wide containers (redis, postgres and maintenance)
  • Removes docker-compose.yml from source control so that users can modify their deployments without git complaining about conflicting files (important for hands off updates using tools like ansible)
  • Creates templates for a single game server (the most common scenario for starting users) and one with 10 game servers
    • I kept the server number comments in the single game server template because it makes it much easier to manage when using any sort of diff/select/compare tool (for instance visual studio code)
    • Users who want to add more servers just need to copy the relevant chunk out of the ten server template
  • Reorganizes the docker compose template to make server 1 optional (large parts of the environment variables were defined for server 1) and to make the server specific portions as small/simple as possible
  • Removes the env var check from rcongui entrypoint.sh because we now only create that container with the health checks if the backend is running so it's redundant.

I have a Raspberry Pi 5 (arm64) set up at home so I was able to test some of this stuff on that environment and amd64. It should just work on any common architecture (I explicitly checked that redis, postgres node and python images that we use all support amd64, arm32 and arm64 so that covers probably 95%+ of the environments people are trying to run this under.

This isn't ready to be released yet, I didn't want to waste my time updating the readme in case we don't want to merge this.

We also need to change how we're building images for docker hub, to do the multiple architecture build (I tested this on my fork of the repo and with my docker hub account) we would need to add a github action (which does require us to add docker credentials to the repo which only maresh has access to).

I did reach out to Maresh so hopefully if we're all happy with these changes we can get that worked out, I think we probably want to hold this until after we do a release with U14.8 bugs.

Also to be clear this is going to require users to make manual changes on the update (they will have to add the redis/postgres env vars from default.env as well as make a new compose file.

I think the minor upgrade steps are worth it to be able to provide native arm images on the repo, simplify building/deployment and provide users more options without having to manually edit their compose files and deal with git complaining about differences.

cemathey avatar Mar 11 '24 16:03 cemathey