forked from cardosofelipe/fast-next-template
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:
@@ -1,6 +1,6 @@
|
|||||||
# PragmaStack
|
# PragmaStack
|
||||||
|
|
||||||
<div align="center">
|
<div style="text-align: center">
|
||||||
<img src="frontend/public/logo.svg" alt="PragmaStack Logo" width="200" />
|
<img src="frontend/public/logo.svg" alt="PragmaStack Logo" width="200" />
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,2 +1,17 @@
|
|||||||
.venv
|
.venv
|
||||||
*.iml
|
*.iml
|
||||||
|
|
||||||
|
# Python build and cache artifacts
|
||||||
|
__pycache__/
|
||||||
|
.pytest_cache/
|
||||||
|
.mypy_cache/
|
||||||
|
.ruff_cache/
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
|
||||||
|
# Packaging artifacts
|
||||||
|
*.egg-info/
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
htmlcov/
|
||||||
|
.uv_cache/
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
"""add user locale preference column
|
"""add user locale preference column
|
||||||
|
|
||||||
Revision ID: c8e9f3a2d1b4
|
Revision ID: c8e9f3a2d1b4
|
||||||
Revises: b76c725fc3cf
|
Revises: 1174fffbe3e4
|
||||||
Create Date: 2025-11-17 18:00:00.000000
|
Create Date: 2025-11-17 18:00:00.000000
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -13,7 +13,7 @@ from alembic import op
|
|||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
revision: str = "c8e9f3a2d1b4"
|
revision: str = "c8e9f3a2d1b4"
|
||||||
down_revision: str | None = "b76c725fc3cf"
|
down_revision: str | None = "1174fffbe3e4"
|
||||||
branch_labels: str | Sequence[str] | None = None
|
branch_labels: str | Sequence[str] | None = None
|
||||||
depends_on: str | Sequence[str] | None = None
|
depends_on: str | Sequence[str] | None = None
|
||||||
|
|
||||||
|
|||||||
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"
|
echo "Starting Backend"
|
||||||
|
|
||||||
# Apply database migrations
|
# 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)
|
# 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
|
# Execute the command passed to docker run
|
||||||
exec "$@"
|
exec "$@"
|
||||||
Reference in New Issue
Block a user