Multi account migration - fanaticscripter/EggContractor GitHub Wiki
What's new with multi-account mode
You can now track solo contracts and coops of multiple accounts right on the home page, complete with the full feature set.
The home page has also been improved:
- Contracts are sorted by name, then nickname for solos and code for coops;
- Option to filter to a single contract;
- Option to hide solo contracts, i.e. only display coops.
Migration steps
-
Back up database. DB migration is automatic, but always prepare for the worst:
docker-compose exec app /EggContractor backup
-
Shut down the services:
docker-compose down
-
Pull new images:
docker-compose pull
-
Update config.yml to multi-account syntax. Specifically, convert
[player] id = "EI1234567890123456"
to
[players](/fanaticscripter/EggContractor/wiki/players) id = "EI1234567890123456" [players](/fanaticscripter/EggContractor/wiki/players) id = "EI9876543210987654" # and more...
If you want to keep using a single account, you merely need to change
[player]
to[players](/fanaticscripter/EggContractor/wiki/players)
. -
Update
docker-compose.yml
: changeofelia.job-exec.refresh.command: "/EggContractor refresh"
to
ofelia.job-exec.refresh.command: "/EggContractor refresh --no-display"
This reduces database pressure during refreshes especially with updating a large number of coops.
-
Restart the services:
docker-compose up -d
Maintenance considerations
Your database can grow quickly if you're tracking a lot of users. This can negatively affect database performance, and in extreme cases, fill up your disk. To mitigate this problem, you may start afresh at any point:
docker-compose exec app /EggContractor backup
docker-compose down
# Move the backup to cold storage if you wish.
rm -f data/data.db data/data.db-shm data/data.db-wal
docker-compose up -d
Also, backups are not automatically removed at the moment, so they can take up a considerable amount of disk space after a while. You should consider thinning backups periodically.
For coop organizers
You probably want to share the https://your.domain/?hide_solos=1
URL to hide solos by default (note that users can still uncheck the checkbox to reveal tracked solo contracts).
You can also add a c=<contract_id>
query param for each contract to filter by default (e.g. https://your.domain/?hide_solos=1&c=pi-cleanse-2021
).