disfactory-notification

Month: 2025-06

2025-06-08

github2 18:15:55

<https://github.com/Disfactory/Disfactory/issues/658|#658 回報系統無法順利上傳照片>

在「上傳工廠照片」頁面無法上傳照片 *To Reproduce* Steps to reproduce the behavior: 1. Go to '<http://disfactory.tw|disfactory.tw>' 2. Click on '我想新增可疑工廠' 3. Scroll down to '工廠照片' 4. Click on '新增照片' 5. See error (「上傳錯誤」) *Expected behavior* 上傳照片後可以上傳,不會出現「上傳錯誤」的訊息 *Screenshots* <https://private-user-images.githubusercontent.com/81308197/452763642-949c6529-f5e4-4a32-9ebe-59e3289348c8.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDkzNzgwNTQsIm5iZiI6MTc0OTM3Nzc1NCwicGF0aCI6Ii84MTMwODE5Ny80NTI3NjM2NDItOTQ5YzY1MjktZjVlNC00YTMyLTllYmUtNTllMzI4OTM0OGM4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjA4VDEwMTU1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUyYzQ4ZjY2ZDQyNzFkZWJiMTIzMDMwMDkxMzQzN2Y0MDMxODYwMDdkOTFjNDFhZjk4OTZhMjA2NTJhMDUxYjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.cCfQOgSXk_OvhfM5n2Smgdgriwce_BCEsnvaVACo4EY|[Image](https://private-user-images.githubusercontent.com/81308197/452763642-949c6529-f5e4-4a32-9ebe-59e3289348c8.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDkzNzgwNTQsIm5iZiI6MTc0OTM3Nzc1NCwicGF0aCI6Ii84MTMwODE5Ny80NTI3NjM2NDItOTQ5YzY1MjktZjVlNC00YTMyLTllYmUtNTllMzI4OTM0OGM4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjA4VDEwMTU1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUyYzQ4ZjY2ZDQyNzFkZWJiMTIzMDMwMDkxMzQzN2Y0MDMxODYwMDdkOTFjNDFhZjk4OTZhMjA2NTJhMDUxYjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.cCfQOgSXk_OvhfM5n2Smgdgriwce_BCEsnvaVACo4EY)> *Desktop (please complete the following information):* • OS: windows 10 • Browser : brave

github2 18:15:55

<https://github.com/Disfactory/Disfactory/issues/658|#658 回報系統無法順利上傳照片>

在「上傳工廠照片」頁面無法上傳照片 *To Reproduce* Steps to reproduce the behavior: 1. Go to '<http://disfactory.tw|disfactory.tw>' 2. Click on '我想新增可疑工廠' 3. Scroll down to '工廠照片' 4. Click on '新增照片' 5. See error (「上傳錯誤」) *Expected behavior* 上傳照片後可以上傳,不會出現「上傳錯誤」的訊息 *Screenshots* <https://private-user-images.githubusercontent.com/81308197/452763642-949c6529-f5e4-4a32-9ebe-59e3289348c8.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDkzNzgwNTQsIm5iZiI6MTc0OTM3Nzc1NCwicGF0aCI6Ii84MTMwODE5Ny80NTI3NjM2NDItOTQ5YzY1MjktZjVlNC00YTMyLTllYmUtNTllMzI4OTM0OGM4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjA4VDEwMTU1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUyYzQ4ZjY2ZDQyNzFkZWJiMTIzMDMwMDkxMzQzN2Y0MDMxODYwMDdkOTFjNDFhZjk4OTZhMjA2NTJhMDUxYjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.cCfQOgSXk_OvhfM5n2Smgdgriwce_BCEsnvaVACo4EY|[Image](https://private-user-images.githubusercontent.com/81308197/452763642-949c6529-f5e4-4a32-9ebe-59e3289348c8.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDkzNzgwNTQsIm5iZiI6MTc0OTM3Nzc1NCwicGF0aCI6Ii84MTMwODE5Ny80NTI3NjM2NDItOTQ5YzY1MjktZjVlNC00YTMyLTllYmUtNTllMzI4OTM0OGM4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjA4VDEwMTU1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUyYzQ4ZjY2ZDQyNzFkZWJiMTIzMDMwMDkxMzQzN2Y0MDMxODYwMDdkOTFjNDFhZjk4OTZhMjA2NTJhMDUxYjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.cCfQOgSXk_OvhfM5n2Smgdgriwce_BCEsnvaVACo4EY)> *Desktop (please complete the following information):* • OS: windows 10 • Browser : brave

github2 22:28:44

<https://github.com/Disfactory/frontend/issues/185|#185 回報系統無法順利上傳照片>

