diff --git a/docker-compose.yml b/docker-compose.yml index ba8f37c..2dad3bb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,12 +58,28 @@ services: retries: 10 restart: unless-stopped - sdk_relay: - image: git.4nkweb.com/4nk/sdk_relay:debug - container_name: sdk_relay + blindbit-proxy: + image: nginx:alpine + container_name: blindbit-proxy depends_on: blindbit: condition: service_healthy + volumes: + - ./nginx-proxy.conf:/etc/nginx/nginx.conf:ro + networks: + btcnet: + aliases: + - blindbit-proxy + ports: + - "127.0.0.1:8001:8000" + restart: unless-stopped + + sdk_relay: + image: git.4nkweb.com/4nk/sdk_relay:ext + container_name: sdk_relay + depends_on: + blindbit-proxy: + condition: service_started bitcoin: condition: service_healthy volumes: @@ -93,7 +109,7 @@ services: exec /usr/local/bin/sdk_relay --config /home/bitcoin/.conf 2>&1 | tee -a /home/bitcoin/.4nk/logs/sdk_relay.log ' healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8091/health"] + test: ["CMD", "timeout", "5", "telnet", "localhost", "8090"] interval: 30s timeout: 10s retries: 3 @@ -161,7 +177,7 @@ services: restart: unless-stopped sdk_storage: - image: git.4nkweb.com/4nk/sdk_storage:latest + image: git.4nkweb.com/4nk/sdk_storage:ext container_name: sdk_storage ports: - "127.0.0.1:8081:8081" diff --git a/nginx-proxy.conf b/nginx-proxy.conf new file mode 100644 index 0000000..699dee2 --- /dev/null +++ b/nginx-proxy.conf @@ -0,0 +1,31 @@ +events { + worker_connections 1024; +} + +http { + upstream blindbit { + server blindbit-oracle:8000; + } + + server { + listen 8000; + + location / { + proxy_pass http://blindbit/utxos/136294; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + } + + location /utxos/ { + proxy_pass http://blindbit; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + } + + location /filter/ { + proxy_pass http://blindbit; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + } + } +} diff --git a/relay/sdk_relay.conf b/relay/sdk_relay.conf index f7bd282..3061fcd 100644 --- a/relay/sdk_relay.conf +++ b/relay/sdk_relay.conf @@ -2,7 +2,7 @@ core_url="http://bitcoin:38332" ws_url="0.0.0.0:8090" wallet_name="default" network="signet" -blindbit_url="http://blindbit:8000" +blindbit_url="http://blindbit-proxy:8000" zmq_url="tcp://bitcoin:29000" storage="https://dev4.4nkweb.com/storage" data_dir="/home/bitcoin/.4nk" diff --git a/relay/sdk_relay.conf.exemple b/relay/sdk_relay.conf.exemple new file mode 100644 index 0000000..707d54c --- /dev/null +++ b/relay/sdk_relay.conf.exemple @@ -0,0 +1,16 @@ +core_url="http://bitcoin:38332" +ws_url="0.0.0.0:8090" +wallet_name="default" +network="signet" +blindbit_url="http://localhost:8000" +zmq_url="tcp://bitcoin:29000" +storage="https://dev4.4nkweb.com/storage" +data_dir="/home/bitcoin/.4nk" +bitcoin_data_dir="/home/bitcoin/.bitcoin" +bootstrap_url="ws://dev3.4nkweb.com:8090" +bootstrap_faucet=true +RUST_LOG="DEBUG,reqwest=DEBUG,tokio_tungstenite=DEBUG" +NODE_OPTIONS="--max-old-space-size=2048" + +SIGNER_API_KEY="your-api-key-change-this" +VITE_JWT_SECRET_KEY="52b3d77617bb00982dfee15b08effd52cfe5b2e69b2f61cc4848cfe1e98c0bc9"