Update README.md

This commit is contained in:
Woodson Gates
2024-08-11 21:51:04 -04:00
committed by GitHub
parent 8041eac7b6
commit 8cc9e45669
+24
View File
@@ -222,3 +222,27 @@ $ node track-investments.js
```
It is recommended to run this script once per month.
# Setup with Docker:
This guide assumes you already have a working version of docker installed and have cloned the repo to a location of your choice.
Build the container image_
`docker build -t actual-helper ./`
Test if the docker container works correctly.
`docker run -itd actual-helper --name actual-helper`
`docker exec actual-helper node sync-banks.js`
If it is working correctly the bank sync should execute and run. Now lets automate this to run on a schedule. To do this we will be using systemd timers and a shell script to create a new container and execute the update scripts we want to use.
Allow the script to be executed. Update the script where it does `docker exec` to include any of the scripts you wish to run.
`chmod +x ./update.sh`
Update the actual-helper.service file to point to the correct location of the update.sh file. Change the user and group info if needed. Also add a healthchecks.io ID to the **.env** if you want to automate alerting as well.
`mv ./actual-helper.timer /etc/systemd/system`
`mv ./actual-helper.service /etc/systemd/system`
`systemctl enable actual-helper.timer`
`systemctl enable actual-helper.service`
Note: The timer is configured to run at midnight daily by default.