refactor(environment): update virtualenv path to /opt/venv in Docker setup
- Adjusted `docker-compose.dev.yml` to reflect the new venv location. - Modified entrypoint script and Dockerfile to reference `/opt/venv` for isolated dependencies. - Improved bind mount setup to prevent venv overwrites during development.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Ensure the project's virtualenv binaries are on PATH so commands like
|
||||
# 'uvicorn' work even when not prefixed by 'uv run'. This matches how uv
|
||||
# installs the env into /app/.venv in our containers.
|
||||
if [ -d "/app/.venv/bin" ]; then
|
||||
export PATH="/app/.venv/bin:$PATH"
|
||||
# Ensure the virtualenv binaries are on PATH. Dependencies are installed
|
||||
# to /opt/venv (not /app/.venv) to survive bind mounts in development.
|
||||
if [ -d "/opt/venv/bin" ]; then
|
||||
export PATH="/opt/venv/bin:$PATH"
|
||||
export VIRTUAL_ENV="/opt/venv"
|
||||
fi
|
||||
|
||||
# Only the backend service should run migrations and init_db
|
||||
|
||||
Reference in New Issue
Block a user