Installation

The deployment process has been automated using GitHub actions. New semver tags will trigger the build pipeline and create a draft release with GitHub's releases feature. To deploy the new version, the deploy action needs to be triggered manually. This manual intervention was chosen to separate the deployment from the main git branch. It allows the main branch to always contain the latest code whilst retaining control over the deployment.

To install the WindAutomat manually. Follow these steps.

Download WindAutomat

  1. Download the binary from https://github.com/WindReserve/windautomat/releases
  2. Extract the binary to /usr/local/bin/windautomat

Create required directories

  1. Create working directory /etc/windautomat
  2. Create tmux sessions log directory /var/windautomat/sessions_log
  3. Change ownership of both directories to windautomat user

Create .env file

Download the example.env file to /etc/windautomat.env and fill in the configuration.

Setup PostgreSQL

Install

Refer to the PostgreSQL Install Guide

Setup

  1. Create postgres user windautomat
  2. Create database windautomat with owner windautomat
  3. Create schema windautomat
  4. Apply database migrations (see CLI DB Migrations)

Create systemd unit

Create file with these contents at /etc/systemd/system/windautomat.service, then enable and start the systemd service.

[Unit]
Description=WindAutomat
# start the app after the network is available
After=network.target

[Service]
Type=simple
User=$WINDAUTOMAT_USER
# path to your application's root directory
WorkingDirectory=/etc/windautomat

ExecStart=/usr/local/bin/windautomat

Restart=always

[Install]
# start the app automatically
WantedBy=multi-user.target