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"