Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ff7668c
feat: make a docker image for coinswap
hulxv Sep 19, 2025
92e2073
fixes
mojoX911 Nov 24, 2025
7ce6cb8
add bitcoin.conf
mojoX911 Nov 25, 2025
9b3a95e
[doc] Update bitcoind.md for Mutinynet
mojoX911 Nov 25, 2025
3d368e6
docker: make only one image for coinswap and drop `test`, `tor,` and …
hulxv Nov 25, 2025
0a09c03
docker: add scripts for publishing
hulxv Nov 25, 2025
5d03cf1
docker: fix issues in docker script
hulxv Nov 25, 2025
80c1c18
docker: unofficial image for `bitcoin-mutinynet`
hulxv Nov 25, 2025
decf0dc
fix(dokcer): cannot find `docs/bitcoin.conf`
hulxv Nov 25, 2025
2137af0
docker: use bitcoin.conf in the stack for bitcoind service
hulxv Nov 25, 2025
6aabcd9
docker: correct the path of bitcoin.conf
hulxv Nov 25, 2025
c308932
trying to fix the ci
hulxv Nov 25, 2025
41cd185
docs; update docker.md
hulxv Nov 25, 2025
8861fe7
docs: update Docker setup to include custom Bitcoin Mutinynet image a…
hulxv Nov 25, 2025
2b7c08a
ci: correct the repo name
hulxv Nov 25, 2025
d3ab733
fix: `--auth` is incorrect
hulxv Nov 26, 2025
5176db7
docker: remove unused networks
hulxv Nov 26, 2025
3dbbacc
docker: make the help message more clear
hulxv Nov 26, 2025
3962f1f
return `bitcoin.conf` to `docs` dir
hulxv Nov 26, 2025
a8db1e8
docker: add taproot option
hulxv Nov 26, 2025
692ffdf
make enabling taproot default is true
hulxv Nov 26, 2025
eee2e7e
fix(docker): wrong image name
hulxv Nov 26, 2025
4e4348f
refactor: `docker-setup.sh` -> `docker-setup`
hulxv Nov 26, 2025
74a318b
refactor: rename `docker-setup.sh` to `docker-setup` in documentation
hulxv Nov 26, 2025
39ff94c
docker: unexpose the makerd network port
hulxv Nov 26, 2025
8a5628a
remove net port from config ask
mojoX911 Nov 26, 2025
59ef24c
docker: clean coinswap image
hulxv Nov 26, 2025
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
37 changes: 37 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Ignore target directory (except for copying specific files)
target/
!target/release/

# Ignore git and development files
.git
.gitignore
# Keep README.md as it's needed by src/lib.rs
# *.md
docs/
!docs/bitcoin.conf
assets/

# Keep test files for running tests in container
# tests/

# Ignore IDE files
.vscode/
.idea/

# Ignore temporary files
*.tmp
*.temp
*~

# Ignore OS files
.DS_Store
Thumbs.db

# Ignore Docker files (keep the one we're using)
Dockerfile.*
!Dockerfile

# Ignore other build artifacts
*.log
.env
.env.local
52 changes: 52 additions & 0 deletions .github/workflows/docker-publish-bitcoin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish Bitcoin Mutinynet

on:
push:
paths:
- 'docker/bitcoin-mutinynet.version'
- 'docker/Dockerfile.bitcoin-mutinynet'
workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Read version info
id: version
run: |
# Read the properties file
while IFS='=' read -r key value; do
echo "$key=$value" >> $GITHUB_OUTPUT
done < docker/bitcoin-mutinynet.version

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log into Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.bitcoin-mutinynet
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/bitcoin-mutinynet:${{ steps.version.outputs.TAG }}
${{ secrets.DOCKERHUB_USERNAME }}/bitcoin-mutinynet:latest
build-args: |
TAG=${{ steps.version.outputs.TAG }}
FILENAME_AMD64=${{ steps.version.outputs.FILENAME_AMD64 }}
SHA256_AMD64=${{ steps.version.outputs.SHA256_AMD64 }}
FILENAME_ARM64=${{ steps.version.outputs.FILENAME_ARM64 }}
SHA256_ARM64=${{ steps.version.outputs.SHA256_ARM64 }}
56 changes: 56 additions & 0 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Docker Publish

on:
push:
branches: [ "master" ]
release:
types: [ published ]

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

# set up QEMU for multi-platform builds (linux/amd64, linux/arm64)
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log into Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/coinswap
tags: |
# Tag for master branch
type=ref,event=branch
# Tag for releases (e.g. v1.0.0 -> 1.0.0)
type=semver,pattern={{version}}
# Tag 'latest' only on release
type=raw,value=latest,enable=${{ github.event_name == 'release' }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
37 changes: 37 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Docker CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build Docker images
run: ./docker-setup build

- name: Test makerd
run: docker run --rm coinswap/coinswap:latest makerd --help

- name: Test taker
run: docker run --rm coinswap/coinswap:latest taker --help

- name: Start Coinswap stack
run: ./docker-setup start --default

- name: Wait for services to be healthy
run: |
echo "Waiting for services to start..."
sleep 30

- name: Check service status
run: ./docker-setup status

- name: Stop Coinswap stack
run: ./docker-setup stop
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ Cargo.lock
.idea
.ra-target
bin
/coverage/reports
/coverage/reports

docker-compose.generated.yml
.docker-config
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ sudo apt install build-essential automake libtool

## Build and Install

### Option 1: Build from Source

```console
git clone https://github.com/citadel-tech/coinswap.git
cd coinswap
Expand All @@ -70,8 +72,25 @@ sudo install ./target/release/makerd /usr/local/bin/
sudo install ./target/release/maker-cli /usr/local/bin/
```

### Option 2: Using Docker

We provide a helper script to easily configure, build, and run the Coinswap stack (including Bitcoin Core and Tor).

```console
git clone https://github.com/citadel-tech/coinswap.git
cd coinswap

# Configure, build, and start
./docker-setup configure
./docker-setup start
```

For advanced usage, manual commands, and architecture details, refer to the [Docker Documentation](./docs/docker.md).

## Verify Setup

### Native Installation

```console
makerd --help
maker-cli --help
Expand All @@ -81,6 +100,17 @@ taker --help
taker fetch-offers
```

### Docker Installation

```console
# Check binaries
./docker-setup taker --help
./docker-setup maker-cli --help

# Test connection to market
./docker-setup taker fetch-offers
```

# Applications

**`makerd`**: Server daemon for swap providers. Requires continuous uptime and Bitcoin Core RPC connection. [Demo](./docs/makerd.md)
Expand Down
Loading