You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 25, 2024. It is now read-only.
1. Clone the Content Watcher repository to your local machine:
30
+
### 2. Configure the app
31
+
The application is configurable by means of the environment. Default environment files are provided with sane values. The available environment configuration variables are document [here](./ENVIRONMENT.md), and a sample file is located [here](./env.template)
Since running a full stack supporting the content-watcher service necessitates having an instance of the content-publishing services, those services are included in the docker-compose profile. The content-publishing services are separately configured using [.env.cp.docker.dev](./.env.cp.docker.dev). Documentation for that configuration can be found [here](https://github.com/AmplicaLabs/content-publishing-service/blob/main/ENVIRONMENT.md)
31
34
32
-
### Configure the app
33
-
The application is configurable by means of the environment. Default environment files are provided with sane values. The available environment configuration variables are document [here](./ENVIRONMENT.md), and a sample file is located [here](./env.template)
35
+
### 3. Start the service:
36
+
Run the following command to start the service:
37
+
```bash
38
+
docker-compose up -d
39
+
```
34
40
41
+
## Testing
35
42
### Run a Full End-to-End Test
36
-
37
43
1. Execute the following `make` command to deploy the entire stack:
44
+
```bash
45
+
make test-start-services
46
+
```
38
47
39
-
```bash
40
-
make test-start-services
41
-
```
42
-
43
-
This command will set up the following services:
44
-
48
+
This command will set up the following services:
45
49
- **Frequency:** A local instance of Frequency will be set up with the default instant sealing mode.
46
50
- **Redis:** A local instance of Redis will be initiated and configured for use by content publishing and content watcher services.
47
51
- **Kubo IPFS:** A local instance of IPFS will be initiated and configured forusein content publishing and retrieval.
48
52
- **Content Publishing API:** A local instance of the content publishing API will be utilized to publish content to IPFS and Frequency for content watcher tests.
49
53
- **Content Publishing Worker:** A local instance of the content publishing worker will be employed to publish content to IPFS and Frequency for content watcher tests via dedicated processors.
50
54
51
-
The following setup scenarios will be executed during the stack initialization:
55
+
The following setup scenarios will be executed during the stack initialization:
52
56
53
-
-**Chain Setup Scenario:** A provider with MSA=1 will be created, with some user accounts, along with delegation to the provider. Capacity will be staked to MSA=1 to enable the provider to publish content on behalf of users.
54
-
-**DSNP Schemas:** DSNP schemas will be registered on Frequency.
55
-
-**Publish Some Example Content:** Example content will be published to IPFS and Frequency. Check the progress of content publishing at [Content Publishing BullBoard](http://0.0.0.0:3001/queues).
57
+
- **Chain Setup Scenario:** A provider with MSA=1 will be created, with some user accounts, along with delegation to the provider. Capacity will be staked to MSA=1 to enable the provider to publish content on behalf of users.
58
+
- **DSNP Schemas:** DSNP schemas will be registered on Frequency.
59
+
- **Publish Some Example Content:** Example content will be published to IPFS and Frequency. Check the progress of content publishing at [Content Publishing BullBoard](http://0.0.0.0:3001/queues).
56
60
57
61
2. Run the following `make`command to execute the content watcher tests:
58
-
59
62
```bash
60
-
make test-e2e
61
-
```
63
+
make test-e2e
64
+
```
62
65
63
66
3. Alternatively, create a `.env` file, run `nest start api` to start the content watcher as a standalone service, register a webhook with the content watcher using [swagger](http://0.0.0.0:3000/api/docs/swagger#), and try the following scenarios:
64
67
65
-
- **Reset Scanner:** This action will reset the scanner to start from the beginning of the chain or whichever block is chosen to start with. Upon successful parsing, a respective announcement will be made to the webhook.
66
-
- **Put a Search Request:** This action will put a search request on the queue. The request requires a start block and end block. Upon successful parsing, a respective announcement will be made to the webhook.
68
+
- **Reset Scanner:** This action will reset the scanner to start from the beginning of the chain or whichever block is chosen to start with. Upon successful parsing, a respective announcement will be made to the webhook.
69
+
- **Put a Search Request:** This action will put a search request on the queue. The request requires a start block and end block. Upon successful parsing, a respective announcement will be made to the webhook.
70
+
71
+
## Swagger UI
72
+
Check out the Swagger UI hosted on the app instance at [\<base url>/api/docs/swagger](http://localhost:3000/api/docs/swagger) to view the API documentation and submit requests to the service.
73
+
74
+
## Queue Management
75
+
You may also view and manage the application's queue at [\<base url>/queues](http://localhost:3000/queues).
0 commit comments