Added journalctl logging for docker up's and execute portfolio just once condition

This commit is contained in:
2025-05-16 15:26:51 +02:00
parent ae48aebcd7
commit 39b312b997
5 changed files with 68 additions and 14 deletions

View File

@@ -14,4 +14,14 @@ To reinitialize the container execute:
```bash
docker network connect discourse_default central-postgres && /opt/docker/discourse/services/discourse_repository/launcher rebuild discourse_application
```
```
### 🔍 Logging with `journalctl`
All build actions triggered by this role are logged to the system journal using `systemd-cat`. Output is simultaneously shown in the terminal and available via `journalctl`.
To view logs for a specific application:
```bash
journalctl -t rebuild-discourse -f
```

View File

@@ -17,7 +17,10 @@
listen: recreate discourse
- name: rebuild discourse
command:
cmd: "./launcher rebuild {{applications[application_id].container}}"
shell: >
./launcher rebuild {{applications[application_id].container}}
2>&1 | tee >(systemd-cat -t rebuild-{{ application_id }})
args:
executable: /bin/bash
chdir: "{{docker_repository_directory }}"
listen: recreate discourse