Files
factoryOps-v2/Containerfile.backend
Johngreen 782dc225bf
All checks were successful
Deploy to Production / deploy (push) Successful in 44s
feat(ci): auto-run alembic migrations and seed on container start
- Add entrypoint.sh (migrate → seed → uvicorn)
- Add python-dotenv to requirements.txt
- Backend container uses entrypoint instead of direct uvicorn

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-02-10 12:36:01 +09:00

24 lines
421 B
Docker

FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY main.py .
COPY src/ ./src/
COPY alembic/ ./alembic/
COPY alembic.ini .
COPY scripts/ ./scripts/
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
EXPOSE 8000
CMD ["sh", "scripts/entrypoint.sh"]