在「上傳工廠照片」頁面無法上傳照片 *To Reproduce* Steps to reproduce the behavior: 1. Go to '<http://disfactory.tw|disfactory.tw>' 2. Click on '我想新增可疑工廠' 3. Scroll down to '工廠照片' 4. Click on '新增照片' 5. See error (「上傳錯誤」) *Expected behavior* 上傳照片後可以上傳,不會出現「上傳錯誤」的訊息 *Screenshots* <https://private-user-images.githubusercontent.com/81308197/452763642-949c6529-f5e4-4a32-9ebe-59e3289348c8.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDkzOTMyMjQsIm5iZiI6MTc0OTM5MjkyNCwicGF0aCI6Ii84MTMwODE5Ny80NTI3NjM2NDItOTQ5YzY1MjktZjVlNC00YTMyLTllYmUtNTllMzI4OTM0OGM4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjA4VDE0Mjg0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMyZjE4YTAzNDk2MmQ4NGVmYTQ0Njg3MzEzMDYwZjcyMzBmZGNhYzJiZGYyZDE0YjYyZDYwMDdmOWNmN2U3Y2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-KUX8N_U9jGa3M8l5l4F32v023OtNQokIeTmg_6t3C0|[Image](https://private-user-images.githubusercontent.com/81308197/452763642-949c6529-f5e4-4a32-9ebe-59e3289348c8.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDkzOTMyMjQsIm5iZiI6MTc0OTM5MjkyNCwicGF0aCI6Ii84MTMwODE5Ny80NTI3NjM2NDItOTQ5YzY1MjktZjVlNC00YTMyLTllYmUtNTllMzI4OTM0OGM4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjA4VDE0Mjg0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMyZjE4YTAzNDk2MmQ4NGVmYTQ0Njg3MzEzMDYwZjcyMzBmZGNhYzJiZGYyZDE0YjYyZDYwMDdmOWNmN2U3Y2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-KUX8N_U9jGa3M8l5l4F32v023OtNQokIeTmg_6t3C0)> *Desktop (please complete the following information):* • OS: windows 10 • Browser : brave

github2 22:28:44

<https://github.com/Disfactory/frontend/issues/185|#185 回報系統無法順利上傳照片>

在「上傳工廠照片」頁面無法上傳照片 *To Reproduce* Steps to reproduce the behavior: 1. Go to '<http://disfactory.tw|disfactory.tw>' 2. Click on '我想新增可疑工廠' 3. Scroll down to '工廠照片' 4. Click on '新增照片' 5. See error (「上傳錯誤」) *Expected behavior* 上傳照片後可以上傳,不會出現「上傳錯誤」的訊息 *Screenshots* <https://private-user-images.githubusercontent.com/81308197/452763642-949c6529-f5e4-4a32-9ebe-59e3289348c8.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDk2NDg5MjIsIm5iZiI6MTc0OTY0ODYyMiwicGF0aCI6Ii84MTMwODE5Ny80NTI3NjM2NDItOTQ5YzY1MjktZjVlNC00YTMyLTllYmUtNTllMzI4OTM0OGM4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjExVDEzMzAyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYxMzZjZWJkYjRlZmY1ZTNjNzA5YWU4ZWNiYTkwNjE5ODA0ZDdkZWU3NTA2ZGM3ZWFhOTViY2ZiNDY2NjQ1NjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.nnFqang_dKEDPIxwlQvZ6sps9sWagi8wj8MjM6tMM8o|[Image](https://private-user-images.githubusercontent.com/81308197/452763642-949c6529-f5e4-4a32-9ebe-59e3289348c8.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDk2NDg5MjIsIm5iZiI6MTc0OTY0ODYyMiwicGF0aCI6Ii84MTMwODE5Ny80NTI3NjM2NDItOTQ5YzY1MjktZjVlNC00YTMyLTllYmUtNTllMzI4OTM0OGM4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjExVDEzMzAyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYxMzZjZWJkYjRlZmY1ZTNjNzA5YWU4ZWNiYTkwNjE5ODA0ZDdkZWU3NTA2ZGM3ZWFhOTViY2ZiNDY2NjQ1NjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.nnFqang_dKEDPIxwlQvZ6sps9sWagi8wj8MjM6tMM8o)> *Desktop (please complete the following information):* • OS: windows 10 • Browser : brave --- Please refer to the backend image upload API change in <https://github.com/Disfactory/Disfactory/pull/660|Disfactory/Disfactory#660>. Since Imgur is no longer working in Taiwan, we have switched to our own image uploading API instead.

2025-06-11

github2 20:43:16

<https://github.com/Disfactory/Disfactory/issues/659|#659 Support multiple Image upload backends>

Imgur's API is blocked in Taiwan. I need to develop a replacement. Currently, the factory image is uploaded on the frontend, and the post URL, along with other extracted EXIF data (such as DateTimeOriginal), is sent to the backend. Let's create an image upload service that supports multiple configurable backends, such as Imgur and ImageBB (we will support these two for now). The image upload should be handled in the backend moving forward.

github2 20:43:16

<https://github.com/Disfactory/Disfactory/issues/659|#659 Support multiple Image upload backends>

Imgur's API is blocked in Taiwan. I need to develop a replacement. Currently, the factory image is uploaded on the frontend, and the post URL, along with other extracted EXIF data (such as DateTimeOriginal), is sent to the backend. Let's create an image upload service that supports multiple configurable backends, such as Imgur and ImageBB (we will support these two for now). The image upload should be handled in the backend moving forward.

github2 20:53:15

<https://github.com/Disfactory/Disfactory/issues/661|#661 Fix CI script and migrate CI to github actions>

Current circleCI workflow is failed at poetry installation step #!/bin/bash -eo pipefail curl -sSL <https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py|https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py> | python ``` File "&lt;stdin&gt;", line 1 404: Not Found ^ SyntaxError: invalid syntax Exited with code exit status 1 ``` --- Now besides fixing this issue, also try migrate the entire workflow to github action

