Closed SamuelMS closed 4 months ago
lgtm, 3 minor request:
echo "Stay In Tarkov Docker"
(preferrably shown on every run)touch delete_me
, not used anymorelgtm, 3 minor request:
- please cleanup the gitignore file, that file itself is bigger than the complete SIT.Docker repo
- add back the
echo "Stay In Tarkov Docker"
(preferrably shown on every run)- no need to
touch delete_me
, not used anymore
Done!
Thanks for putting this Docker image together – was able to get it hosted on a cloud provider (for personal use) in pretty short order. I did have to make some changes to how the container spins itself up, though.
Motivation
In a stable cloud environment, we need to have the flexibility to take the server down for maintenance, take periodic backups, and switch around data volumes to test isolated mod setups. With the default behavior,
bullet.sh
runs as the dockerCMD
out of the box – and since it always copies over server files (including the "delete me" safety file), existing content would both get overwritten and the safety file would need to be removed again.Proposal
bullet.sh
in theCMD
to a standard docker entrypoint, which lets us configure the container before it runs the AKI server throughCMD
. This way, we can easily run setup tasks only when necessary, and directly runAki.Server.exe
otherwise.version
file that only gets added when the setup step is complete. For future updates (currently not implemented), we can check against the stored version and, if different from what's presently installed, log a warning and prompt the user to remove theversion
file if they'd like to update.So in summary, if the
version
file is not detected when the entrypoint runs, it performs a one-time setup operation and generates thisversion
file (with the tag of the docker image /SIT
environment variable as its contents); and in future runs, will skip the setup step and directly runAki.Server.exe
instead.I also added a
.gitignore
file so IDE and OS artifacts don't get pulled in by accident, but my default template is pretty verbose so I'm happy to remove some of the fluff if you prefer.