# The systemd user unit im runs under on the server. The deploy workflow # installs this file as ~/.config/systemd/user/im.service on every release, # reloads the manager, enables the unit and restarts it, so a freshly # provisioned box needs nothing but the SSH user, the deploy directory and # `loginctl enable-linger` (once, so the unit outlives the login). # # The working directory is the deploy path itself, not the release: the # binary reads config/im.toml, the database and the key relative to it, # and only current/ is swapped by a deploy. [Unit] Description=im After=network-online.target [Service] WorkingDirectory=%h/im ExecStart=%h/im/current/im-web Restart=on-failure [Install] WantedBy=default.target