From 6d5660b20d7856d25090a88adb6517028c6c1eca Mon Sep 17 00:00:00 2001 From: Adriano Date: Sat, 7 Feb 2026 19:04:49 +0100 Subject: [PATCH] fix: Docker build failures for client and server containers - Pin tailwindcss@3 in client Dockerfile (v4 removed standalone CLI) - Replace gunicorn --factory with callable syntax app:create_app() - Fix Alembic config path with -c flag and %(here)s script_location Co-Authored-By: Claude Opus 4.6 --- client/Dockerfile | 6 +++--- server/Dockerfile | 2 +- server/migrations/alembic.ini | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/Dockerfile b/client/Dockerfile index a656e62..c1ffeb2 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -14,12 +14,12 @@ RUN pip install --no-cache-dir -r requirements.txt gunicorn COPY . . -# Build Tailwind CSS -RUN npx tailwindcss -i static/css/input.css -o static/css/tailwind.css --minify +# Install and build Tailwind CSS +RUN npm install tailwindcss@3 && npx tailwindcss -i static/css/input.css -o static/css/tailwind.css --minify # Compile Flask-Babel translations RUN pybabel compile -d translations EXPOSE 5000 -CMD ["gunicorn", "--workers", "2", "--bind", "0.0.0.0:5000", "--factory", "app:create_app"] +CMD ["gunicorn", "--workers", "2", "--bind", "0.0.0.0:5000", "app:create_app()"] diff --git a/server/Dockerfile b/server/Dockerfile index 794de71..ba1368f 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -23,4 +23,4 @@ RUN mkdir -p uploads/images uploads/pdfs uploads/logos uploads/reports EXPOSE 8000 # Entry point: Alembic upgrade + Uvicorn -CMD ["sh", "-c", "alembic upgrade head && uvicorn main:app --host 0.0.0.0 --port 8000 --workers 2"] +CMD ["sh", "-c", "alembic -c migrations/alembic.ini upgrade head && uvicorn main:app --host 0.0.0.0 --port 8000 --workers 2"] diff --git a/server/migrations/alembic.ini b/server/migrations/alembic.ini index e493b1d..e5a03a3 100644 --- a/server/migrations/alembic.ini +++ b/server/migrations/alembic.ini @@ -1,5 +1,5 @@ [alembic] -script_location = . +script_location = %(here)s sqlalchemy.url = mysql+asyncmy://tmflow:change_me_in_production@localhost:3306/tiemeasureflow [loggers]