Commit Graph

11 Commits

Author SHA1 Message Date
saravanakumardb1
5687e5ace1 fix(docker): clean up compose advisory warnings (Phase D follow-up)
Mechanical fixes to address remaining docker-doctor advisory warnings:
  - Add GITEA_NPM_OWNER to existing build.args block (or full args block
    if missing) so Dockerfile receives the build arg explicitly
  - Add start_period: 30s to healthcheck blocks where missing
    (prevents false cold-start failures)

Both are advisory checks — neither blocks builds — but cleaning them up
eliminates noise from CI logs.

Refs: docker-build-optimization-roadmap.md \xc2\xa7Phase D follow-ups
2026-05-27 04:25:19 -07:00
saravanakumardb1
b23a601431 fix(docker): apply Phase D.2 Dockerfile/compose fixes
Mechanical fixes per docker-build-optimization-roadmap.md §6.D.2:

- Dockerfile: add # syntax=docker/dockerfile:1.7 directive (A2)
- Dockerfile: declare ARG GITEA_NPM_OWNER alongside GITEA_NPM_HOST (F14)
- Dockerfile: wildcard COPY .docker-deps* (A5-2, B3)
- Dockerfile (web): glob enumerated config COPYs (F11/F13) where applicable
- docker-compose.yml: healthcheck localhost → 127.0.0.1 (F12) where applicable
- docker-compose.yml: pass GITEA_NPM_OWNER build arg (F14) where applicable
- .npmrc.docker: rewrite with canonical ${GITEA_NPM_HOST}/${GITEA_NPM_OWNER}
  template (F4/F14) if hardcoded
- .gitignore: ensure *.bak rule (B3)
- .docker-deps/.gitkeep: ensure exists for wildcard COPY

Verified: docker-doctor exits PASS (warnings only, ADR-0001 expected).

Refs: docker-build-optimization-roadmap.md §Phase D.2
2026-05-27 04:12:19 -07:00
saravanakumardb1
91b859746b fix(docker): bake NEXT_PUBLIC_* values at build time, drop hardcoded api.bytelyst.com
Root cause: docker-compose.yml hardcoded NEXT_PUBLIC_NOTES_API_URL to
https://api.bytelyst.com/notelett — a production URL that doesn't
exist on this network — as the *build arg* for the web image. The
docker-compose.override.yml correctly set localhost:4016/api but only
on the runtime environment, which has no effect because NEXT_PUBLIC_*
values are baked into the Next.js bundle at build time (pnpm run build
inside the Dockerfile), not read at runtime.

Symptom: every authenticated client-side fetch from the deployed web
container went to https://api.bytelyst.com/notelett/... which the
corporate proxy intercepted with a blockpage. The saved-views client
in particular fired on every (app)/ layout mount, surfacing a
'Failed to fetch' toast on dashboard load. 4 release-flows.spec
tests failed because page.route('**/api/**') couldn't match the
api.bytelyst.com URLs at all.

Discovery: inspected the deployed bundle inside the running container.
'grep -oE "api.bytelyst.com" /app/web/web/.next/static/chunks/*.js'
returned multiple hits across the (app)/ layout, (auth)/ pages, and
share page. The string was absent from the source tree, which proved
it had been injected at build time via the broken arg default.

Discovery debug pattern (kept for future use):
  page.on('requestfailed', r => console.log(r.method(), r.url()));
  page.route('**/api/**', route => route.fulfill({status:200,body:'{}'}));
  await page.goto('/dashboard');
  // FAILED REQUESTS will list any URL not under /api/** that the SPA
  // attempted, exposing baked-in production URLs immediately.

Fix (three layers, defense in depth):

1. docker-compose.yml — replace hardcoded
   'NEXT_PUBLIC_NOTES_API_URL: https://api.bytelyst.com/notelett'
   in the build.args block with
   '${NEXT_PUBLIC_NOTES_API_URL:-http://localhost:4016/api}'.
   Same treatment for the runtime environment block. Add build args
   for the four other NEXT_PUBLIC_* values (extraction, MCP,
   diagnostics, product name/id, telemetry transport) so a single env
   var on the host controls both build and runtime layers.

2. web/Dockerfile — declare ARG and ENV lines for all seven
   NEXT_PUBLIC_* values so the build args reach 'pnpm run build'.
   Previously only NOTES_API_URL and PLATFORM_SERVICE_URL were
   declared, which meant overriding extraction/MCP/diagnostics via
   docker compose silently had no effect on the bundle.

3. docker-compose.override.yml — add a build.args block mirroring the
   four URL overrides so the local-only override also reaches build
   time, not just runtime. Comment block explains the bake-time vs
   runtime distinction so future contributors don't repeat the bug.

Verified end-to-end after the fix:
  - docker compose build --no-cache web + up -d → grep of bundle now
    shows 'localhost:4016/api', api.bytelyst.com fully gone.
  - Debug interception test: zero requestfailed events on /dashboard.
  - Playwright release-flows.spec.ts: 4 failed → 4 passed (after URL
    fix; no test code changed for these four tests).
  - Full Playwright suite (--ignore-snapshots): 43 passed.
  - scripts/e2e-docker-test.sh: 9/9 backend API lifecycle steps pass.
  - pnpm run verify: backend 380/380, web 96/96, mobile 97/97.
2026-05-23 10:04:36 -07:00
root
3dd981198e fix: Update docker configuration for production deployment
- Fixed NEXT_PUBLIC_NOTES_API_URL to use public API endpoint
- Updated docker-compose.yml environment format to proper YAML
- Updated Dockerfiles to remove Gitea secrets and use .docker-deps
- Added docker-prep.sh script for dependency packaging
- Changed NODE_ENV back to development for compatibility with memory DB

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-12 08:20:12 +00:00
cae5941374 ci(docker): add compose smoke script 2026-05-05 13:31:10 -07:00
da3129c89b fix(platform): align mcp service urls 2026-05-05 09:19:11 -07:00
saravanakumardb1
6bff2d3e2e chore(devops): add LLM env vars to .env.example, docker-compose, docker-prep 2026-04-06 11:15:36 -07:00
02bcb0d122 feat: integrate feedback, broadcast, survey, offline-queue clients + settings page + devops
Phase 4: Add @bytelyst/feedback-client, broadcast-client, survey-client, offline-queue
wrappers. Revamp settings page with profile, password change, feedback form.
Add BroadcastBanner and SurveyBanner to app layout. Wire offline queue flush on boot.

Phase 5: Fix .env.example branding (NoteLett), update docker-compose with all env vars,
enable GitHub Actions CI workflow with lint steps.

Made-with: Cursor
2026-03-29 20:57:27 -07:00
saravanakumardb1
90dd2d3bd5 feat(repo): migrate notelett workspace to pnpm 2026-03-22 15:50:54 -07:00
saravanakumardb1
2f9cfbef6a fix(docker): remove deprecated version key from docker-compose.yml 2026-03-20 15:12:34 -07:00
saravanakumardb1
a71747e3fb chore(devops): add Dockerfiles, docker-compose, CI workflow, docker-prep script [C1-C5]
- backend/Dockerfile: multi-stage Node.js build (install → build → runtime)
- web/Dockerfile: multi-stage Next.js standalone build
- docker-compose.yml: backend (4016) + web (3000) with health check
- scripts/docker-prep.sh: pack @bytelyst/* tarballs + rewrite file: refs (--restore to undo)
- .github/workflows/ci.yml: backend (typecheck+test+build), web (typecheck+test+build), mobile (typecheck)
2026-03-19 08:47:04 -07:00