Fix Docker Entrypoint Script Exit Code 1 - Fix PowerShell Port Already Allocated Error-Resolve 504 Error in Scheduled Tasks

Final checklist
- Confirm that the same symptom is gone after a restart or refresh.
- Keep the smallest working change and undo temporary diagnostic settings.