From 09610019983db212d93c1792522912d1c68df2c3 Mon Sep 17 00:00:00 2001 From: Cliff Hill Date: Tue, 21 Oct 2025 00:19:59 -0400 Subject: [PATCH] More adjustments. Signed-off-by: Cliff Hill --- .gitea/workflows/ci.yml | 78 +++++++++++++++++++++++++++++++++++------ Dockerfile.backend | 4 +-- backend/pyproject.toml | 2 +- 3 files changed, 70 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b44d2cd..fba562d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -30,12 +30,35 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python 3.13 - uses: actions/setup-python@v5 - with: - python-version: '3.13' + - name: Debug Python availability + run: | + which python3 || echo "python3 not found" + python3 --version || echo "python3 version failed" + which python || echo "python not found" + python --version || echo "python version failed" + ls -la /usr/bin/python* || echo "no python in /usr/bin" - - name: Install uv + - name: Set up Python (fallback to system Python) + run: | + # Try to use system Python first + if command -v python3 &> /dev/null; then + echo "Using system Python3:" + python3 --version + # Create symlink if python command doesn't exist + if ! command -v python &> /dev/null; then + sudo ln -sf $(which python3) /usr/local/bin/python + fi + else + echo "No Python found, attempting to install..." + sudo apt-get update + sudo apt-get install -y python3 python3-pip python3-venv + fi + + echo "Final Python setup:" + python3 --version + python --version || echo "python symlink not available" + + - name: Install uv (Python package manager) run: | curl -LsSf https://astral.sh/uv/install.sh | sh export PATH="$HOME/.local/bin:$PATH" @@ -92,12 +115,45 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'yarn' - cache-dependency-path: frontend/yarn.lock + - name: Debug Node.js availability + run: | + which node || echo "node not found" + node --version || echo "node version failed" + which npm || echo "npm not found" + npm --version || echo "npm version failed" + which yarn || echo "yarn not found" + yarn --version || echo "yarn version failed" + + - name: Set up Node.js (fallback to manual installation) + run: | + # Check if node is available and what version + if command -v node &> /dev/null; then + echo "Node.js found:" + node --version + NODE_VERSION=$(node --version | cut -d'v' -f2 | cut -d'.' -f1) + if [ "$NODE_VERSION" -ge 18 ]; then + echo "Node.js version is sufficient (>= 18)" + else + echo "Node.js version is too old, installing Node 20..." + curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - + sudo apt-get install -y nodejs + fi + else + echo "Node.js not found, installing Node 20..." + curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - + sudo apt-get install -y nodejs + fi + + # Check if yarn is available, if not install it + if ! command -v yarn &> /dev/null; then + echo "Yarn not found, installing..." + npm install -g yarn + fi + + echo "Final versions:" + node --version + npm --version + yarn --version - name: Install frontend dependencies run: | diff --git a/Dockerfile.backend b/Dockerfile.backend index b3f5630..34681fc 100644 --- a/Dockerfile.backend +++ b/Dockerfile.backend @@ -1,5 +1,5 @@ -# Backend Dockerfile for FastAPI with Python 3.13 -FROM python:3.13-slim +# Backend Dockerfile for FastAPI with Python 3.12 +FROM python:3.12-slim # Set working directory WORKDIR /app diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 1deb8ae..6097668 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ ] description = "Plex Playlist Management API" name = "plex-playlist-backend" -requires-python = ">=3.13" +requires-python = ">=3.12" version = "0.1.0" [project.optional-dependencies]