github2 20:53:15

<https://github.com/Disfactory/Disfactory/issues/661|#661 Fix CI script and migrate CI to github actions>

Current circleCI workflow is failed at poetry installation step #!/bin/bash -eo pipefail curl -sSL <https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py|https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py> | python ``` File "&lt;stdin&gt;", line 1 404: Not Found ^ SyntaxError: invalid syntax Exited with code exit status 1 ``` --- Now besides fixing this issue, also try migrate the entire workflow to github action

github2 21:43:50

<https://github.com/Disfactory/Disfactory/issues/663|#663 Remove frontend code>

`/frontend` directory already moved to another repo

github2 21:43:50

<https://github.com/Disfactory/Disfactory/issues/663|#663 Remove frontend code>

`/frontend` directory already moved to another repo

2025-06-17

github2 21:36:29

<https://github.com/Disfactory/Disfactory/pull/662|#662 Fix CI script and migrate CI to GitHub Actions>

This PR fixes the failing CircleCI workflow and completes the migration to GitHub Actions. ## Problem The CircleCI workflow was failing at the poetry installation step with a 404 error: curl -sSL <https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py> | python ``` File "&lt;stdin&gt;", line 1 404: Not Found ^ SyntaxError: invalid syntax ``` ## Solution 1. *Fixed the immediate CircleCI issue* by updating to the new poetry installation method: • Changed from deprecated `get-poetry.py` to the official `<https://install.python-poetry.org>` installer • Updated poetry command paths to use the correct installation location 2. *Enhanced the existing GitHub Actions workflow* to be a complete CI solution: • Updated PostgreSQL from v11 to v12 to match CircleCI setup • Added Poetry dependency caching for better performance • Updated actions/checkout to v3 • Added both pytest and Django test runners for comprehensive testing • Renamed job to "backend-tests" for clarity 3. *Completed the migration* by: • Removing the entire `.circleci/` directory • Updating README.md to replace CircleCI badge with GitHub Actions badge ## Benefits • Modern CI platform with better GitHub integration • Improved caching and performance • Maintained all existing test coverage (both pytest and Django tests) • Better database health checks and GDAL support • Cleaner repository without legacy CI configuration Fixes <https://github.com/Disfactory/Disfactory/issues/661|#661>. --- :speech_balloon: Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click <https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent|here> to start the survey.

github2 21:36:29

<https://github.com/Disfactory/Disfactory/pull/662|#662 Fix CI script and migrate CI to GitHub Actions>

This PR fixes the failing CircleCI workflow and completes the migration to GitHub Actions. ## Problem The CircleCI workflow was failing at the poetry installation step with a 404 error: curl -sSL <https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py> | python ``` File "&lt;stdin&gt;", line 1 404: Not Found ^ SyntaxError: invalid syntax ``` ## Solution 1. *Fixed the immediate CircleCI issue* by updating to the new poetry installation method: • Changed from deprecated `get-poetry.py` to the official `<https://install.python-poetry.org>` installer • Updated poetry command paths to use the correct installation location 2. *Enhanced the existing GitHub Actions workflow* to be a complete CI solution: • Updated PostgreSQL from v11 to v12 to match CircleCI setup • Added Poetry dependency caching for better performance • Updated actions/checkout to v3 • Added both pytest and Django test runners for comprehensive testing • Renamed job to "backend-tests" for clarity 3. *Completed the migration* by: • Removing the entire `.circleci/` directory • Updating README.md to replace CircleCI badge with GitHub Actions badge ## Benefits • Modern CI platform with better GitHub integration • Improved caching and performance • Maintained all existing test coverage (both pytest and Django tests) • Better database health checks and GDAL support • Cleaner repository without legacy CI configuration Fixes <https://github.com/Disfactory/Disfactory/issues/661|#661>. --- :speech_balloon: Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click <https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent|here> to start the survey.

github2 21:37:48

