mirror of
https://github.com/chatmail/relay.git
synced 2026-05-21 21:38:03 +00:00
docker/ci: fix startup logging
This commit is contained in:
6
.github/workflows/docker-ci.yaml
vendored
6
.github/workflows/docker-ci.yaml
vendored
@@ -227,8 +227,9 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
HOST: ${{ matrix.host }}
|
HOST: ${{ matrix.host }}
|
||||||
run: |
|
run: |
|
||||||
# Stream docker logs in the background so we see chatmail-init output in real time
|
# Stream journald inside the container so we see chatmail-init output in real time
|
||||||
ssh root@${HOST} 'docker logs -f chatmail' &
|
# (docker logs doesn't work with logging driver: none)
|
||||||
|
ssh root@${HOST} 'docker exec chatmail journalctl -f --no-pager' &
|
||||||
LOG_PID=$!
|
LOG_PID=$!
|
||||||
trap "kill $LOG_PID 2>/dev/null || true" EXIT
|
trap "kill $LOG_PID 2>/dev/null || true" EXIT
|
||||||
for i in $(seq 1 60); do
|
for i in $(seq 1 60); do
|
||||||
@@ -242,7 +243,6 @@ jobs:
|
|||||||
done
|
done
|
||||||
echo "Container did not become healthy in time."
|
echo "Container did not become healthy in time."
|
||||||
kill $LOG_PID 2>/dev/null || true
|
kill $LOG_PID 2>/dev/null || true
|
||||||
ssh root@${HOST} 'cd /srv/chatmail/relay && docker compose logs --tail=200'
|
|
||||||
echo "--- failed units ---"
|
echo "--- failed units ---"
|
||||||
ssh root@${HOST} 'docker exec chatmail systemctl --failed --no-pager' || true
|
ssh root@${HOST} 'docker exec chatmail systemctl --failed --no-pager' || true
|
||||||
echo "--- service logs ---"
|
echo "--- service logs ---"
|
||||||
|
|||||||
Reference in New Issue
Block a user