From 80cde37b98c108189e3f4431dd13c75b2f6acff9 Mon Sep 17 00:00:00 2001 From: Ben Stull Date: Fri, 5 Jun 2026 03:50:34 -0700 Subject: [PATCH] build(simulator): Dockerfile, compose, and make targets Per docs/superpowers/plans/2026-06-04-experience-simulator.md Task 6. Dockerfile also copies tools/ (a declared setuptools package) so the editable install resolves inside the image; the plan's Dockerfile omitted it. Co-Authored-By: Claude Opus 4.8 (1M context) --- Makefile | 7 +++++++ simulator/Dockerfile | 10 ++++++++++ simulator/docker-compose.yml | 7 +++++++ 3 files changed, 24 insertions(+) create mode 100644 Makefile create mode 100644 simulator/Dockerfile create mode 100644 simulator/docker-compose.yml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..96a947e --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +.PHONY: sim sim-local + +sim: + docker compose -f simulator/docker-compose.yml up --build + +sim-local: + python -m uvicorn simulator.app:app --reload --port 8000 diff --git a/simulator/Dockerfile b/simulator/Dockerfile new file mode 100644 index 0000000..14b9b50 --- /dev/null +++ b/simulator/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.11-slim +WORKDIR /app +COPY pyproject.toml ./ +COPY hef ./hef +COPY tools ./tools +COPY simulator ./simulator +COPY catalog ./catalog +RUN pip install --no-cache-dir -e ".[sim]" +EXPOSE 8000 +CMD ["uvicorn", "simulator.app:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/simulator/docker-compose.yml b/simulator/docker-compose.yml new file mode 100644 index 0000000..390bbeb --- /dev/null +++ b/simulator/docker-compose.yml @@ -0,0 +1,7 @@ +services: + simulator: + build: + context: .. + dockerfile: simulator/Dockerfile + ports: + - "8000:8000"