From c6f6b2fc45ffeba529f06b25fb676003c92482e2 Mon Sep 17 00:00:00 2001 From: Francisco Hernandez Vivanco <49014169+fhernandezvivanco@users.noreply.github.com> Date: Wed, 11 Sep 2024 15:35:19 +1000 Subject: [PATCH] Update readme (#13) * updates dockerfile and readme * update README --- README.md | 21 ++++++++++++++++----- docker-compose.yml | 6 ------ pyproject.toml | 2 +- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 2b1e071..5380fe0 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,16 @@ Currently generates a [Stream V2] release compatible ZMQ stream. ## Running the simulated SIMPLON API -Follow these steps to run the simulated SIMPLON API and ensure its proper functionality: +### Running the app using docker (Recommended) +You can build and run the app by simply running: +```bash +docker compose up --detach +``` +The app's behavior can be modified by setting environment variables in the `docker-compose.yml` file + +### Running the app locally + +Follow these steps to run the app locally: 1. **Install the Library** @@ -54,16 +63,18 @@ Follow these steps to run the simulated SIMPLON API and ensure its proper functi > export AS_API_OPENAPI_URL=/openapi.json >``` -4. **Start the ZMQ Consumer** +## Example usage +Once the simulated SIMPLON API is up and running, you can verify its functionality by: + +1. **Starting the ZMQ Consumer** -Once the simulated SIMPLON API is up and running, you can verify its functionality by running the ZMQ receiver and triggering the detector: ```bash python examples/receiver.py ``` -5. **Arm, trigger and disarm the detector** +2. **Triggering the detector** -Finally run the arm, trigger, and disarm script as follows: +You can arm, trigger, and disarm the detector using the following script: ```bash python examples/trigger_detector.py ``` diff --git a/docker-compose.yml b/docker-compose.yml index 65cca05..f7e2094 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,9 +23,3 @@ services: - "8000:8000" - "5555:5555" hostname: mx_simplon_api - healthcheck: - test: curl --fail http://127.0.0.1:8854/healthz || exit 1 - interval: 10s - retries: 5 - start_period: 3s - timeout: 5s diff --git a/pyproject.toml b/pyproject.toml index a48ffb9..2cfbf83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ansto-simplon-api" -version = "0.3.1" +version = "0.3.2" description = "Simulated simplon api" authors = [ "Francisco Hernandez Vivanco ",