Open remiscarlet opened 1 year ago
Yukkuricraft/Yukkuricraft
updates generally won't affect player-facing things on the minecraft server itself so the need to restart should be rare and thus reasonable to manually restart through YakumoDash if required.In the future:
YC user setup is finished.
Thoughts on deployments:
Further Questions:
Ultimately this is neat because we keep all business logic within our py api and don't rely on github actions for deployment.
Random thoughts:
At this point we have:
main
branch to prod host.
Mostly there at this point in terms of infra.
Use https://hub.docker.com/r/databack/mysql-backup for mysql data backups. This will likely require a slight refactor to fs structure.
MC backups may be non-trivial. How to separate out backup plugins from prod vs dev envs? Want to backup prod, not dev, but ideally shared (or possible to be shared) configs.
Could have a bindmount for backup location on prod, and maybe ephem volume for dev? Should clean itself up on docker compose down.
restic
for everything
docker-mc-backup
natively supports restic
mysql-backup
will be the backup generation portion and restic
will be the backup management portion.docker run --hostname $(hostname) -e RESTIC_PASSWORD=foobar -e RESTIC_REPOSITORY=/backup -v /media/backups-primary/restic:/backup restic/restic init
https://github.com/Yukkuricraft/Yukkuricraft/commit/af3759393f652cb2dcecc2d203695eb6e5679002 implements MC backups using itzg/mc-backup
with restic
as the backend.
For mysql
data, may want to create a new image using databack/mysql-backup
as a base, install restic
, and utilize /scripts.d/post-backup
to move the mysql backups to the restic repo accordingly.
https://github.com/Yukkuricraft/Yukkuricraft/commit/eab7fdf0f79bba17ec742223d3cd8148dbe67449 implements MySQL backups using databack/mysql-backup
along with restic
Both MC and MySQL now use a custom image that chown's the restic directory first before continuing with the original entrypoints.
Remaining:
Not super important for now but should implement a sidecar to run restic check
https://github.com/Yukkuricraft/Yukkuricraft/issues/33
Consider: Eventually have every worldgroup backed up at the same time. Will probably have to reimplement some portion of itzg/mc-backup
to accomplish this.
Still using hacky 'load dev env as prod' crap. Start actually thinking of a proper deployment scheme under the
minecraft
user.More generally this gives us the benefit of being able to take live traffic. Wouldn't want to do that with an env that's being dev'd on.