mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-22 08:38:13 +02:00
fix: disable file logging for docker compose mode
This commit is contained in:
parent
7d1e22d53c
commit
b5cb044f8c
6 changed files with 68 additions and 21 deletions
|
|
@ -54,6 +54,7 @@ LATEST_LINK="$BASE_LOG_DIR/latest" # Symlink to latest logs
|
|||
VENV_PATH="$BASE_DIR/venv"
|
||||
|
||||
ARQ_WORKERS=${ARQ_WORKERS:-1}
|
||||
LOG_TO_FILE=${LOG_TO_FILE:-true} # Set to false in Docker to use stdout
|
||||
|
||||
# Log startup
|
||||
cd "$BASE_DIR"
|
||||
|
|
@ -239,8 +240,13 @@ for i in "${!SERVICE_NAMES[@]}"; do
|
|||
|
||||
(
|
||||
cd "$BASE_DIR"
|
||||
export LOG_FILE_PATH="$LOG_DIR/$name.log"
|
||||
exec $cmd >>"$LOG_DIR/$name.log" 2>&1
|
||||
if [[ "$LOG_TO_FILE" == "true" ]]; then
|
||||
export LOG_FILE_PATH="$LOG_DIR/$name.log"
|
||||
exec $cmd >>"$LOG_DIR/$name.log" 2>&1
|
||||
else
|
||||
# Log to stdout/stderr for Docker
|
||||
exec $cmd
|
||||
fi
|
||||
) &
|
||||
|
||||
pid=$!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue