From 90331f3b4a2a5737de9dd75ab45c096944813c42 Mon Sep 17 00:00:00 2001 From: Josh Preston Date: Wed, 24 Dec 2025 05:28:55 -0500 Subject: [PATCH] Fix: Add regex denoter and improve celerybeat gitignore (#1446) * (bugfix): Added celerybeat extras to gitignore * (bugfix): fixed missing regex denoter * Fix .dockerignore node_modules pattern and add comprehensive exclusions - Fix #1398: Change 'node_modules' to '**/node_modules' to exclude all nested directories - Add patterns for Python bytecode, IDE files, logs, and build artifacts - Consolidate node_modules patterns in .gitignore to use **/node_modules/ --- .dockerignore | 71 +++++++++++++++++++++++++++++++++++++++++++++++++-- .gitignore | 6 ++--- files/urls.py | 2 +- 3 files changed, 73 insertions(+), 6 deletions(-) diff --git a/.dockerignore b/.dockerignore index 5171c540..6f09949e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,69 @@ -node_modules -npm-debug.log \ No newline at end of file +# Node.js/JavaScript dependencies and artifacts +**/node_modules +**/npm-debug.log* +**/yarn-debug.log* +**/yarn-error.log* +**/.yarn/cache +**/.yarn/unplugged +**/package-lock.json +**/.npm +**/.cache +**/.parcel-cache +**/dist +**/build +**/*.tsbuildinfo + +# Python bytecode and cache +**/__pycache__ +**/*.py[cod] +**/*$py.class +**/*.so +**/.Python +**/pip-log.txt +**/pip-delete-this-directory.txt +**/.pytest_cache +**/.coverage +**/htmlcov +**/.tox +**/.mypy_cache +**/.ruff_cache + +# Version control +**/.git +**/.gitignore +**/.gitattributes + +# IDE and editor files +**/.DS_Store +**/.vscode +**/.idea +**/*.swp +**/*.swo +**/*~ + +# Logs and runtime files +**/logs +**/*.log +**/celerybeat-schedule* +**/.env +**/.env.* + +# Media files and data directories (should not be in image) +media_files/** +postgres_data/** +pids/** + +# Static files collected at runtime +static_collected/** + +# Documentation and development files +**/.github +**/CHANGELOG.md + +# Test files and directories +**/tests +**/test_*.py +**/*_test.py + +# Frontend build artifacts (built separately) +frontend/dist/** diff --git a/.gitignore b/.gitignore index 452d9641..d39ddfef 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ media_files/uploads/ media_files/tinymce_media/ media_files/userlogos/ postgres_data/ -celerybeat-schedule +celerybeat-schedule* logs/ pids/ static/admin/ @@ -20,8 +20,8 @@ static/drf-yasg cms/local_settings.py deploy/docker/local_settings.py yt.readme.md -/frontend-tools/video-editor/node_modules -/frontend-tools/video-editor/client/node_modules +# Node.js dependencies (covers all node_modules directories, including frontend-tools) +**/node_modules/ /static_collected /frontend-tools/video-editor-v1 frontend-tools/.DS_Store diff --git a/files/urls.py b/files/urls.py index cedb6125..81c60930 100644 --- a/files/urls.py +++ b/files/urls.py @@ -111,7 +111,7 @@ urlpatterns = [ re_path(r"^manage/users$", views.manage_users, name="manage_users"), # Media uploads in ADMIN created pages re_path(r"^tinymce/upload/", tinymce_handlers.upload_image, name="tinymce_upload_image"), - re_path("^(?P[\w.-]*)$", views.get_page, name="get_page"), # noqa: W605 + re_path(r"^(?P[\w.-]*)$", views.get_page, name="get_page"), # noqa: W605 ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)