-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathentrypoint.sh
More file actions
24 lines (20 loc) · 836 Bytes
/
entrypoint.sh
File metadata and controls
24 lines (20 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# Set default values if environment variables are not set
INTERNAL_PORT=${INTERNAL_PORT:-5006}
NUM_PROCS=${NUM_PROCS:-1}
ADDRESS=${ADDRESS:-localhost}
ALLOW_WEBSOCKET_ORIGIN=${ALLOW_WEBSOCKET_ORIGIN:-localhost:$INTERNAL_PORT}
echo "$(date '+%Y-%m-%d %H:%M:%S') INTERNAL_PORT $INTERNAL_PORT"
echo "$(date '+%Y-%m-%d %H:%M:%S') ADDRESS $ADDRESS"
echo "$(date '+%Y-%m-%d %H:%M:%S') ALLOW_WEBSOCKET_ORIGIN $ALLOW_WEBSOCKET_ORIGIN"
echo "$(date '+%Y-%m-%d %H:%M:%S') NUM_PROCS $NUM_PROCS"
# Start the Panel application
exec uv run panel serve ./app.py \
--address "$ADDRESS" \
--port "$INTERNAL_PORT" \
--allow-websocket-origin "$ALLOW_WEBSOCKET_ORIGIN" \
--num-procs "$NUM_PROCS" \
--session-token-expiration 3600000 \
--check-unused-sessions 10000 \
--unused-session-lifetime 60000 \
--show