Files
kiskaadee 58c3e76c08 feat(infra): add PostGIS and pgvector database container and API Dockerfile
- Create docker/postgres/Dockerfile extending postgis:17-3.5 with pgvector v0.8.0.
- Add docker/postgres/init-extensions.sql to initialize postgis and vector extensions on DB creation.
- Update docker-compose.yml pg_database service to build from custom Dockerfile.
- Add api/Dockerfile using python 3.14-bookworm-slim with uv.
2026-10-13 06:49:12 -05:00

26 lines
551 B
Docker

FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim
WORKDIR /app
ENV UV_COMPILE_BYTECODE=1
ENV PYTHONUNBUFFERED=1
# Copy dependency files
COPY api/pyproject.toml api/uv.lock /app/
# Install dependencies without installing the project itself
RUN uv sync --frozen --no-dev --no-install-project
# Copy application code
COPY api /app
# Install the application package
RUN uv sync --frozen --no-dev
# Add virtual environment to PATH
ENV PATH="/app/.venv/bin:$PATH"
EXPOSE 8000
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"]