From a0ed0b4a4d430363f0f8278e11d03f65c26dd62a Mon Sep 17 00:00:00 2001 From: sam Date: Fri, 6 Feb 2026 17:25:41 +0000 Subject: [PATCH] adjust --- .gitea/workflows/deploy.yaml | 54 ++++++++++++++++++++++++++++++++++++ app.py | 4 +-- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/deploy.yaml diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..e1d6ab0 --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,54 @@ +name: Docker Deploy +on: [push] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Build Docker Image + run: | + docker build -t my-jiodown-app:latest . + + # - name: Remove Old Container + # run: | + # # Use '|| true' to force a success exit code even if the container is missing + # docker stop my-running-app || true + # docker rm my-running-app || true + - name: Remove Old Container and Free Port + run: | + # 1. Stop and remove by NAME (what we had before) + docker stop my-jiodown-app || true + docker rm my-jiodown-app || true + + # 2. EMERGENCY: Stop any container actually using port 9002 + # This finds the ID of any container bound to 9002 and kills it + PORT_OWNER=$(docker ps -q --filter "publish=8501") + if [ ! -z "$PORT_OWNER" ]; then + docker stop $PORT_OWNER + docker rm $PORT_OWNER + fi + + - name: Start New Container + run: | + docker run -d \ + --name my-jiodown-app \ + -p 8501:8501 \ + -v /path/on/your/host:/usr/share/nginx/html \ + --restart unless-stopped \ + Jiodown:latest + + # - name: Deploy to CasaOS (Docker) + # run: | + # # Stop and remove the old container if it exists + # docker stop my-running-app || true + # docker rm my-running-app || true + + # # Run the new container + # docker run -d \ + # --name my-running-app \ + # -p 9002:5005 \ + # --restart always \ + # my-local-app:latest \ No newline at end of file diff --git a/app.py b/app.py index b0b4f1d..2e7704f 100644 --- a/app.py +++ b/app.py @@ -20,7 +20,7 @@ DOWNLOAD_DIR = os.path.join(os.getcwd(), "downloads") if not os.path.exists(DOWNLOAD_DIR): os.makedirs(DOWNLOAD_DIR) -st.set_page_config(page_title="JioSaavn Pro Downloader", page_icon="🎵", layout="wide") +st.set_page_config(page_title="JioSaavn Downloader", page_icon="🎵", layout="wide") # --- SESSION STATE SETUP --- if 'search_results' not in st.session_state: @@ -243,7 +243,7 @@ def process_jiosaavn_link(url): return None, None # --- UI LOGIC --- -st.title("🎵 JioSaavn Multi-Downloader") +st.title("🎵 JioSaavn Downloader") # 1. Search / Link Input Section with st.container():