Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add use the docker to execute scripts in jl #64

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ results = Stressify.run_test(
```
---

## 📦 Using Stressify with Docker

To run Stressify without installing anything locally, use Docker:

```bash
docker pull jfilhogn/stressify:latest
docker run --rm jfilhogn/stressify:latest script.jl
```

Running the docker image this way will execute the script you want to run, making it easier to execute. In the directory `./docker` you can find the Dockerfile and the script.jl file that is used to run the image as example.

## 🛠 Usage

### Example Test Script
Expand Down
9 changes: 9 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM julia:1.11

WORKDIR /app

COPY . .

RUN julia -e 'using Pkg; Pkg.add("Stressify")'

CMD ["julia", "--project=."]
14 changes: 14 additions & 0 deletions docker/firstTestDocker.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Pkg
Pkg.activate(".")
using Stressify

#execute for the one VU for one iteration
Stressify.options(
vus = 1,
iterations = 1,
duration = nothing
)

results = Stressify.run_test(
Stressify.http_get("https://httpbin.org/get"),
)
13 changes: 13 additions & 0 deletions docs/source/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ The output will be a dictionary with the following structure:
---------- Resultados dos Checks ----------


Using Docker to execute Stressify
=================================

To run Stressify without installing anything locally, use Docker:

.. code-block:: bash

docker pull jfilhogn/stressify:latest
docker run --rm jfilhogn/stressify:latest script.jl


Running the docker image this way will execute the script you want to run, making it easier to execute. In the directory `./docker` you can find the Dockerfile and the script.jl file that is used to run the image as example.

Important Links
-------------------

Expand Down
Loading