Skip to content

Commit

Permalink
Merge pull request #8 from blockfrost/add-firefly-core
Browse files Browse the repository at this point in the history
chore(docker): add firefly-core
  • Loading branch information
gytis-ivaskevicius authored Jan 22, 2025
2 parents bb42e28 + bdce424 commit 52cee8b
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 3 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

packages = with pkgs; [
alejandra
lld
];

commands = [
Expand Down
44 changes: 42 additions & 2 deletions infra/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@
services:
firefly-core:
image: ghcr.io/gytis-ivaskevicius/firefly-core:latest
volumes:
- ./firefly-core.yaml:/etc/firefly/firefly.core.yml:ro
ports:
- 5000:5000
- 5101:5101
depends_on:
firefly-cardanoconnect:
condition: service_started
firefly-cardanosigner:
condition: service_started
postgres:
condition: service_healthy
healthcheck:
test:
- CMD
- curl
- --fail
- http://localhost:5000/api/v1/status
interval: 15s
retries: 30

postgres:
image: postgres
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_PASSWORD: f1refly
volumes:
- firefly-db:/var/lib/postgresql/data
ports:
- 5104:5432
healthcheck:
test:
- CMD-SHELL
- pg_isready -U postgres
interval: 5s
timeout: 3s
retries: 12

firefly-cardanoconnect:
image: ghcr.io/blockfrost/firefly-cardanoconnect:main
build:
Expand All @@ -14,9 +54,8 @@ services:
ports:
- 5018:5018
volumes:
- ./ipc:/ipc
- connect-contracts:/contracts
- connect-db:/db
- ./db:/db
- ./connect.yaml:/app/config.yaml

firefly-cardanosigner:
Expand All @@ -38,3 +77,4 @@ services:
volumes:
connect-contracts:
connect-db:
firefly-db:
48 changes: 48 additions & 0 deletions infra/firefly-core.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
admin:
address: 0.0.0.0
enabled: true
port: 5101
publicURL: http://127.0.0.1:5101
debug:
port: 6060
event:
dbevents:
bufferSize: 10000
http:
address: 0.0.0.0
port: 5000
publicURL: http://127.0.0.1:5000
log:
level: debug
metrics: {}
namespaces:
default: default
predefined:
- defaultKey: addr_test1vqhkukz0285zvk0xrwk9jlq0075tx6furuzcjvzpnhtgelsuhhqc4
description: Default predefined namespace
name: default
plugins:
- database0
- blockchain0
plugins:
blockchain:
- cardano:
cardanoconnect:
topic: "0"
url: http://firefly-cardanoconnect:5018
name: blockchain0
type: cardano
database:
- name: database0
postgres:
migrations:
auto: true
url: postgres://postgres:f1refly@postgres:5432?sslmode=disable
type: postgres
spi:
address: 0.0.0.0
enabled: true
port: 5101
publicURL: http://127.0.0.1:5101
ui:
path: ./frontend
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
deploy-contract:
cargo run -p firefly-cardano-deploy-contract -- --contract-path ./wasm/simple-tx
cargo run -p firefly-cardano-deploy-contract -- --contract-path ./wasm/simple-tx --firefly-url http://localhost:5000
demo: deploy-contract
cargo run -p firefly-cardano-demo -- --addr-from $ADDR_FROM --addr-to $ADDR_TO --amount 1000000

0 comments on commit 52cee8b

Please sign in to comment.