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

fix: Docker compose setup in README #10

Merged
merged 1 commit into from
Jan 28, 2025
Merged
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: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ To setup the components, you need a valid Blockfrost key, you can either [get it

### Run it with Docker compose

Requires at least Docker Compose version 2.22.0, uses Compose Watch: <https://docs.docker.com/compose/how-tos/file-watch/>

The easier way to get started is to use Docker compose to build your entire cluster.

```
# For solitary, run:
BLOCKFROST_KEY=previewXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX docker compose up --build -d
BLOCKFROST_KEY=previewXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX docker compose -f infra/docker-compose.yaml up --build -d

# Watch the build
docker compose watch
Expand All @@ -31,22 +34,28 @@ docker compose watch
### Demo application to showcase the Cardano Firefly connector

- Export your blockfrost key:

```
export BLOCKFROST_KEY=previewXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

- Create Cardano wallet and put the signing key in `infra/wallet/${address}.skey`

```
cardano-cli address key-gen --verification-key-file firefly.vkey --signing-key-file firefly.skey
cardano-cli address build --payment-verification-key-file firefly.vkey --out-file firefly.addr
mkdir -p infra/wallet
cp firefly.skey infra/wallet/$(cat firefly.addr).skey
rm firefly.vkey firefly.skey firefly.addr
```

- To start up the connector please execute:

```bash
BLOCKFROST_KEY=previewXX docker compose -f ./infra/docker-compose.node.yaml -f ./infra/docker-compose.yaml -p preview up --build -d
docker compose -f ./infra/docker-compose.yaml -p preview watch # Auto rebuild on changes
```

> **_NOTE:_** If you want to avoid running it in the background, omit the `-d` flag.

> **_NOTE:_** If you want to skip building, omit the `--build` flag.
Expand Down
Loading