Skip to content

fix(docker): fix build context, DB URL absolute path, and stale repo references#35

Merged
RaghavChamadiya merged 2 commits intorepowise-dev:mainfrom
mokemoko:fix/dockerfile-db-url-and-copy
Apr 6, 2026
Merged

fix(docker): fix build context, DB URL absolute path, and stale repo references#35
RaghavChamadiya merged 2 commits intorepowise-dev:mainfrom
mokemoko:fix/dockerfile-db-url-and-copy

Conversation

@mokemoko
Copy link
Copy Markdown
Contributor

@mokemoko mokemoko commented Apr 4, 2026

Summary

  • docker/Dockerfile: Fix header comment build command to use -f docker/Dockerfile
  • docker/docker-compose.yml: Fix build context to project root (context: .., dockerfile: docker/Dockerfile) so COPY packages/ paths resolve correctly; fix REPOWISE_DB_URL from /// (relative) to //// (absolute /data/wiki.db)
  • docker/README.md: Update build command and fix default DB URL in env vars table
  • docs/QUICKSTART.md, docs/USER_GUIDE.md: Replace remote-URL docker build with local clone + build; update stale repo URL from RaghavChamadiya/repowiserepowise-dev/repowise; add -f docker/docker-compose.yml to docker compose command

Root causes

These issues appear to be oversights from #14 (moving Dockerfile and docker-compose.yml into the docker/ subdirectory) — the build context paths and documentation were not updated to reflect the new file locations.

  1. docker-compose.yml had build: . — when run from the docker/ directory, the build context was docker/, making COPY packages/... fail silently or at build time.
  2. sqlite+aiosqlite:///data/wiki.db (3 slashes) is a relative path resolved from the process CWD, not the intended absolute /data/wiki.db volume mount.

Test plan

  • docker build -t repowise -f docker/Dockerfile . from project root succeeds
  • docker compose -f docker/docker-compose.yml up resolves packages/ paths correctly
  • Container writes DB to /data/wiki.db (the mounted volume), not a relative path

mokemoko and others added 2 commits April 4, 2026 19:51
- REPOWISE_DB_URL used 3 slashes (sqlite+aiosqlite:///data/wiki.db),
  which SQLite interprets as a relative path "data/wiki.db" relative to
  the process CWD. Changed to 4 slashes (////data/wiki.db) so the path
  is the absolute /data/wiki.db that the volume mount expects.
- Remove `2>/dev/null || true` from the COPY instruction — Dockerfile
  COPY does not support shell redirection; this silently failed to make
  the instruction optional and was dead syntax.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Dockerfile header comment: update build command to use -f docker/Dockerfile
- docker-compose.yml: set build context to project root (context: ..,
  dockerfile: docker/Dockerfile) so COPY paths to packages/ resolve correctly;
  also fix REPOWISE_DB_URL to use 4 slashes (absolute /data/wiki.db path)
- docker/README.md: update build command and fix default DB URL in table
- docs/QUICKSTART.md, docs/USER_GUIDE.md: replace remote-URL docker build with
  git clone + local build (-f docker/Dockerfile), update repo URL from
  RaghavChamadiya/repowise to repowise-dev/repowise, add -f flag to
  docker compose command

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@RaghavChamadiya
Copy link
Copy Markdown
Collaborator

This is a clean fix for a real regression from the docker/ subdirectory move. The 4-slash absolute path and build context fix are both correct.

One small note: removing the '2>/dev/null || true' from the COPY instruction is also correct. Dockerfile COPY does not support shell redirection, so that was dead syntax. Good catch.

Merging this first so #26 can rebase on top.

Copy link
Copy Markdown
Collaborator

@RaghavChamadiya RaghavChamadiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix, merging.

@RaghavChamadiya RaghavChamadiya merged commit b98334a into repowise-dev:main Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants