-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
25 lines (19 loc) · 1.11 KB
/
Dockerfile.dev
File metadata and controls
25 lines (19 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM python:3.12-slim
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
WORKDIR /app
# Install workspace dependencies
COPY pyproject.toml uv.lock .python-version ./
COPY packages/api/pyproject.toml packages/api/pyproject.toml
COPY packages/cell-explorer-agent/pyproject.toml packages/cell-explorer-agent/pyproject.toml
COPY packages/cell2zarr/pyproject.toml packages/cell2zarr/pyproject.toml
COPY packages/zarr-access/pyproject.toml packages/zarr-access/pyproject.toml
COPY packages/zarr-auth-proxy/pyproject.toml packages/zarr-auth-proxy/pyproject.toml
RUN uv sync --no-install-workspace
# Copy source and install workspace packages
COPY packages/ packages/
RUN uv sync
EXPOSE 8000
# Run pending Alembic migrations once at container start, then exec uvicorn
# with --reload. The reload swaps workers on code change but doesn't restart
# the container, so migrations run exactly once per `docker compose up`.
CMD ["sh", "-c", "uv run --project packages/api alembic -c packages/api/alembic.ini upgrade head && exec uv run uvicorn cell_explorer_api.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir /app/packages/api/src"]