Apply suggestions from code review

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L.
2026-04-24 16:26:57 +02:00
parent f80f888d6c
commit 47307b37f8
7 changed files with 21 additions and 31 deletions

View File

@@ -1,9 +1,5 @@
#!/bin/bash
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
set -x
fi
# Unfortunately, no curl and no nc is installed in the container
# and packages can also not be added as the package list is broken.
# So always exiting 0 for now.

View File

@@ -1,9 +1,5 @@
#!/bin/bash
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
set -x
fi
# Unfortunately, no curl and no nc is installed in the container
# and packages can also not be added as the package list is broken.
# So always exiting 0 for now.

View File

@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:latest
FROM golang:1.26.2-alpine3.23 AS go
ENV IMAGINARY_HASH=6a274b488759a896aff02f52afee6e50b5e3a3ee
ENV IMAGINARY_HASH=6a274b488759a896aff02f52afee6e50b5e3a3ee
RUN set -ex; \
apk upgrade --no-cache -a; \
@@ -33,7 +33,8 @@ COPY --from=go /go/bin/imaginary /usr/local/bin/imaginary
COPY --chmod=775 start.sh /start.sh
COPY --chmod=775 healthcheck.sh /healthcheck.sh
ENV PORT=9000
ENV PORT=9000 \
AIO_LOG_LEVEL=warn
USER 65534

View File

@@ -4,15 +4,15 @@ if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
set -x
fi
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
GOLANG_LOG="$(case "$AIO_LOG_LEVEL" in
debug) printf 'info' ;;
info) printf 'info' ;;
warn) printf 'warning' ;;
error) printf 'error' ;;
esac)"
export GOLANG_LOG
if [ "$AIO_LOG_LEVEL" = "debug" ]; then
export DEBUG='*'
export GOLANG_LOG='info'
elif [ "$AIO_LOG_LEVEL" = 'info' ]; then
export GOLANG_LOG='info'
elif [ "$AIO_LOG_LEVEL" = 'warn' ]; then
export GOLANG_LOG='warning'
else
export GOLANG_LOG='error'
fi
echo "Imaginary has started"

View File

@@ -4,12 +4,13 @@ FROM python:3.14.3-alpine3.23
COPY --chmod=775 start.sh /start.sh
COPY --chmod=775 healthcheck.sh /healthcheck.sh
ENV RECORDING_VERSION=v0.2.1
ENV ALLOW_ALL=false
ENV HPB_PROTOCOL=https
ENV NC_PROTOCOL=https
ENV SKIP_VERIFY=false
ENV HPB_PATH=/standalone-signaling/
ENV RECORDING_VERSION=v0.2.1 \
ALLOW_ALL=false \
HPB_PROTOCOL=https \
NC_PROTOCOL=https \
SKIP_VERIFY=false \
HPB_PATH=/standalone-signaling/ \
AIO_LOG_LEVEL=warn
RUN set -ex; \
apk upgrade --no-cache -a; \

View File

@@ -37,7 +37,8 @@ RUN set -ex; \
FROM alpine:3.23.4
ENV ETURNAL_ETC_DIR="/conf"
ENV SKIP_CERT_VERIFY=false
ENV SKIP_CERT_VERIFY=false \
AIO_LOG_LEVEL=warn
COPY --from=janus --chmod=777 --chown=1000:1000 /usr/local /usr/local
COPY --from=eturnal --chmod=777 --chown=1000:1000 /opt/eturnal /opt/eturnal
COPY --from=nats --chmod=777 --chown=1000:1000 /nats-server /usr/local/bin/nats-server

View File

@@ -1129,12 +1129,7 @@ class ConfigurationManager
}
private function getElasticLogLevel() : string {
return match ($this->aioLogLevel) {
'debug' => 'DEBUG',
'info' => 'INFO',
'error' => 'ERROR',
default => 'WARN',
};
return strtoupper($this->aioLogLevel);
}
private function booleanize(mixed $value) : bool {