Update .dockerignore, alembic revision, and entrypoint script for consistency and reliability
- Expanded `.dockerignore` to exclude Python and packaging-related artifacts for cleaner Docker builds. - Updated Alembic `down_revision` in migration script to reflect correct dependency chain. - Modified entrypoint script to use `uv` with `--no-project` flag, preventing permission issues in bind-mounted volumes.
This commit is contained in:
7
backend/entrypoint.sh
Normal file → Executable file
7
backend/entrypoint.sh
Normal file → Executable file
@@ -3,10 +3,13 @@ set -e
|
||||
echo "Starting Backend"
|
||||
|
||||
# Apply database migrations
|
||||
uv run alembic upgrade head
|
||||
# Avoid installing the project in editable mode (which tries to write egg-info)
|
||||
# when running inside a bind-mounted volume with restricted permissions.
|
||||
# See: https://github.com/astral-sh/uv (use --no-project to skip project build)
|
||||
uv run --no-project alembic upgrade head
|
||||
|
||||
# Initialize database (creates first superuser if needed)
|
||||
uv run python app/init_db.py
|
||||
uv run --no-project python app/init_db.py
|
||||
|
||||
# Execute the command passed to docker run
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user