a digital entity named phi that roams bsky phi.zzstoatzz.io
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 55 lines 1.5 kB view raw
1# syntax=docker/dockerfile:1.9 2 3# --- web frontend build stage (svelte 5 + adapter-static via bun) --- 4FROM oven/bun:1-slim AS web-builder 5WORKDIR /web 6COPY web/package.json web/bun.lockb ./ 7RUN bun install --frozen-lockfile 8COPY web/ ./ 9RUN bun run build 10 11# --- python deps stage --- 12FROM python:3.12-slim AS builder 13 14# Install uv and git (needed for git+ dependencies) 15COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv 16RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/* 17 18# Configure uv to use /app as the project environment 19ENV UV_LINK_MODE=copy \ 20 UV_COMPILE_BYTECODE=1 \ 21 UV_PYTHON_DOWNLOADS=never \ 22 UV_PYTHON=python3.12 \ 23 UV_PROJECT_ENVIRONMENT=/app 24 25# hatch-vcs needs git — pretend a version instead 26ENV SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 27 28WORKDIR /src 29 30# Copy source for installation 31COPY pyproject.toml uv.lock README.md ./ 32COPY src/ ./src/ 33 34# Install dependencies and the application (non-editable) 35RUN --mount=type=cache,target=/root/.cache/uv \ 36 uv sync --frozen --no-dev --no-editable 37 38# --- runtime stage --- 39FROM python:3.12-slim 40 41COPY --from=builder /app /app 42 43# Copy runtime data 44COPY personalities/ /app/personalities/ 45COPY skills/ /app/skills/ 46 47# Copy built frontend 48COPY --from=web-builder /web/build /app/web 49 50ENV PATH="/app/bin:$PATH" 51ENV PYTHONUNBUFFERED=1 52WORKDIR /app 53 54EXPOSE 8080 55CMD ["python", "-m", "uvicorn", "bot.main:app", "--host", "0.0.0.0", "--port", "8080"]