Clone sBTC and run the dev env, this runs a devnet deployment of stacks and a regtest deployment of bitcoin and installs and runs sBTC against them Must have docker installed
git clone https://github.com/stacks-sbtc/sbtc.git
cd sbtc
make devenv-up
Install dependencies and run the development server:
cp .env.sample .env
yarn && yarn devThe development server will be running at http://localhost:3000
Some feature flags must be set at build time, so if you are building the image with docker and you want some specific feature flags you must pass them also when building to ensure they are in effect
Currently supported flags are:
reskin: is for the bridge reskin that can be accessed at /reskin
These flags can be enabled in the .env file comma separated values style like so:
FEATURE_FLAGS=reskin,feature1,feature2To learn more about sBTC please visit the sBTC Bridge Documentation.
To push the Git Commit version during the building phase you have to build the image passing the $GIT_COMMIT value:
export GIT_COMMIT=$(git rev-parse HEAD)
docker build --build-arg GIT_COMMIT=$GIT_COMMITor passing through the docker compose file:
sbtc-bridge:
restart: on-failure
build:
context: ./sbtc-bridge
dockerfile: Dockerfile
args:
GIT_COMMIT: ${GIT_COMMIT}This project includes GitHub Actions workflows for automated building and publishing to AWS ECR.
Automatically builds and pushes Docker images to Amazon ECR on push to environment/*.
Create environments for each environment branch (e.g. environment/private-mainnet, environment/mainnet)
Required GitHub Secrets:
AWS_ROLE_ARN: ARN of the AWS role for ECR access
Required GitHub Variables:
AWS_REGION: AWS region (e.g.,eu-west-1)AWS_ECR: ECR repository name (e.g.,sbtc-bridge)
-
Configure AWS IAM Role:
- Create an IAM role with ECR
- Configure OIDC trust relationship for GitHub Actions
- Add the role ARN as
AWS_ROLE_ARNsecret
-
Set up GitHub Variables:
- Go to repository Settings → Secrets and variables → Actions
- Add the required variables listed above
The build workflow creates the following image tags:
sbtc-bridge-{branch}: Branch-specific tagsbtc-bridge-{commit-sha}: Commit-specific tagsbtc-bridge-latest: Latest tag (only on main branch)