No description
Find a file
Kumi 0a4061b499
feat: Initial implementation of LobeChat updater script
This commit introduces the `lobechat-updater` script to update a local LobeChat instance automatically.
2024-05-15 16:15:40 +02:00
contrib feat: Initial implementation of LobeChat updater script 2024-05-15 16:15:40 +02:00
LICENSE feat: Initial implementation of LobeChat updater script 2024-05-15 16:15:40 +02:00
lobechat-updater feat: Initial implementation of LobeChat updater script 2024-05-15 16:15:40 +02:00
README.md feat: Initial implementation of LobeChat updater script 2024-05-15 16:15:40 +02:00

LobeChat Updater

This is a simple script that updates the LobeChat application. It is designed to be run on a server, and will automatically update the application when a new version is tagged.

The script assumes that you use a systemd service to run LobeChat. If you do not, you will need to modify the script to suit your needs.

Installation

  1. Clone this repository to your server.

    git clone https://git.private.coffee/kumi/lobechat-updater.git
    cd lobechat-updater
    
  2. Install the lobechat-updater to /usr/local/bin/:

    sudo install lobechat-updater /usr/local/bin/
    
  3. Install the systemd service and timer:

    sudo cp contrib/lobechat-updater.service /etc/systemd/system/
    sudo cp contrib/lobechat-updater.timer /etc/systemd/system/
    sudo systemctl enable --now lobechat-updater.timer
    

This will install the updater script to /usr/local/bin/lobechat-updater, and will set up a systemd timer to run the updater every 5 minutes.

Configuration

Modify the LOBECHAT_DIR variable in /usr/local/bin/lobechat-updater to point to the directory where LobeChat is installed. By default, this is /opt/lobechat. If the user running LobeChat is not lobechat, you will also need to modify the LOBECHAT_USER variable.

To change the update interval, edit the OnBootSec and OnUnitActiveSec lines in /etc/systemd/system/lobechat-updater.timer.

License

This project is licensed under the MIT License. See the LICENSE file for details.