Skip to content

Commit

Permalink
Add CONTRIBUTING.md for watcher component
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Feb 26, 2024
1 parent bf49ab0 commit 573c5a5
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions watcher/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Contributing

In order to test this component, you need:
- a test Zimfarm instance with a username + password
- a test S3 bucket (compliance must NOT be activated on this bucket)
- credentials to access this bucket (keyId and secretAccessKey suggested below)
- Docker

Rebuild the Docker image:

```
docker build -t local-zf-watcher .
```

Export the secret `S3_URL` as environment variable. Note that the S3 URL starts with `https`.


On Bash/Zsh shells (replace `<your_s3_host_name>`, `<your_key_id>`, `<your_secret_access_key>` and `<your_bucket>` with proper values):

```
export S3_URL="https://<your_s3_host_name>/?keyId=<your_key_id>&secretAccessKey=<your_secret_access_key>&bucketName=<your_bucket>"
```

Run a test (here my zimfarm is running in docker on a container `backend` in network `zimfarm_default`, adapt command to your local setup):
```
docker run -it --rm -e ZIMFARM_API_URL=http://backend:8000/v1 -e S3_URL=$S3_URL --network zimfarm_default local-zf-watcher watcher --zimfarm-username admin --zimfarm-password admin --only tezos.stackexchange.com --runonce
```

0 comments on commit 573c5a5

Please sign in to comment.