fix: use login shell when dropping privileges in manifest entrypoint

The generated entrypoint used a brittle  invocation that could
spawn a non-interactive bash and exit immediately, causing containers to
stop with exit code 0 right after startup.

- Switch to  so the
  container user gets a login shell and stdin/tty are preserved
- Update the unit test assertion for the new drop-privileges command

Quality gates:
- pytest tests/unit: 219 passed
- ruff: clean on changed files
- mypy: clean on changed files
This commit is contained in:
Developer
2026-06-15 10:18:52 +00:00
parent 1658767cf4
commit 94137c6586
12 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ dir: apps/api
index: apps/api/.pi-map.index.md
## role
FastAPI backend API that manages projects, git repositories, and development tools through Docker containers with PostgreSQL persistence.
Backend API service that provides a FastAPI-based management layer for projects, git repositories, and containerized development tools with database-backed state.
## files
- .dockerignore | Specifies files and directories to exclude from Docker build context to reduce image size and avoid copying unnecessary files into containers. | dep: Docker
- Dockerfile | Multi-stage Docker build for a Python application with Docker socket access, Cloudflare tunneling, and database dependency waiting | dep: python:3.11-slim, gcc, libpq-dev, docker-ce-cli, docker-compose-plugin, cloudflared, uvicorn, pyproject.toml dependencies
@@ -14,7 +14,7 @@ FastAPI backend API that manages projects, git repositories, and development too
- uv.lock | Lock file for the uv Python package manager that pins exact dependency versions and their artifact hashes for reproducible installations | dep: uv, Python 3.11+, aiosqlite, alembic, annotated-doc, annotated-types, anyio, ast-serialize, asyncpg, and many other PyPI packages
- wait-for-db.sh | Wait for a PostgreSQL database to become available before executing a command, with configurable retry logic. | dep: nc (netcat), sh (POSIX shell), sleep
## arch
Async Python microservice using FastAPI, SQLAlchemy/Alembic for migrations, multi-stage Docker builds with Docker-in-Docker socket access, Cloudflare tunneling, and uv for dependency management.
Async Python/FastAPI with SQLAlchemy/Alembic PostgreSQL migrations, uv package management, multi-stage Docker containerization with Docker socket access for container orchestration, and Cloudflare tunneling for external connectivity.
## tags
docker, alembic, python, database, fastapi, postgresql, asyncpg, uvicorn
## symbols