mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-01 03:55:22 +01:00
feat(docker): add LDK Node mint service with dedicated Docker setup (#1108)
* feat(docker): add LDK Node mint service with dedicated Docker setup - Add Dockerfile.ldk-node and Dockerfile.ldk-node.arm for LDK Node builds - Add GitHub Actions workflows for publishing LDK Node Docker images - Add docker-compose.ldk-node.yaml for standalone LDK Node deployment - Integrate LDK Node service into main docker-compose.yaml with profile - Update cdk-mintd README with LDK Node Docker configuration * feat: use docker tags
This commit is contained in:
62
.github/workflows/docker-publish-ldk-node-arm.yml
vendored
Normal file
62
.github/workflows/docker-publish-ldk-node-arm.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
name: Publish Docker Image LDK Node ARM64
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Tag to build and publish'
|
||||
required: true
|
||||
default: 'latest'
|
||||
|
||||
env:
|
||||
REGISTRY: docker.io
|
||||
IMAGE_NAME: cashubtc/mintd
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=ldk-node-arm64,enable=${{ github.event_name == 'release' }}
|
||||
type=semver,pattern={{version}}-ldk-node-arm64
|
||||
type=semver,pattern={{major}}.{{minor}}-ldk-node-arm64
|
||||
type=ref,event=branch,suffix=-ldk-node-arm64
|
||||
type=ref,event=pr,suffix=-ldk-node-arm64
|
||||
type=sha,suffix=-ldk-node-arm64
|
||||
${{ github.event.inputs.tag != '' && format('{0}-ldk-node-arm64', github.event.inputs.tag) || '' }}
|
||||
|
||||
# Build and push ARM64 image with architecture suffix
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/arm64
|
||||
file: ./Dockerfile.ldk-node.arm
|
||||
tags: ${{ steps.meta.outputs.tags }}-arm64
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
62
.github/workflows/docker-publish-ldk-node.yml
vendored
Normal file
62
.github/workflows/docker-publish-ldk-node.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
name: Publish Docker Image LDK Node AMD64
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Tag to build and publish'
|
||||
required: true
|
||||
default: 'latest'
|
||||
|
||||
env:
|
||||
REGISTRY: docker.io
|
||||
IMAGE_NAME: cashubtc/mintd
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=ldk-node,enable=${{ github.event_name == 'release' }}
|
||||
type=semver,pattern={{version}}-ldk-node
|
||||
type=semver,pattern={{major}}.{{minor}}-ldk-node
|
||||
type=ref,event=branch,suffix=-ldk-node
|
||||
type=ref,event=pr,suffix=-ldk-node
|
||||
type=sha,suffix=-ldk-node
|
||||
${{ github.event.inputs.tag != '' && format('{0}-ldk-node', github.event.inputs.tag) || '' }}
|
||||
|
||||
# Build and push AMD64 image with architecture suffix
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.ldk-node
|
||||
push: true
|
||||
platforms: linux/amd64
|
||||
tags: ${{ steps.meta.outputs.tags }}-amd64
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
Reference in New Issue
Block a user