Skip to content

Commit

Permalink
Update readme (#13)
Browse files Browse the repository at this point in the history
* updates dockerfile and readme

* update README
  • Loading branch information
fhernandezvivanco authored Sep 11, 2024
1 parent a6b74aa commit c6f6b2f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down Expand Up @@ -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
```
Expand Down
6 changes: 0 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <hernandf@ansto.gov.au>",
Expand Down

0 comments on commit c6f6b2f

Please sign in to comment.