docs: systemd
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# - name: Deploy Service
|
||||
# hosts: localhost
|
||||
# gather_facts: yes # Required to get the user UID dynamically
|
||||
#
|
||||
# vars:
|
||||
# - workspace_dir: "/tmp/hla_framework_bd"
|
||||
# - svc_current_dir: /sls/bd/hla/dev/services/000-master/current
|
||||
# - app_dir: "{{ svc_current_dir }}/app"
|
||||
#
|
||||
# tasks:
|
||||
# - name: Clone this repository
|
||||
# ansible.builtin.git:
|
||||
# repo: "git@gitea.psi.ch:sls/hla_framework_bd.git"
|
||||
# dest: "{{ workspace_dir }}"
|
||||
# version: main
|
||||
# accept_hostkey: true
|
||||
#
|
||||
# - name: Sync service deployment files
|
||||
# ansible.builtin.copy:
|
||||
# src: ./services/000-master/
|
||||
# dest: "{{ svc_current_dir }}/"
|
||||
# mode: 'preserve'
|
||||
#
|
||||
# - name: Initialize and sync virtual environment with uv
|
||||
# ansible.builtin.command:
|
||||
# cmd: uv venv --allow-existing --system-site-packages .venv
|
||||
# chdir: "{{ app_dir }}"
|
||||
# changed_when: false
|
||||
#
|
||||
# - name: Sync dependencies with uv
|
||||
# ansible.builtin.command:
|
||||
# cmd: uv sync
|
||||
# chdir: "{{ app_dir }}"
|
||||
# changed_when: false
|
||||
#
|
||||
# - name: Manage systemd user service
|
||||
# ansible.builtin.systemd:
|
||||
# name: "{{ svc_current_dir }}/systemd/AGEBD-SERVICE-MASTER.service"
|
||||
# state: restarted
|
||||
# enabled: yes
|
||||
# force: yes
|
||||
# scope: user
|
||||
# daemon_reload: yes
|
||||
# environment:
|
||||
# XDG_RUNTIME_DIR: "/run/user/{{ ansible_effective_user_id }}"
|
||||
@@ -0,0 +1,8 @@
|
||||
# Systemd Service
|
||||
|
||||
## Check all logs
|
||||
|
||||
```
|
||||
sudo su svcusr-sls2hla
|
||||
journalctl --user -u AGEBD-SERVICE-MASTER.service
|
||||
```
|
||||
Reference in New Issue
Block a user