`<https://github.com/Disfactory/Disfactory/commit/7cd90899c66a2c531770fbfbb77a7b9dba1442d0|7cd90899>` - Fix CI script and migrate CI to GitHub Actions (#662)

github2 21:37:48

`<https://github.com/Disfactory/Disfactory/commit/7cd90899c66a2c531770fbfbb77a7b9dba1442d0|7cd90899>` - Fix CI script and migrate CI to GitHub Actions (#662)

github2 21:39:57

<https://github.com/Disfactory/Disfactory/issues/665|#665 Render blueprint for backend deployment>

checkout <https://render.com/docs/blueprint-spec|https://render.com/docs/blueprint-spec>

github2 21:39:57

<https://github.com/Disfactory/Disfactory/issues/665|#665 Render blueprint for backend deployment>

checkout <https://render.com/docs/blueprint-spec|https://render.com/docs/blueprint-spec>

github2 22:02:16

<https://github.com/Disfactory/Disfactory/pull/666|#666 Add Render blueprint for backend deployment>

Adds a Render blueprint (`render.yaml`) to enable one-click deployment of the Disfactory backend to the <http://Render.com|Render.com> platform. The blueprint defines infrastructure as code for all required services. ## Services Configured • *disfactory-backend* (Web Service) - Django API server with automatic scaling • *disfactory-worker* (Background Worker) - Django Q task queue for async processing • *disfactory-db* (PostgreSQL 14 Database) - Database with PostGIS support ## Features • *Automatic database connectivity* - Environment variables are automatically configured from database connection properties • *Production-ready configuration* - Debug disabled, proper logging, CORS settings • *Health check monitoring* - Uses existing `/api/statistics/total` endpoint • *Docker-based deployment* - Leverages existing multi-stage Dockerfile with production target • *Secret management* - API keys marked for manual configuration in Render dashboard ## Deployment Process 1. Fork repository and connect GitHub to Render 2. Create new Blueprint deployment in Render 3. Render automatically detects `render.yaml` and deploys all services 4. Configure secret environment variables (`GOOGLE_MAP_API_KEY`, etc.) 5. Backend is ready for production use ## Additional Changes • Fixed Docker build for newer Poetry versions (`--no-dev` → `--only=main --no-root`) • Updated gunicorn configuration to use Render's `PORT` environment variable • Maintains full compatibility with existing Docker workflows The blueprint follows Render's best practices and enables easy deployment while preserving all existing functionality. Fixes <https://github.com/Disfactory/Disfactory/issues/665|#665>. --- :speech_balloon: Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click <https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent|here> to start the survey.

github2 22:02:16

<https://github.com/Disfactory/Disfactory/pull/666|#666 Add Render blueprint for backend deployment>

Adds a Render blueprint (`render.yaml`) to enable one-click deployment of the Disfactory backend to the <http://Render.com|Render.com> platform. The blueprint defines infrastructure as code for all required services. ## Services Configured • *disfactory-backend* (Web Service) - Django API server with automatic scaling • *disfactory-worker* (Background Worker) - Django Q task queue for async processing • *disfactory-db* (PostgreSQL 14 Database) - Database with PostGIS support ## Features • *Automatic database connectivity* - Environment variables are automatically configured from database connection properties • *Production-ready configuration* - Debug disabled, proper logging, CORS settings • *Health check monitoring* - Uses existing `/api/statistics/total` endpoint • *Docker-based deployment* - Leverages existing multi-stage Dockerfile with production target • *Secret management* - API keys marked for manual configuration in Render dashboard ## Deployment Process 1. Fork repository and connect GitHub to Render 2. Create new Blueprint deployment in Render 3. Render automatically detects `render.yaml` and deploys all services 4. Configure secret environment variables (`GOOGLE_MAP_API_KEY`, etc.) 5. Backend is ready for production use ## Additional Changes • Fixed Docker build for newer Poetry versions (`--no-dev` → `--only=main --no-root`) • Updated gunicorn configuration to use Render's `PORT` environment variable • Maintains full compatibility with existing Docker workflows The blueprint follows Render's best practices and enables easy deployment while preserving all existing functionality. Fixes <https://github.com/Disfactory/Disfactory/issues/665|#665>. --- :speech_balloon: Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click <https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent|here> to start the survey.

2025-06-21

github2 00:09:58

`<https://github.com/Disfactory/Disfactory/commit/f94c6613c24ad0bdbcb969f2e8f013e223841ea7|f94c6613>` - Initial plan for issue `<https://github.com/Disfactory/Disfactory/commit/f9a354a94e38f0d0e838d93e4b38cd4913dd434c|f9a354a9>` - Add Render blueprint for backend deployment with Docker build fixes `<https://github.com/Disfactory/Disfactory/commit/bf4a3acdee6d8685b4b9144fca7a4d201d98dffd|bf4a3acd>` - Use localhost (127.0.0.1) binding in gunicorn config for Render deployment `<https://github.com/Disfactory/Disfactory/commit/bdabe856b08c911535f80ef7adf41bc4213d71d1|bdabe856>` - Remove invalid dockerTarget field from render.yaml `<https://github.com/Disfactory/Disfactory/commit/540f669e79edf380318ea219de4a2df3edc3cf78|540f669e>` - Fix Render validation warnings: remove invalid database user and startCommand fields `<https://github.com/Disfactory/Disfactory/commit/bc6501d9831baa773cd504bfd6ff7744fba573ee|bc6501d9>` - Update database plan from starter to free in render.yaml `<https://github.com/Disfactory/Disfactory/commit/c33683367b4888975208ba938f198833d695337a|c3368336>` - Add Zeabur deployment support with template configuration `<https://github.com/Disfactory/Disfactory/commit/c30b127fe8ae5b95f25375fd4db13847daf455db|c30b127f>` - Add GitHub Actions workflow and update Zeabur to use Docker images from GHCR `<https://github.com/Disfactory/Disfactory/commit/df6e3b55ce71177320f1fa16b4c94550c6dcf098|df6e3b55>` - Add docker image build workflow, Render blueprint and zeabur template for backend deployment

github2 00:09:58

`<https://github.com/Disfactory/Disfactory/commit/f94c6613c24ad0bdbcb969f2e8f013e223841ea7|f94c6613>` - Initial plan for issue `<https://github.com/Disfactory/Disfactory/commit/f9a354a94e38f0d0e838d93e4b38cd4913dd434c|f9a354a9>` - Add Render blueprint for backend deployment with Docker build fixes `<https://github.com/Disfactory/Disfactory/commit/bf4a3acdee6d8685b4b9144fca7a4d201d98dffd|bf4a3acd>` - Use localhost (127.0.0.1) binding in gunicorn config for Render deployment `<https://github.com/Disfactory/Disfactory/commit/bdabe856b08c911535f80ef7adf41bc4213d71d1|bdabe856>` - Remove invalid dockerTarget field from render.yaml `<https://github.com/Disfactory/Disfactory/commit/540f669e79edf380318ea219de4a2df3edc3cf78|540f669e>` - Fix Render validation warnings: remove invalid database user and startCommand fields `<https://github.com/Disfactory/Disfactory/commit/bc6501d9831baa773cd504bfd6ff7744fba573ee|bc6501d9>` - Update database plan from starter to free in render.yaml `<https://github.com/Disfactory/Disfactory/commit/c33683367b4888975208ba938f198833d695337a|c3368336>` - Add Zeabur deployment support with template configuration `<https://github.com/Disfactory/Disfactory/commit/c30b127fe8ae5b95f25375fd4db13847daf455db|c30b127f>` - Add GitHub Actions workflow and update Zeabur to use Docker images from GHCR `<https://github.com/Disfactory/Disfactory/commit/df6e3b55ce71177320f1fa16b4c94550c6dcf098|df6e3b55>` - Add docker image build workflow, Render blueprint and zeabur template for backend deployment

github2 00:40:01

<https://github.com/Disfactory/Disfactory/issues/667|#667 Fix docker service initialization>

When I testing the built docker image with docker compose locally, I encountered the following errors. After fixing this error, could you add test and run those test in test workflow? # docker-compose.yml version: "3.9" services: postgres: image: postgis/postgis:14-3.2 container_name: disfactory-postgres restart: unless-stopped environment: POSTGRES_DB: ${POSTGRES_DB} POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"] interval: 10s timeout: 5s retries: 5 backend: image: <http://ghcr.io/disfactory/disfactory/backend:latest|ghcr.io/disfactory/disfactory/backend:latest> container_name: disfactory-backend restart: unless-stopped depends_on: postgres: condition: service_healthy command: &gt; sh -c " cd /Disfactory &amp;&amp; python manage.py collectstatic --noinput &amp;&amp; python manage.py migrate &amp;&amp; gunicorn -c gunicorn.conf.py gis_project.wsgi " environment: # — Database — DISFACTORY_BACKEND_DEFAULT_DB_HOST: postgres DISFACTORY_BACKEND_DEFAULT_DB_PORT: 5432 DISFACTORY_BACKEND_DEFAULT_DB_NAME: ${POSTGRES_DB} DISFACTORY_BACKEND_DEFAULT_DB_USER: ${POSTGRES_USER} DISFACTORY_BACKEND_DEFAULT_DB_PASSWORD: ${POSTGRES_PASSWORD} # — General settings — DISFACTORY_BACKEND_DEBUG: "false" DISFACTORY_ALLOWED_HOST: "*" DISFACTORY_BACKEND_CORS_ORIGIN_WHITELIST: "" DISFACTORY_BACKEND_MAX_FACTORY_PER_GET: "50" DISFACTORY_BACKEND_MAX_FACTORY_RADIUS_PER_GET: "10" DISFACTORY_BACKEND_LOG_LEVEL: "INFO" DISFACTORY_BACKEND_LOG_FILE: "/tmp/disfactory.log" DISFACTORY_BACKEND_MEDIA_ROOT: "./images/" DISFACTORY_BACKEND_DOMAIN: ${BACKEND_DOMAIN} DISFACTORY_FRONTEND_DOMAIN: "<https://disfactory.tw/>" PORT: "8000" # — Secrets — GOOGLE_MAP_API_KEY: ${GOOGLE_MAP_API_KEY} DISFACTORY_IMGUR_CLIENT_ID: ${DISFACTORY_IMGUR_CLIENT_ID} ports: - "8000:8000" worker: image: <http://ghcr.io/disfactory/disfactory/backend:latest|ghcr.io/disfactory/disfactory/backend:latest> container_name: disfactory-worker restart: unless-stopped depends_on: postgres: condition: service_healthy backend: condition: service_started command: &gt; sh -c " cd /Disfactory &amp;&amp; python manage.py qcluster " environment: # — Database — DISFACTORY_BACKEND_DEFAULT_DB_HOST: postgres DISFACTORY_BACKEND_DEFAULT_DB_PORT: 5432 DISFACTORY_BACKEND_DEFAULT_DB_NAME: ${POSTGRES_DB} DISFACTORY_BACKEND_DEFAULT_DB_USER: ${POSTGRES_USER} DISFACTORY_BACKEND_DEFAULT_DB_PASSWORD: ${POSTGRES_PASSWORD} # — General settings — DISFACTORY_BACKEND_DEBUG: "false" DISFACTORY_ALLOWED_HOST: "*" DISFACTORY_BACKEND_LOG_LEVEL: "INFO" # — Secrets — GOOGLE_MAP_API_KEY: ${GOOGLE_MAP_API_KEY} volumes: pgdata: ``` disfactory-worker | Traceback (most recent call last): disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute disfactory-worker | return self.cursor.execute(sql, params) disfactory-worker | psycopg2.errors.UndefinedTable: relation "django_q_ormq" does not exist disfactory-worker | LINE 1: ...go_q_ormq"."payload", "django_q_ormq"."lock" FROM "django_q_... disfactory-worker | ^ disfactory-worker | disfactory-worker | disfactory-worker | The above exception was the direct cause of the following exception: disfactory-worker | disfactory-worker | Traceback (most recent call last): disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django_q/cluster.py", line 289, in pusher disfactory-worker | task_set = broker.dequeue() disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django_q/brokers/orm.py", line 55, in dequeue disfactory-worker | if tasks: disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 278, in __bool__ disfactory-worker | self._fetch_all() disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1242, in _fetch_all disfactory-worker | self._result_cache = list(self._iterable_class(self)) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 55, in __iter__ disfactory-worker | results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql disfactory-worker | cursor.execute(sql, params) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 67, in execute disfactory-worker | return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers disfactory-worker | return executor(sql, params, many, context) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute disfactory-worker | return self.cursor.execute(sql, params) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 89, in __exit__ disfactory-worker | raise dj_exc_value.with_traceback(traceback) from exc_value disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute disfactory-worker | return self.cursor.execute(sql, params) disfactory-worker | django.db.utils.ProgrammingError: relation "django_q_ormq" does not exist disfactory-worker | LINE 1: ...go_q_ormq"."payload", "django_q_ormq"."lock" FROM "django_q_... disfactory-worker | ^ ``` ``` disfactory-backend | * disfactory-backend | Traceback (most recent call last): disfactory-backend | File "/Disfactory/manage.py", line 24, in &lt;module&gt; disfactory-backend | main() disfactory-backend | File "/Disfactory/manage.py", line 20, in main disfactory-backend | execute_from_command_line(sys.argv) disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line disfactory-backend | utility.execute() disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 375, in execute disfactory-backend | self.fetch_command(subcommand).run_from_argv(self.argv) disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 323, in run_from_argv disfactory-backend | self.execute(*args, **cmd_options) disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 364, in execute disfactory-backend | output = self.handle(*args, **options) disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 188, in handle disfactory-backend | collected = self.collect() disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line…

github2 00:40:01

<https://github.com/Disfactory/Disfactory/issues/667|#667 Fix docker service initialization>

When I testing the built docker image with docker compose locally, I encountered the following errors. After fixing this error, could you add test and run those test in test workflow? # docker-compose.yml version: "3.9" services: postgres: image: postgis/postgis:14-3.2 container_name: disfactory-postgres restart: unless-stopped environment: POSTGRES_DB: ${POSTGRES_DB} POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"] interval: 10s timeout: 5s retries: 5 backend: image: <http://ghcr.io/disfactory/disfactory/backend:latest|ghcr.io/disfactory/disfactory/backend:latest> container_name: disfactory-backend restart: unless-stopped depends_on: postgres: condition: service_healthy command: &gt; sh -c " cd /Disfactory &amp;&amp; python manage.py collectstatic --noinput &amp;&amp; python manage.py migrate &amp;&amp; gunicorn -c gunicorn.conf.py gis_project.wsgi " environment: # — Database — DISFACTORY_BACKEND_DEFAULT_DB_HOST: postgres DISFACTORY_BACKEND_DEFAULT_DB_PORT: 5432 DISFACTORY_BACKEND_DEFAULT_DB_NAME: ${POSTGRES_DB} DISFACTORY_BACKEND_DEFAULT_DB_USER: ${POSTGRES_USER} DISFACTORY_BACKEND_DEFAULT_DB_PASSWORD: ${POSTGRES_PASSWORD} # — General settings — DISFACTORY_BACKEND_DEBUG: "false" DISFACTORY_ALLOWED_HOST: "*" DISFACTORY_BACKEND_CORS_ORIGIN_WHITELIST: "" DISFACTORY_BACKEND_MAX_FACTORY_PER_GET: "50" DISFACTORY_BACKEND_MAX_FACTORY_RADIUS_PER_GET: "10" DISFACTORY_BACKEND_LOG_LEVEL: "INFO" DISFACTORY_BACKEND_LOG_FILE: "/tmp/disfactory.log" DISFACTORY_BACKEND_MEDIA_ROOT: "./images/" DISFACTORY_BACKEND_DOMAIN: ${BACKEND_DOMAIN} DISFACTORY_FRONTEND_DOMAIN: "<https://disfactory.tw/>" PORT: "8000" # — Secrets — GOOGLE_MAP_API_KEY: ${GOOGLE_MAP_API_KEY} DISFACTORY_IMGUR_CLIENT_ID: ${DISFACTORY_IMGUR_CLIENT_ID} ports: - "8000:8000" worker: image: <http://ghcr.io/disfactory/disfactory/backend:latest|ghcr.io/disfactory/disfactory/backend:latest> container_name: disfactory-worker restart: unless-stopped depends_on: postgres: condition: service_healthy backend: condition: service_started command: &gt; sh -c " cd /Disfactory &amp;&amp; python manage.py qcluster " environment: # — Database — DISFACTORY_BACKEND_DEFAULT_DB_HOST: postgres DISFACTORY_BACKEND_DEFAULT_DB_PORT: 5432 DISFACTORY_BACKEND_DEFAULT_DB_NAME: ${POSTGRES_DB} DISFACTORY_BACKEND_DEFAULT_DB_USER: ${POSTGRES_USER} DISFACTORY_BACKEND_DEFAULT_DB_PASSWORD: ${POSTGRES_PASSWORD} # — General settings — DISFACTORY_BACKEND_DEBUG: "false" DISFACTORY_ALLOWED_HOST: "*" DISFACTORY_BACKEND_LOG_LEVEL: "INFO" # — Secrets — GOOGLE_MAP_API_KEY: ${GOOGLE_MAP_API_KEY} volumes: pgdata: ``` disfactory-worker | Traceback (most recent call last): disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute disfactory-worker | return self.cursor.execute(sql, params) disfactory-worker | psycopg2.errors.UndefinedTable: relation "django_q_ormq" does not exist disfactory-worker | LINE 1: ...go_q_ormq"."payload", "django_q_ormq"."lock" FROM "django_q_... disfactory-worker | ^ disfactory-worker | disfactory-worker | disfactory-worker | The above exception was the direct cause of the following exception: disfactory-worker | disfactory-worker | Traceback (most recent call last): disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django_q/cluster.py", line 289, in pusher disfactory-worker | task_set = broker.dequeue() disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django_q/brokers/orm.py", line 55, in dequeue disfactory-worker | if tasks: disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 278, in __bool__ disfactory-worker | self._fetch_all() disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1242, in _fetch_all disfactory-worker | self._result_cache = list(self._iterable_class(self)) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 55, in __iter__ disfactory-worker | results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql disfactory-worker | cursor.execute(sql, params) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 67, in execute disfactory-worker | return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers disfactory-worker | return executor(sql, params, many, context) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute disfactory-worker | return self.cursor.execute(sql, params) disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 89, in __exit__ disfactory-worker | raise dj_exc_value.with_traceback(traceback) from exc_value disfactory-worker | File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute disfactory-worker | return self.cursor.execute(sql, params) disfactory-worker | django.db.utils.ProgrammingError: relation "django_q_ormq" does not exist disfactory-worker | LINE 1: ...go_q_ormq"."payload", "django_q_ormq"."lock" FROM "django_q_... disfactory-worker | ^ ``` ``` disfactory-backend | * disfactory-backend | Traceback (most recent call last): disfactory-backend | File "/Disfactory/manage.py", line 24, in &lt;module&gt; disfactory-backend | main() disfactory-backend | File "/Disfactory/manage.py", line 20, in main disfactory-backend | execute_from_command_line(sys.argv) disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line disfactory-backend | utility.execute() disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 375, in execute disfactory-backend | self.fetch_command(subcommand).run_from_argv(self.argv) disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 323, in run_from_argv disfactory-backend | self.execute(*args, **cmd_options) disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 364, in execute disfactory-backend | output = self.handle(*args, **options) disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 188, in handle disfactory-backend | collected = self.collect() disfactory-backend | File "/usr/local/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line…

github2 01:00:45

<https://github.com/Disfactory/Disfactory/pull/668|#668 Fix docker service initialization issues with static files and worker startup>

This PR resolves two critical docker service initialization issues that prevented the application from starting correctly in docker-compose environments: ## Issues Fixed ### 1. Static Files Collection Error ``` FileNotFoundError: [Errno 2] No such file or directory: '/Disfactory/static' ``` *Root Cause*: Django's `collectstatic` command failed because: • The `/backend/static/` directory didn't exist in the Docker image • `STATIC_ROOT` setting was not configured in Django settings *Solution*: • Created `/backend/static/` directory with `.gitkeep` file • Added `STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")` to settings.py • Updated startup scripts to run `collectstatic --noinput` before starting services ### 2. Django-Q Worker Database Error ``` django.db.utils.ProgrammingError: relation "django_q_ormq" does not exist ``` *Root Cause*: Worker service started before database migrations completed, trying to access django_q tables that didn't exist yet. *Solution*: • Created `wait-for-migrations.sh` script to check for completed migrations • Updated `start_worker.sh` to wait for migrations before starting qcluster • Enhanced all startup scripts to ensure proper initialization order ## Changes Made ### New Files • `backend/static/.gitkeep` - Ensures static directory exists • `backend/scripts/wait-for-migrations.sh` - Migration completion checker • `backend/scripts/test-startup-scripts.sh` - Startup script validation • `backend/scripts/integration-test.sh` - Comprehensive integration tests • `backend/docs/DOCKER_FIXES.md` - Complete documentation of fixes ### Enhanced Startup Scripts • `start_prod.sh`: Now runs `collectstatic` → `migrate` → `gunicorn` • `start_worker.sh`: Waits for migrations before starting `qcluster` • `start.sh`: Updated for dev environment consistency ### Testing • Added startup script tests to GitHub Actions workflow • Created comprehensive integration test suite • All tests verify the docker-compose issues are resolved ## Verification The fixes have been thoroughly tested: # Test static files collection docker run --rm &lt;image&gt; python manage.py collectstatic --dry-run --noinput # :white_check_mark: Works without errors # Test Django-Q accessibility docker run --rm &lt;image&gt; python -c "import django; django.setup(); from django_q.models import OrmQ" # :white_check_mark: No database errors # Run full integration test ./backend/scripts/integration-test.sh # :white_check_mark: All tests pass ## Impact The original docker-compose.yml configuration from the issue will now work correctly. Users can deploy the application without encountering the reported initialization failures. Fixes <https://github.com/Disfactory/Disfactory/issues/667|#667>. --- :bulb: You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more <https://gh.io/copilot-coding-agent-tips|Copilot coding agent tips> in the docs.

github2 01:00:45

<https://github.com/Disfactory/Disfactory/pull/668|#668 Fix docker service initialization issues with static files and worker startup>

This PR resolves two critical docker service initialization issues that prevented the application from starting correctly in docker-compose environments: ## Issues Fixed ### 1. Static Files Collection Error ``` FileNotFoundError: [Errno 2] No such file or directory: '/Disfactory/static' ``` *Root Cause*: Django's `collectstatic` command failed because: • The `/backend/static/` directory didn't exist in the Docker image • `STATIC_ROOT` setting was not configured in Django settings *Solution*: • Created `/backend/static/` directory with `.gitkeep` file • Added `STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")` to settings.py • Updated startup scripts to run `collectstatic --noinput` before starting services ### 2. Django-Q Worker Database Error ``` django.db.utils.ProgrammingError: relation "django_q_ormq" does not exist ``` *Root Cause*: Worker service started before database migrations completed, trying to access django_q tables that didn't exist yet. *Solution*: • Created `wait-for-migrations.sh` script to check for completed migrations • Updated `start_worker.sh` to wait for migrations before starting qcluster • Enhanced all startup scripts to ensure proper initialization order ## Changes Made ### New Files • `backend/static/.gitkeep` - Ensures static directory exists • `backend/scripts/wait-for-migrations.sh` - Migration completion checker • `backend/scripts/test-startup-scripts.sh` - Startup script validation • `backend/scripts/integration-test.sh` - Comprehensive integration tests • `backend/docs/DOCKER_FIXES.md` - Complete documentation of fixes ### Enhanced Startup Scripts • `start_prod.sh`: Now runs `collectstatic` → `migrate` → `gunicorn` • `start_worker.sh`: Waits for migrations before starting `qcluster` • `start.sh`: Updated for dev environment consistency ### Testing • Added startup script tests to GitHub Actions workflow • Created comprehensive integration test suite • All tests verify the docker-compose issues are resolved ## Verification The fixes have been thoroughly tested: # Test static files collection docker run --rm &lt;image&gt; python manage.py collectstatic --dry-run --noinput # :white_check_mark: Works without errors # Test Django-Q accessibility docker run --rm &lt;image&gt; python -c "import django; django.setup(); from django_q.models import OrmQ" # :white_check_mark: No database errors # Run full integration test ./backend/scripts/integration-test.sh # :white_check_mark: All tests pass ## Impact The original docker-compose.yml configuration from the issue will now work correctly. Users can deploy the application without encountering the reported initialization failures. Fixes <https://github.com/Disfactory/Disfactory/issues/667|#667>. --- :bulb: You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more <https://gh.io/copilot-coding-agent-tips|Copilot coding agent tips> in the docs.

github2 01:36:08

`<https://github.com/Disfactory/Disfactory/commit/02beb8fd2bb594a596711a4da66ca3025d39c202|02beb8fd>` - Fix docker service initialization issues with static files and worker startup (#668)

github2 01:36:08

`<https://github.com/Disfactory/Disfactory/commit/02beb8fd2bb594a596711a4da66ca3025d39c202|02beb8fd>` - Fix docker service initialization issues with static files and worker startup (#668)

github2 02:03:17

<https://github.com/Disfactory/Disfactory/pull/669|#669 Enhance Docker Compose and Django settings for static files>

Improve Docker Compose configuration for testing and update Django settings to manage static files effectively in the Zeabur template.

github2 02:03:17

<https://github.com/Disfactory/Disfactory/pull/669|#669 Enhance Docker Compose and Django settings for static files>

Improve Docker Compose configuration for testing and update Django settings to manage static files effectively in the Zeabur template.

github2 14:18:21

`<https://github.com/Disfactory/Disfactory/commit/a2944c5e69febd38b9bfd2ad0531e5d10d683c93|a2944c5e>` - Enhance Docker Compose and Django settings for static files (#669)

github2 15:21:02

<https://github.com/Disfactory/Disfactory/pull/670|#670 Improve static file handling and update worker commands>

Enhance the Dockerfile and scripts for better static file management and ensure database migrations are included in the Disfactory worker startup command. Update icons to utilize frontend assets.

github2 17:35:05

`<https://github.com/Disfactory/Disfactory/commit/8ebbbe7b2fad705c5918af2850c72612bc13dcad|8ebbbe7b>` - Improve static file handling and update worker commands (#670)

github2 17:48:00

<https://github.com/Disfactory/Disfactory/pull/671|#671 Add static file URL routing to urlpatterns>

Enhance URL routing by adding static file handling for both media and static files in the urlpatterns.

github2 18:04:37

`<https://github.com/Disfactory/Disfactory/commit/e029e40e5fa7b11a663b32f0e0a55d71a0fdf2c1|e029e40e>` - Add static file URL routing to urlpatterns (#671)

github2 21:58:17

<https://github.com/Disfactory/Disfactory/pull/672|#672 Add Kubernetes deployment configuration for Disfactory>

Introduce Kubernetes configuration for Disfactory deployment, enhance Zeabur setup, and support skipping external API calls during migration. Refactor backend Docker image workflow and add Caddy support for improved static file serving.