From 920834bf66a21e186b9d87ba195bb0825d37e6e8 Mon Sep 17 00:00:00 2001 From: Samuel Dare Date: Thu, 30 May 2024 23:08:19 +0400 Subject: [PATCH 1/3] feat: docker ci , update compose --- .github/workflows/docker.yml | 44 ++++++++++++++++++++++++++++++++++++ docker-compose.yml | 14 ++++++------ 2 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000..01996a6a4 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,44 @@ +name: Publish Docker Image + +on: + push: + branches: + - main + tags: + - '*' + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/${{ github.repository }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index d2be947c6..ecae338eb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ volumes: services: common: &common - image: opentensor/subtensor:latest + image: ghcr.io/opentensor/subtensor:latest build: context: . dockerfile: Dockerfile @@ -40,8 +40,8 @@ services: --base-path /tmp/blockchain \ --chain raw_spec.json \ --rpc-external --rpc-cors all \ - --ws-external --no-mdns \ - --ws-max-connections 10000 --in-peers 500 --out-peers 500 \ + --no-mdns \ + --in-peers 500 --out-peers 500 \ --bootnodes /dns/bootnode.finney.chain.opentensor.ai/tcp/30333/ws/p2p/12D3KooWRwbMb85RWnT8DSXSYMWQtuDwh4LJzndoRrTDotTR5gDC \ --sync warp @@ -58,8 +58,8 @@ services: --base-path /tmp/blockchain \ --chain raw_spec.json \ --rpc-external --rpc-cors all \ - --ws-external --no-mdns \ - --ws-max-connections 10000 --in-peers 500 --out-peers 500 \ + --no-mdns \ + --in-peers 500 --out-peers 500 \ --bootnodes /dns/bootnode.finney.chain.opentensor.ai/tcp/30333/ws/p2p/12D3KooWRwbMb85RWnT8DSXSYMWQtuDwh4LJzndoRrTDotTR5gDC \ --pruning=archive @@ -94,7 +94,7 @@ services: --base-path /tmp/blockchain \ --chain raw_testspec.json \ --rpc-external --rpc-cors all \ - --ws-external --no-mdns \ - --ws-max-connections 10000 --in-peers 500 --out-peers 500 \ + --no-mdns \ + --in-peers 500 --out-peers 500 \ --bootnodes /dns/bootnode.test.finney.opentensor.ai/tcp/30333/p2p/12D3KooWPM4mLcKJGtyVtkggqdG84zWrd7Rij6PGQDoijh1X86Vr \ --pruning=archive From 168a5e17ba9abd628fa1c8e907f242e87e6d2fb0 Mon Sep 17 00:00:00 2001 From: Samuel Dare Date: Thu, 30 May 2024 23:09:18 +0400 Subject: [PATCH 2/3] chore: update compose --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ecae338eb..1395db591 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -76,8 +76,8 @@ services: --base-path /tmp/blockchain \ --chain raw_testspec.json \ --rpc-external --rpc-cors all \ - --ws-external --no-mdns \ - --ws-max-connections 10000 --in-peers 500 --out-peers 500 \ + --no-mdns \ + --in-peers 500 --out-peers 500 \ --bootnodes /dns/bootnode.test.finney.opentensor.ai/tcp/30333/p2p/12D3KooWPM4mLcKJGtyVtkggqdG84zWrd7Rij6PGQDoijh1X86Vr \ --sync warp From f84b2776336b1658c5b0955c21001613e7114402 Mon Sep 17 00:00:00 2001 From: distributedstatemachine <112424909+distributedstatemachine@users.noreply.github.com> Date: Thu, 30 May 2024 23:22:25 +0400 Subject: [PATCH 3/3] Update .github/workflows/docker.yml Co-authored-by: Sam Johnson --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 01996a6a4..ecc047398 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,7 +10,7 @@ on: jobs: publish: - runs-on: ubuntu-latest + runs-on: SubtensorCI steps: - name: Checkout code