Build a massa-node container wich include some automation features from a community image with Massalabs agreements
This image include a script named "/massa-guard/massa-guard.sh" to:
[GENERAL]
Enable/Disable all massa-guard features (Except keys creations) with the "MASSAGUARD" setting in config.ini
Link node storage files to massa_mount
[AUTOBUY/AUTOSELL]
Autobuy 1 roll when your node failed and lost his "Active rolls".
Autobuy X rolls when your MAS amount greater than 100 MAS and if "Active rolls" dont exceed "TARGET_ROLL_AMOUNT", if value set in /massa_mount/config/config.ini.
Autosell X rolls when "Active rolls" exceed "TARGET_ROLL_AMOUNT", if value set in /massa_mount/config/config.ini.
[WATCHDOG]
Restart node when hang or when ram consumption exceed 90% (Value can be adjust)
You host your node under a dynamical IP? massa-guard will watch IP change and update your config.toml and push IP updates to massabot.
Logs actions over /massa_mount/logs/ and backup node logs before restart if necessary.
Push events over *** Webhook
[STARTING FROM SCRATCH]
Massa-guard will auto create wallet + nodekey + stacke privkey; all with default password "MassaToTheMoon2022".
Massa-guard auto create your config.toml with your public IP.
Just create an empty folder to mount into our container /massa_mount path and run!
Or restore your wallet(s) and/or nodekey and/or config.toml into this folder if you have it:
wallet_%%%.dat
config.toml
node_privkey.key
/!\ If don't have this file, leave your folder empty, massa-guard will create a wallet and node key and automaticaly stake wallet for you. This files will be backup on your mount point by massa-guard.
[RUN] Usecase Example
/!\ You can define ENV values when you create your container:
''MASSAGUARD'' - Set with 1 to enable all massa-guard features or with 0 to disable all features except keys creations (Enable by default without ENV value)
''DYNIP'' - Set with "0" if you host under static public IP or "1" if you host under dynimic public IP to enable update IP feature
''WALLETPWD'' - Set with "YourCustomPassword" if you want to use a custom wallet password.
''NODEPWD'' - Set with "YourCustomPassword" if you want to use a custom node password.
''IP'' - Set with "YourIPAddress" if your node have differents publics IPs and you want to set your custom selection.
/!\ Please note, this ENV variables have a low priority if a previous config.ini exist in your mount point.
Example N°1: Container creation example with ENV variables docker argument to restart container with host: