Skip to content

Commit bb67fab

Browse files
committed
Merge branch 'feat/plutus-v3'
2 parents 8e63ca8 + 3077e6a commit bb67fab

File tree

4 files changed

+69
-0
lines changed

4 files changed

+69
-0
lines changed

.dockerignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.git
2+
.gitignore
3+
.venv
4+
.pytest_cache
5+
.idea
6+
__pycache__
7+
*.pyc
8+
*.pyo
9+
*.pyd
10+
.DS_Store
11+
SESSIONS.db
12+
SESSIONS.db-shm
13+
SESSIONS.db-wal
14+
docs
15+
contest
16+
tests
17+
report

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM python:3.11-slim
2+
3+
ENV PYTHONDONTWRITEBYTECODE=1 \
4+
PYTHONUNBUFFERED=1
5+
6+
WORKDIR /app
7+
8+
RUN apt-get update && \
9+
apt-get install -y --no-install-recommends git && \
10+
rm -rf /var/lib/apt/lists/*
11+
12+
COPY pyproject.toml uv.lock README.md ./
13+
COPY plutus_bench ./plutus_bench
14+
15+
RUN pip install --no-cache-dir uv && \
16+
uv sync --frozen --no-dev
17+
18+
EXPOSE 8000
19+
20+
ENV MOCKFROST_SESSION_DATABASE_NAME=/data/SESSIONS.db
21+
22+
VOLUME ["/data"]
23+
24+
CMD ["uv", "run", "uvicorn", "plutus_bench.mockfrost.server:app", "--host", "0.0.0.0", "--port", "8000"]

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@ uvicorn plutus_bench.mockfrost.server:app
3434
After running these commands, a mock blockfrost server will be running on `http://localhost:8000`.
3535
Head to `http://localhost:8000/docs` to see the API documentation.
3636

37+
### Docker
38+
39+
```bash
40+
docker compose up --build
41+
```
42+
43+
This starts MockFrost on `http://localhost:8000` and persists session data in a Docker volume.
44+
To stop it:
45+
46+
```bash
47+
docker compose down
48+
```
49+
3750
### Usage
3851

3952
Generally the workflow is as follows:

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
services:
2+
mockfrost:
3+
build:
4+
context: .
5+
dockerfile: Dockerfile
6+
ports:
7+
- "8000:8000"
8+
environment:
9+
MOCKFROST_SESSION_DATABASE_NAME: /data/SESSIONS.db
10+
volumes:
11+
- mockfrost_data:/data
12+
restart: unless-stopped
13+
14+
volumes:
15+
mockfrost_data:

0 commit comments

Comments
 (0)