mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-01 13:22:04 -08:00
setting port as env
This commit is contained in:
parent
daa3e05ce2
commit
ef6a134cf9
1 changed files with 4 additions and 2 deletions
6
.github/workflows/on_merge_to_master.yaml
vendored
6
.github/workflows/on_merge_to_master.yaml
vendored
|
|
@ -5,6 +5,8 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main # Trigger on push to main branch
|
||||
env:
|
||||
STABLE_DIFFUSION_API_PORT: 7861
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
|
@ -25,7 +27,7 @@ jobs:
|
|||
cd /home/ec2-user/apps
|
||||
|
||||
# Terminate any running instances of the Python app
|
||||
PORT=7860
|
||||
PORT=${{ env.STABLE_DIFFUSION_API_PORT }}
|
||||
PID=$(lsof -t -i:$PORT)
|
||||
if [ ! -z "$PID" ]; then
|
||||
echo "Terminating process running on port $PORT with PID $PID..."
|
||||
|
|
@ -74,7 +76,7 @@ jobs:
|
|||
cd ..
|
||||
|
||||
# Run the application in the background using nohup
|
||||
nohup python launch.py --nowebui --deforum-api --listen --api --port 7861 > nohup.out 2>&1 &
|
||||
nohup python launch.py --nowebui --deforum-api --listen --api --port $PORT > nohup.out 2>&1 &
|
||||
|
||||
# Detach from the SSH session to prevent hanging
|
||||
exit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue