Skip to content

Commit

Permalink
Merge pull request #319 from docksal/feature/logs
Browse files Browse the repository at this point in the history
Reduce noise in runtime logs
lmakarov authored Apr 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents e222fda + 51482a6 commit 05484b1
Showing 9 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/docker-tags.sh
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ set_output() {
# Print with new lines for output in build logs
(IFS=$'\n'; echo "${outputArr[*]}")
# Using newlines in output variables does not seem to work, so we'll use comas
(IFS=$','; echo tags="${outputArr[*]}" | tee -a ${$GITHUB_OUTPUT})
(IFS=$','; echo tags="${outputArr[*]}" | tee -a ${GITHUB_OUTPUT})
}

# Image tags
6 changes: 3 additions & 3 deletions .github/workflows/default.yaml
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ jobs:
# Used for building heavy images that take too long to build using QEMU + for native arm64 testing.
name: Switch to arm64 builder host
if: ${{ env.ARCH == 'arm64' }}
uses: arwynfr/actions-docker-context@v2
uses: docksal/actions/docker-context@main
with:
docker_host: "ssh://build-agent@${{ secrets.ARM64_HOST }}"
context_name: arm64-host
@@ -154,7 +154,7 @@ jobs:
steps:
-
name: Setup Bats
uses: bats-core/bats-action@1.5.4
uses: bats-core/bats-action@2.0.0
-
name: Checkout
uses: actions/checkout@v4
@@ -172,7 +172,7 @@ jobs:
# Used for building heavy images that take too long to build using QEMU + for native arm64 testing.
name: Switch to arm64 builder host
if: ${{ env.ARCH == 'arm64' }}
uses: arwynfr/actions-docker-context@v2
uses: docksal/actions/docker-context@main
with:
docker_host: "ssh://build-agent@${{ secrets.ARM64_HOST }}"
context_name: arm64-host
4 changes: 4 additions & 0 deletions 8.1/config/php/zz-php-fpm.conf
Original file line number Diff line number Diff line change
@@ -3,12 +3,16 @@
[global]
; This pid file is used for Docker healthcheck
pid = /run/php-fpm.pid
; Reduce noise in logs
log_level = error

[www]
user = docker
catch_workers_output = yes
listen = 0.0.0.0:9000
clear_env = no
; Do not log php-fpm accesses (see web container for http access)
access.log = /dev/null

; PHP (FPM) settings
; See zz-php.ini for global (CLI and FPM) PHP settings
6 changes: 6 additions & 0 deletions 8.1/config/supervisor/supervisord.conf
Original file line number Diff line number Diff line change
@@ -4,3 +4,9 @@ nodaemon = true
# This way logs can be reviewed with docker logs.
# Additionalluy, logs from specific services are forwarded to individual files on disk.
loglevel = debug
# Mute the "CRIT Supervisor is running as root" warning in logs.
user=root
# Mute the "CRIT Server 'unix_http_server' running without any HTTP authentication checking" warning in logs
[unix_http_server]
username = dummy
password = dummy
4 changes: 4 additions & 0 deletions 8.2/config/php/zz-php-fpm.conf
Original file line number Diff line number Diff line change
@@ -3,12 +3,16 @@
[global]
; This pid file is used for Docker healthcheck
pid = /run/php-fpm.pid
; Reduce noise in logs
log_level = error

[www]
user = docker
catch_workers_output = yes
listen = 0.0.0.0:9000
clear_env = no
; Do not log php-fpm accesses (see web container for http access)
access.log = /dev/null

; PHP (FPM) settings
; See zz-php.ini for global (CLI and FPM) PHP settings
6 changes: 6 additions & 0 deletions 8.2/config/supervisor/supervisord.conf
Original file line number Diff line number Diff line change
@@ -4,3 +4,9 @@ nodaemon = true
# This way logs can be reviewed with docker logs.
# Additionalluy, logs from specific services are forwarded to individual files on disk.
loglevel = debug
# Mute the "CRIT Supervisor is running as root" warning in logs.
user=root
# Mute the "CRIT Server 'unix_http_server' running without any HTTP authentication checking" warning in logs
[unix_http_server]
username = dummy
password = dummy
4 changes: 4 additions & 0 deletions 8.3/config/php/zz-php-fpm.conf
Original file line number Diff line number Diff line change
@@ -3,12 +3,16 @@
[global]
; This pid file is used for Docker healthcheck
pid = /run/php-fpm.pid
; Reduce noise in logs
log_level = error

[www]
user = docker
catch_workers_output = yes
listen = 0.0.0.0:9000
clear_env = no
; Do not log php-fpm accesses (see web container for http access)
access.log = /dev/null

; PHP (FPM) settings
; See zz-php.ini for global (CLI and FPM) PHP settings
6 changes: 6 additions & 0 deletions 8.3/config/supervisor/supervisord.conf
Original file line number Diff line number Diff line change
@@ -4,3 +4,9 @@ nodaemon = true
# This way logs can be reviewed with docker logs.
# Additionalluy, logs from specific services are forwarded to individual files on disk.
loglevel = debug
# Mute the "CRIT Supervisor is running as root" warning in logs.
user=root
# Mute the "CRIT Server 'unix_http_server' running without any HTTP authentication checking" warning in logs
[unix_http_server]
username = dummy
password = dummy
2 changes: 1 addition & 1 deletion tests/test.bats
Original file line number Diff line number Diff line change
@@ -359,7 +359,7 @@ _healthcheck_wait ()
unset output

# Confirm authentication works
run docker exec -u docker "${NAME}" bash -lc 'platform auth:info -n'
run docker exec -u docker "${NAME}" bash -lc 'platform auth:info --no-interaction'
[[ ${status} == 0 ]]
[[ ! "${output}" =~ "Invalid API token" ]]
[[ "${output}" =~ "[email protected]" ]]

0 comments on commit 05484b1

Please sign in to comment.