mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-25 08:48:13 +02:00
fix: wait for processes in Docker compose mode
This commit is contained in:
parent
b5cb044f8c
commit
5994a33c55
2 changed files with 9 additions and 1 deletions
|
|
@ -60,6 +60,8 @@ ENV PYTHONPATH=/app
|
|||
|
||||
# Disable file logging in Docker - logs go to stdout for docker logs
|
||||
ENV LOG_TO_FILE=false
|
||||
# Keep container alive by waiting for background processes
|
||||
ENV WAIT_FOR_PROCESSES=true
|
||||
|
||||
# Expose the port FastAPI will run on
|
||||
EXPOSE 8000
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ 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_TO_FILE=${LOG_TO_FILE:-true} # Set to false in Docker to use stdout
|
||||
WAIT_FOR_PROCESSES=${WAIT_FOR_PROCESSES:-false} # Set to true in Docker to keep container alive
|
||||
|
||||
# Log startup
|
||||
cd "$BASE_DIR"
|
||||
|
|
@ -282,3 +283,8 @@ echo "Logs: tail -f $LOG_DIR/*.log"
|
|||
echo "Rotated logs: ls $LOG_DIR/*.log.*"
|
||||
echo "To stop: ./scripts/stop_services.sh"
|
||||
echo "──────────────────────────────────────────────────"
|
||||
|
||||
# In Docker mode, wait for all background processes to keep container alive
|
||||
if [[ "$WAIT_FOR_PROCESSES" == "true" ]]; then
|
||||
wait
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue