nostrdvm/README.md

73 lines
2.3 KiB
Markdown
Raw Permalink Normal View History

2024-03-15 16:36:55 +01:00
# NostrDVM: Nostr NIP90 Data Vending Machine Framework
2023-11-17 19:33:52 +01:00
This framework provides a way to easily build and/or run `Nostr NIP90 DVMs in Python`.
This project is currently under development and additional tasks and features are added along the way.
2023-11-24 21:35:39 +01:00
This means the project is in alpha status, interfaces might still change/break at this stage.
2024-10-04 00:12:48 +02:00
## Getting started
Create a new venv by running `"python -m venv venv"`
- Place .env file (based on .env_example) in main folder.
2023-12-17 22:32:38 +01:00
- Create a `LNbits` account on an accessible instance of your choice, enter one account's id and admin key (this account will create other accounts for the dvms)
- the framework will then automatically create keys, nip89 tags and zapable NIP57 `lightning addresses` for your dvms in this file.
2024-05-16 09:36:52 +02:00
- Activate the venv by typing `".venv\Scripts\activate"` on Windows or `"source venv/bin/activate"` otherwise
2023-12-17 22:32:38 +01:00
- pip install nostr-dvm
2023-12-28 23:32:20 +01:00
- Run python3 main.py. (or check single examples in the example folder)
2023-12-06 17:26:11 +01:00
In each task component DVM examples are already prepared. Feel free to play along with the existing ones.
You can also add new tasks by using the interface, just like the existing tasks in the `tasks` folder.
2023-11-20 23:18:05 +01:00
A `bot` is running by default that lists and communicates with the `DVMs` added to it,
2023-12-06 17:26:11 +01:00
so your DVMs can be controled via any regular social client as well.
2023-12-17 22:32:38 +01:00
If LNBits is not used, make sure your DVM's nostr accounts have a valid lightning address.
A tutorial on how to add additional tasks, as well as the larger server backend will be added at a later stage.
2024-10-04 00:12:48 +02:00
## Getting started with Docker
Create `.env` from the example provided by us `.env_example`
```bash
cp .env_example .env
```
and set the necessary environmental variables:
```bash
LNBITS_ADMIN_KEY = ""
LNBITS_WALLET_ID = ""
LNBITS_HOST = "https://demo.lnbits.com/"
NOSTDRESS_DOMAIN = "nostrdvm.com"
```
To get the Docker container up and running:
```sh
# in foreground
docker compose up --build
# in background
docker compose up --build -d
```
To update your container, do:
```sh
git pull
docker compose build --no-cache
# in foreground
docker compose up
# in background
docker compose up -d
```
This will build the Docker image and start the `nostrdvm` service as defined in the `docker-compose.yml` file.
## License
This project is licensed under the MIT License.