Commit Graph

10 Commits

Author SHA1 Message Date
kjh2064 e2587bad40 fix: Add Nginx configuration update to CI/CD deployment
TaxBaik CI/CD / build-and-deploy (push) Failing after 3m26s
CRITICAL FIX for 502 Bad Gateway error:
- Green-Blue deployment was switching to new port (5004)
- But Nginx config was still pointing to old port (5003)
- Result: direct port access worked, but Nginx proxy returned 502

CHANGES:
1. deploy_gb.sh: Remove sudo calls (requires root credentials)
   - Script cannot use sudo without NOPASSWD configuration
   - Nginx update now handled by CI post-deploy script

2. .gitea/workflows/deploy.yml: Add Nginx update step after Green-Blue deployment
   - Read new active port from taxbaik_port file
   - Update /etc/nginx/sites-available/default proxy_pass
   - Validate Nginx syntax
   - Reload Nginx with new configuration
   - Runs as root (CI runner privilege) - no sudo needed

RESULT:
- Nginx always points to current active port
- 502 errors prevented
- Seamless zero-downtime Green-Blue deployment

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-03 18:17:01 +09:00
kjh2064 f08efb1a6d fix: add ApiClient__BaseUrl environment variable for Dashboard API calls
TaxBaik CI/CD / build-and-deploy (push) Failing after 52s
PROBLEM: Dashboard page was stuck loading forever
ROOT CAUSE:
- AdminDashboardClient requires ApiClient:BaseUrl configuration
- deploy_gb.sh was missing ApiClient__BaseUrl environment variable
- HttpClient had no BaseAddress, causing all API calls to fail

SOLUTION:
- Remove timeout bandaid from App.razor
- Add ApiClient__BaseUrl to deploy_gb.sh environment variables
- API requests will now properly route to http://127.0.0.1:${TARGET_PORT}/taxbaik/api/

EXPECTED RESULT:
- Dashboard API calls succeed
- Dashboard page loads normally
- Blog management page becomes clickable

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-03 16:35:36 +09:00
kjh2064 dda600d4e1 fix: use standard ASP.NET Core 10 Blazor WASM runtime filename
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m52s
Root cause analysis:
- App.razor referenced blazor.web.js (legacy filename)
- ASP.NET Core 10 publish outputs blazor.webassembly.js (standard)
- Build/publish mismatch caused 'SyntaxError: Invalid or unexpected token'

Solution (proper fix, not workaround):
- App.razor: change script src to blazor.webassembly.js
- Remove deploy_gb.sh file-copy workaround
- Program.cs: remove unnecessary comment

Result: Single source of truth - blazor.webassembly.js is the standard ASP.NET Core 10
filename. No file duplication, no symlinks, no publish-time workarounds needed.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-03 12:24:36 +09:00
kjh2064 32029bff92 fix: use file copy instead of symlink for Blazor WASM runtime compatibility
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m28s
Problem: ASP.NET Core static files middleware may not handle symlinks correctly,
causing blazor.web.js to be served as a 21-byte stub instead of the full 60KB file.
This caused 'SyntaxError: Invalid or unexpected token' in browser.

Solution: Replace symlink with actual file copy in deploy_gb.sh:
- cp blazor.webassembly.js blazor.web.js (+ .gz and .br variants)

This ensures both filenames are actual files that the static files middleware
can properly serve.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-03 12:20:15 +09:00
kjh2064 b2dd217017 fix: symlink blazor.web.js to blazor.webassembly.js for ASP.NET Core 10 compatibility
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m49s
Problem: ASP.NET Core 10 WASM runtime file is named blazor.webassembly.js but
Blazor pages still reference blazor.web.js, causing 404 Not Found errors and
complete failure to load admin UI.

Solution: In deploy_gb.sh, create symlink before starting the app:
  ln -s blazor.webassembly.js blazor.web.js
This allows both filenames to work, ensuring backward compatibility.

Result: WASM runtime loads correctly in deployed environments.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-03 11:25:53 +09:00
kjh2064 e202faa431 fix: add environment variables to deploy script and E2E tests
TaxBaik CI/CD / build-and-deploy (push) Failing after 3m11s
- Add ConnectionStrings__Default env var to deploy_gb.sh for production deployment
- Add DOTNET_PRINT_TELEMETRY_MESSAGE=false to suppress telemetry
- Update E2E tests to support env vars (E2E_BASE_URL, E2E_ADMIN_USERNAME, E2E_ADMIN_PASSWORD)
- Fixes 'Missing connection string' error on new deployments

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-03 01:54:18 +09:00
kjh2064 d780fecf8c Harden admin telemetry and deployment safeguards
TaxBaik CI/CD / build-and-deploy (push) Successful in 4m30s
2026-07-02 16:10:15 +09:00
kjh2064 7602f5be59 fix: use deploy package for ci blue-green settings
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m42s
2026-07-01 14:35:24 +09:00
kjh2064 a60451b95f fix: favicon and ci deployment checks
TaxBaik CI/CD / build-and-deploy (push) Failing after 1m37s
2026-07-01 12:58:21 +09:00
kjh2064 a84f842490 feat: implement zero-downtime Green/Blue deployment using local TCP proxy
TaxBaik CI/CD / build-and-deploy (push) Successful in 51s
2026-06-30 22:11:09 +09:00