Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,21 @@ set -e
# Check if the venv has a working Python (catches cross-platform mismatch)
if ! /app/backend/.venv/bin/python -c "import sys" 2>/dev/null; then
echo "[dev-entrypoint] Installing dependencies (venv missing or incompatible)..."
rm -rf /app/backend/.venv
cd /app/backend && uv sync && uv pip install "watchdog[watchmedo]"
# Docker named volumes can't always be rm -rf'd, so try rm first and warn if it fails
rm_err_file="$(mktemp)"
if ! rm -rf /app/backend/.venv 2>"$rm_err_file"; then
echo "[dev-entrypoint] Warning: failed to remove /app/backend/.venv; continuing with 'uv venv --clear'." >&2
cat "$rm_err_file" >&2
fi
rm -f "$rm_err_file"
cd /app/backend && uv venv --clear && uv sync && uv pip install "watchdog[watchmedo]"
echo "[dev-entrypoint] Dependencies installed."
else
# Venv works — run uv sync to pick up any new/changed dependencies
echo "[dev-entrypoint] Syncing dependencies..."
cd /app/backend && uv sync --quiet 2>/dev/null || true
if ! (cd /app/backend && uv sync --quiet); then
echo "[dev-entrypoint] Warning: dependency sync failed; continuing with existing environment." >&2
fi
# Ensure watchmedo is there too
if ! command -v watchmedo >/dev/null 2>&1; then
cd /app/backend && uv pip install "watchdog[watchmedo]"
Expand Down