Docker image for writing and serving mocks with Jupyter and FastAPI.
5.4K
Docker image for writing and serving mocks with Jupyter and FastAPI.

Mockbook is a simple FastAPI application with the following features:
To pull and run the image from Docker Hub, run:
$ docker run --rm \
-p 127.0.0.1:80:80 \
-e JUPYTERLAB_ARGS='--NotebookApp.token=token' \
lasuillard/mockbook:main
The following endpoints are available (via NGINX):
graph LR
browser[Browser]
mockbook[Mockbook]
jupyterlab[JupyterLab]
nginx[NGINX]
browser -->|http://localhost:80| nginx
nginx -->|/| mockbook
nginx -->|/jupyter| jupyterlab
| Key | Description |
|---|---|
MOCKBOOK_ARGS | Extra arguments for Mockbook's uvicorn server (uvicorn). |
MOCKBOOK_AUTORELOAD_DISABLED | Disable auto reloading (--reload). May be useful for certain environments (such as testing) where reloading is not desirable. |
JUPYTERLAB_ARGS | Extra arguments for JupyterLab (jupyter lab). |
JUPYTERLAB_DISABLED | Disable the JupyterLab service. May be useful for certain environments (such as testing) where the notebook is unnecessary. |
NGINX_ARGS | Extra arguments to pass to NGINX (nginx). |
NGINX_DISABLED | Disable the NGINX service. |
NGINX_RELOADER_DISABLED | Disable the NGINX reloader. |
/app/mockbook/notebooks for Jupyter notebooks. The Mockbook app watches /app/mockbook/ for changes and reloads FastAPI automatically./app/mockbook/nginx for NGINX configuration. The auto reloader watches this directory and reloads NGINX automatically.Please check the examples directory for more usage examples.
Please refer to CONTRIBUTING.md for more information on how to contribute to this project.
This project is licensed under the MIT License.
Content type
Image
Digest
sha256:d641f1e5d…
Size
141.4 MB
Last updated
8 days ago
docker pull lasuillard/mockbook