``. |
+--------------------------------------+----------------------------------------------------------+
| ``METAREGISTRY_FOOTER`` | The footer text that appears on all pages. Can include |
| | arbitrary HTML. |
+--------------------------------------+----------------------------------------------------------+
| ``METAREGISTRY_RESOURCES_SUBHEADER`` | The second paragraph on https://bioregistry.io/registry. |
+--------------------------------------+----------------------------------------------------------+
| ``METAREGISTRY_VERSION`` | The version to display in the top-right of each page. |
| | Can be set to an empty string if no meaningful version |
| | information exists. |
+--------------------------------------+----------------------------------------------------------+
| ``METAREGISTRY_EXAMPLE_PREFIX`` | An example prefix. Defaults to ``chebi``. |
+--------------------------------------+----------------------------------------------------------+
| ``METAREGISTRY_EXAMPLE_IDENTIFIER`` | An example local unique identifier to go with the |
| | example prefix |
+--------------------------------------+----------------------------------------------------------+
Finally, after filling up a configuration JSON file and naming it something like ``config.json``,
you can use the ``--config config.json`` flag in the Python commands to run the web service below.
Running in the command line with Python
---------------------------------------
The Bioregistry can be run from the Python shell directly following installation
from the Python Package Index. This example assumes ``registry.json``
is in the same directory, but any valid paths can be given.
.. code-block:: shell
python -m pip install gunicorn bioregistry[web]
python -m bioregistry web \
--with-gunicorn --workers 4 \
--port 8766 \
--host "0.0.0.0" \
--base-url https://example.com \
--registry registry.json
.. note:: This is the same as deploying the vanilla Bioregistry except the usage of ``--registry registry.json``
Running with Docker
-------------------
Create the following ``Dockerfile`` in the same directory as your ``registry.json``, ``config.json``,
and any other custom files.
.. code-block:: docker
# Dockerfile
FROM python:3.11-alpine
COPY registry.json
COPY config.json
RUN python -m pip install gunicorn bioregistry[web]
ENTRYPOINT python -m bioregistry web \
---with-gunicorn --workers 4 \
--port 8766 \
--host "0.0.0.0" \
--base-url https://example.com \
--registry registry.json \
--config config.json
There are two options for running the ``Dockerfile``. The first option
is by running the following two commands in the command line:
.. code-block:: shell
# Build the docker image from the same directory as the Dockerfile
docker build --tag bioregistry_custom:latest .
# Run the docker image, -d means "detach"
docker run -d -p 8766:8766 bioregistry_custom:latest
The second option is to use an additional `Docker compose