Commit Graph

82 Commits

Author SHA1 Message Date
Matthieu B
080752b752 fix: default Docker healthcheck port (#1331)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-07-06 10:57:46 +02:00
Matthieu B
42eb4d3697 Merge pull request #1059 from tickzip/feat/add-custom-bindings
Add: `HOST` & `PORT` env vars for wizarr.
2026-07-05 17:52:09 +02:00
RicoUHD
a33d79dd45 fix(assets): implement deterministic build lifecycle and dynamic cache busting
- Added dynamic ?v={{ app_version }} cache-busting query strings to all core stylesheet and script references in base.html.
- Created and registered the inject_app_version context processor in app/context_processors.py and app/__init__.py to inject the APP_VERSION environment variable into all templates dynamically.
- Refactored copy-assets.js to detect production context (NODE_ENV=production or DOCKER_BUILD=true) and fail loudly (process.exit(1)) if assets are missing, avoiding silent failures in the build pipeline.
- Set DOCKER_BUILD=true during the Dockerfile asset compilation step to enforce deterministic production build verification.
2026-05-25 17:33:29 +02:00
tickzip
3487bb4e0c Merge branch 'feat/add-custom-bindings' into main 2026-02-22 20:20:31 +00:00
Lukas Wingerberg
4882813fe5 fix: Remove runtime directory creation in /etc 2026-02-04 23:48:19 +01:00
bippin
c564f91fb8 Add: HOST & PORT env vars for wizarr.
This lets users override the address on which gunicorn binds.
The change also updates the docs.
fixes #1058
2025-12-10 18:11:11 +00:00
Matthieu B
2283c4de68 fix: prevent startup race condition during migrations
This fixes a critical issue where Gunicorn workers would fail to start
after upgrading to v2025.11.0, causing containers to show as unhealthy
with only the uv wrapper process running and no actual workers.

Root Cause:
-----------
In v2025.11.0, library scanning and session recovery were added to the
create_app() function, which runs during EVERY app creation including:
1. During 'flask db upgrade' (migrations)
2. During Gunicorn master when_ready() hook
3. During each Gunicorn worker spawn

The migration 20251103_properly_fix_foreign_keys recreates 4 database
tables with CASCADE foreign keys using raw SQL. This holds exclusive
database locks during table recreation.

When library scanning and session recovery try to query these tables
during migration, they hit database locks, creating a race condition
that causes workers to timeout and crash during startup.

Fix:
----
- Skip library scanning during migrations (FLASK_SKIP_SCHEDULER=true)
- Skip activity monitoring/session recovery during migrations
- Make Gunicorn log level configurable (GUNICORN_LOG_LEVEL env var)
- Add worker lifecycle hooks for better crash debugging
- Increase healthcheck start period from 10s to 60s
- Increase Gunicorn worker timeout from 30s to 120s

Testing:
--------
- Verified app starts successfully with FLASK_SKIP_SCHEDULER=true
- Verified library scanning runs normally without the flag
- Confirmed 0.38s startup during migrations vs 1.61s normal startup

Closes #976
2025-11-03 20:41:52 +01:00
Matthieu B
bed0d20aa1 fix: include fuzzy entries when building translations in Dockerfile 2025-10-28 11:38:46 +01:00
Matthieu B
cfc7439629 fix: update Dockerfile to copy application code after source files and mark subproject as dirty 2025-10-27 15:22:21 +01:00
Matthieu B
6ab5e024db Revert "Merge pull request #925 from wizarrrr/chore/python-3.14-upgrade"
This reverts commit 35dde7c19a, reversing
changes made to c8cf9905ba.
2025-10-19 14:05:59 +02:00
Matthieu B
eed5c242a8 Revert "fix: Add build tools to system dependencies in Dockerfile for Python package compilation"
This reverts commit 7cc2572250.
2025-10-19 14:05:28 +02:00
Matthieu B
7cc2572250 fix: Add build tools to system dependencies in Dockerfile for Python package compilation 2025-10-19 14:02:50 +02:00
Matthieu B
35dde7c19a Merge pull request #925 from wizarrrr/chore/python-3.14-upgrade
chore: Update to python 3.14
2025-10-19 13:47:39 +02:00
Matthieu B
1ec706dbbd chore: Update to python 3.14 2025-10-18 17:37:34 +02:00
Matthieu B
bde092a9d3 feat: Set Flask environment to production and adjust app configuration loading 2025-10-18 17:34:25 +02:00
Matthieu B
5f2f937be8 fix: uv lock issues 2025-09-10 12:41:08 +02:00
Matthieu B
ccab5fa6a7 fix: update Dockerfile to copy only pyproject.toml for better caching 2025-08-31 19:25:36 +02:00
Matthieu B
ef6c1988f9 fix: remove --locked flags from uv commands in CI and Docker
Remove --locked flag from uv sync commands in GitHub Actions workflows
and Dockerfiles to allow more flexible dependency resolution during
builds and CI processes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-31 18:22:45 +02:00
Matthieu B
fd5066d195 Update entrypoint and CMD to run without dev dependencies for production readiness 2025-08-17 18:30:10 +02:00
Matthieu B
1aa411f339 fix 2025-08-17 18:20:54 +02:00
Matthieu B
51b6a3e080 Refactor Dockerfile to exclude dev dependencies for production image; add pytest-playwright and related packages; update invitation handling and tests for improved functionality and performance 2025-08-17 18:18:21 +02:00
Matthieu B
d36688cf70 Update Dockerfile to use specific base image and clean up unnecessary copy commands 2025-08-17 16:45:28 +02:00
Matthieu B
a509a1860c Update Dockerfile to set ownership for copied Python environment and remove outdated Tailwind CSS entries from package-lock.json; add job search link in admin template 2025-08-17 16:43:20 +02:00
Matthieu B
76628e69a2 Refactor Dockerfile to simplify application code and asset copying, ensuring proper ownership and enhancing clarity 2025-08-14 23:58:01 +02:00
Matthieu B
c8c31f7602 Refactor Dockerfile to streamline asset copying and ensure proper ownership for application files 2025-08-14 23:54:14 +02:00
Matthieu B
eda16df2ac fix dokcer 2025-08-14 23:48:14 +02:00
Matthieu B
d1bd8ea13f Refactor Gunicorn configuration to remove preload and worker settings, and enhance logging in the when_ready hook for better migration handling. 2025-08-12 21:06:42 +02:00
Matthieu B
fad484b570 Enhance CI workflow and Dockerfile for improved caching, ensure database directory exists, and update entrypoint script for critical directory creation 2025-08-12 19:18:18 +02:00
Matthieu B
0451125502 fix docker 2025-08-12 19:05:27 +02:00
Matthieu B
3d1d535930 Update .dockerignore, CI workflow, and Dockerfile for improved caching and build process 2025-08-12 19:02:05 +02:00
Matthieu B
c2fd7d0a06 Revert "Allow running on custom port" 2025-07-11 23:47:00 +02:00
Stavros Kois
2a24db700f Allow running on custom port 2025-07-11 18:01:09 +03:00
Matthieu B
9ac933ac26 Add wizard step management and enhance asset building 2025-06-25 23:17:46 +02:00
Matthieu B
f68faee52d Fix #632 Truenas slow 2025-06-16 18:46:17 +01:00
Matthieu B
772bc24fa6 Added multiple servers support and identity linking 2025-06-13 14:37:57 +01:00
fireph
dc3c0ff66e handle tailwind compilation at runtime as well and don't commit the main.css file 2025-06-09 23:55:02 -07:00
fireph
bf407f2295 Create user/group at runtime in docker-entrypoint.sh
The changes that were made to the Dockerfile didn't quite work since environment variables set at runtime won't change anything that uses them in the Dockerfile. So the user/group creation needs to happen in the docker-entrypoint.sh script so that if the user/group is set as an environment variable it will create a the user/group properly and take ownership of the required folders.
2025-06-09 00:19:37 -07:00
fireph
d2896cca24 Fix setting custom user in Dockerfile
Wizarr used to work by just setting PUID and PGID environment variables but 2025.6.1 broke this behavior and setting user:group at runtime doesn't seem to work correctly either. This brings it back to how it worked before 2025.6.1
2025-06-05 14:16:45 -07:00
Matthieu B
5faa591d8f fix colours 2025-06-04 13:20:11 +01:00
Matthieu B
9050093780 fix colours 2025-06-04 13:17:23 +01:00
Matthieu B
df61f1402e release checking 2025-06-03 23:40:57 +01:00
mtthidoteu
97616b169a fix dockerfile 2025-06-03 12:17:03 +01:00
mtthidoteu
24849dd4e3 clean 2025-06-02 17:29:17 +01:00
i18n-bot
589a928ca1 emergency fix and close #542 2025-05-24 23:59:23 +01:00
i18n-bot
08906899a7 emergency fix and close #541 2025-05-24 23:48:48 +01:00
Matthieu B
62cf63f09d fix image permissions 2025-05-23 02:08:50 +01:00
Matthieu B
f8871b82ba fix image permissions 2025-05-23 02:06:52 +01:00
Matthieu B
7f2c681730 fix image permissions 2025-05-22 23:28:14 +01:00
Matthieu B
75632c7944 fix image permissions 2025-05-22 23:24:57 +01:00
Matthieu B
bf857aec3f added release candidate 2025-05-22 23:19:45 +01:00