mitai-jinkendo/backend/Dockerfile

23 lines
520 B
Docker
Raw Normal View History

FROM python:3.12-slim
2026-03-18 08:27:33 +01:00
# Install PostgreSQL client for psql (needed for startup.sh)
RUN apt-get update && apt-get install -y postgresql-client && rm -rf /var/lib/apt/lists/*
WORKDIR /app
2026-03-18 08:27:33 +01:00
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
2026-03-18 08:27:33 +01:00
# Copy application code
COPY . .
2026-03-18 08:27:33 +01:00
# Create directories
RUN mkdir -p /app/data /app/photos
2026-03-18 08:27:33 +01:00
# Make startup script executable
RUN chmod +x /app/startup.sh
# Use startup script instead of direct uvicorn
CMD ["/app/startup.sh"]