You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #9 from nikolaysm/fix/refactor-docker
build(docker)!: add dev compose + watch; harden prod compose; Next.js standalone runtime
- Makefile
- Added `compose-watch` using `docker-compose.dev.yml` with `--watch --build`
- Added `compose-watch-down` to stop dev stack and remove orphans
- `compose-down` now uses `--remove-orphans` (safer than `-v`)
- `run-db` starts Postgres from `docker-compose.dev.yml`
- Backend image
- Set `PYTHONPATH=/app`; copy `pyproject.toml` to expose app version
- Switch CMD to `.venv/bin/uvicorn` for hermetic runtime
- Keep non-root user; tidy ownership and entrypoint usage
- Alembic & settings
- Default DSN in `alembic.ini` simplified
- Drop manual `sys.path.append` (rely on `PYTHONPATH`)
- Add `db_echo` to `Settings`; engine `echo` reads `DB_ECHO`
- Entrypoint
- Robust Alembic loop with retries; gate via `RUN_MIGRATIONS=1`
- Compose
- New `docker-compose.dev.yml` with mounts and hot-reload (backend & frontend)
- Production `docker-compose.yml`:
- DB network set `internal: true`; Postgres port no longer published
- Backend uses fixed container port 5432 in DSN
- Frontend builds from `runner` target
- Frontend
- Dockerfile: pnpm multi-stage (`deps` → `builder` → `runner`), non-root user
- Next.js `output: 'standalone'`; remove console in prod; ESM export of config
- Tailwind config path now `tailwind.config.ts`
- `/api/version`: load from `~/package.json`
- `FileUpload`: move `cursor-pointer` to the Button
BREAKING CHANGE: Default `docker-compose.yml` is production-oriented. Postgres is no longer exposed
to the host and the DB network is internal. Use `docker-compose.dev.yml` (e.g., `make compose-watch`
or `make run-db`) for local development with hot reload. Update any host-based DB tooling to connect
via the dev compose file or through the container network.
0 commit comments