Simplify deployment - use physics pause instead of container shutdown
- IDLE_PAUSE_SECONDS replaces IDLE_TIMEOUT_MINUTES - Container stays running, physics pauses when idle - No restart mechanism needed - Remove wakeup service (no longer needed)
This commit is contained in:
@@ -4,9 +4,9 @@ services:
|
||||
context: ..
|
||||
dockerfile: Dockerfile
|
||||
container_name: py-dvt-ate-streamlit
|
||||
restart: "no" # Don't auto-restart - we want it to stay stopped when idle
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- IDLE_TIMEOUT_MINUTES=${IDLE_TIMEOUT_MINUTES:-30}
|
||||
- IDLE_PAUSE_SECONDS=${IDLE_PAUSE_SECONDS:-30} # Pause physics after 30s idle
|
||||
expose:
|
||||
- "8080"
|
||||
volumes:
|
||||
@@ -39,26 +39,6 @@ services:
|
||||
networks:
|
||||
- dvt-ate
|
||||
|
||||
# Optional: Auto-start streamlit when stopped (checks every 30s)
|
||||
# Uncomment if you want fully automatic restart on visit
|
||||
# wakeup:
|
||||
# image: docker:cli
|
||||
# container_name: py-dvt-ate-wakeup
|
||||
# restart: unless-stopped
|
||||
# entrypoint: /bin/sh
|
||||
# command:
|
||||
# - -c
|
||||
# - |
|
||||
# while true; do
|
||||
# sleep 30
|
||||
# if ! docker inspect -f '{{.State.Running}}' py-dvt-ate-streamlit 2>/dev/null | grep -q true; then
|
||||
# echo "[$(date)] Starting streamlit..."
|
||||
# docker start py-dvt-ate-streamlit
|
||||
# fi
|
||||
# done
|
||||
# volumes:
|
||||
# - /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
|
||||
networks:
|
||||
dvt-ate:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user