mirror of
https://github.com/aljazceru/payments-rest-api.git
synced 2025-12-20 06:54:23 +01:00
1.8 KiB
1.8 KiB
Deployment to fly.io
This document explains deploying breez payments api to fly.io
Prerequisites
- Python 3.10+
- Poetry (package manager)
- Breez Nodeless SDK API key
- 12 words BIP 39 seed (you can use Misty Breez to generate it)
- api key that you will use for accessing the API (see API Key Security). You can use generators like this or this.
Installation
Deployment to Fly.io
-
Install the Fly CLI:
# macOS brew install flyctl # Linux curl -L https://fly.io/install.sh | sh # Windows PowerShell iwr https://fly.io/install.ps1 -useb | iex -
Log in to Fly:
fly auth login -
Clone this repo
git clone https://github.com/breez/payments-rest-api.git cd payments-rest-api -
Launch the app:
fly launchAnswer as follows:
? Would you like to copy its configuration to the new app? y ? Do you want to tweak these settings before proceeding? N -
Set secrets(see here):
fly secrets set BREEZ_API_KEY="your_breez_api_key" # make sure to use quotes specially if using Windows fly secrets set BREEZ_SEED_PHRASE="word1 word2 word3 ... word12" fly secrets set API_SECRET="your_api_secret" # if you're gonna be using this with woocommerce then you also need to set the webhook url fly secret set WEBHOOK_URL="link to your wordpress" -
Deploy the app:
fly deploy -
Test the app:
python example_client.py