Skip to content

ci: lds-api docker pipeline + lnbitsapi switch to lightningdotspacecom (ARM64)#177

Merged
TaprootFreak merged 2 commits intodevelopfrom
feat/dfx-image-pipeline
May 7, 2026
Merged

ci: lds-api docker pipeline + lnbitsapi switch to lightningdotspacecom (ARM64)#177
TaprootFreak merged 2 commits intodevelopfrom
feat/dfx-image-pipeline

Conversation

@TaprootFreak
Copy link
Copy Markdown
Contributor

@TaprootFreak TaprootFreak commented May 7, 2026

Summary

Prep for Stage 2 of the lightning.space migration off Azure to the DFX (ARM64) infrastructure. Aligned with the existing DFX CI convention (cf. juicedollarcom/api, deurocom/api).

Two image pipelines change in this repo:

  • Newlightningdotspacecom/lds-api:{beta,latest}
    • Root Dockerfile (mirrors the lnbitsapi multi-stage layout)
    • lds-api-{dev,prd}.yaml workflows
  • Updateddfxswiss/lnbitsapi:{latest,main}lightningdotspacecom/lnbitsapi:{beta,latest}
    • Workflows aligned to the DFX house style

Both follow the DFX convention:

  • runs-on: ubuntu-24.04-arm (native ARM, no QEMU)
  • platforms: linux/arm64 (single arch — DFX servers are Apple Silicon, Azure is being decommissioned)
  • Deploy step after build: install cloudflared, SSH via Cloudflare Tunnel, invoke deploy.sh with the service name (lds-api / lds-lnbitsapi). The matching case block lives in DFXServer/server (commit ba6fdf6).

PR test workflows (api-pr.yaml, lnbitsapi-pr.yaml) bumped from Node 16.x (EOL) to Node 18.x to match the production Dockerfile.

The pre-existing api-{dev,prd}.yaml Azure App Service workflows are kept intact for the migration window — they will be removed once the dfxprd LDS stack is live.

Required secrets before merge

Secret Purpose
DOCKER_USERNAME, DOCKER_PASSWORD Docker Hub token with write access to the lightningdotspacecom org (current values target the previous org)
DEPLOY_DEV_SSH_KEY, DEPLOY_DEV_SSH_KNOWN_HOSTS, DEPLOY_DEV_HOST, DEPLOY_DEV_USER DEV deploy via Cloudflare Tunnel to dfxdev
DEPLOY_PRD_SSH_KEY, DEPLOY_PRD_SSH_KNOWN_HOSTS, DEPLOY_PRD_HOST, DEPLOY_PRD_USER PRD deploy via Cloudflare Tunnel to dfxprd

The deploy step will fail until dfxdev:~/lds/docker-compose.yaml is in place (skeleton currently committed without compose) — that's fine, the image gets pushed to Docker Hub regardless.

Test plan

  • workflow_dispatch on lds-api-dev builds successfully and pushes lightningdotspacecom/lds-api:beta
  • workflow_dispatch on lnbitsapi-dev builds successfully and pushes lightningdotspacecom/lnbitsapi:beta
  • Pull lightningdotspacecom/lds-api:beta on an arm64 host, confirm the container starts (node dist/main.js listens on 3000)

…cecom (ARM64)

Adds:
- Dockerfile + .dockerignore at repo root for the lds-api NestJS service
- lds-api-{dev,prd}.yaml workflows that build linux/arm64 and push
  lightningdotspacecom/lds-api:{beta,latest} on push to {develop,main}

Updates:
- lnbitsapi-{dev,prd}.yaml: image renamed from dfxswiss/lnbitsapi:{latest,main}
  to lightningdotspacecom/lnbitsapi:{beta,latest}; build pinned to linux/arm64
  via QEMU + buildx; Node bumped from 16.x (EOL) to 18.x to match Dockerfile

The pre-existing api-{dev,prd}.yaml Azure App Service workflows are kept
intact for the migration window — they will be removed once the dfxprd LDS
stack is live.

Docker Hub credentials secret (DOCKER_USERNAME / DOCKER_PASSWORD) must be
set to a token with write access to the lightningdotspacecom org before
the first build runs.
Aligns the lds-api and lnbitsapi build pipelines with the DFX house
style (cf. juicedollarcom/api, deurocom/api):

- runs-on: ubuntu-24.04-arm (native ARM, no QEMU)
- platforms: linux/arm64 (single arch, matches DFX servers)
- Deploy step after build: install cloudflared, SSH via Cloudflare Tunnel
  to dfxdev/dfxprd, invoke deploy.sh with the canonical service name
  (lds-api / lds-lnbitsapi). Matches the case-block added in
  DFXServer/server commit ba6fdf6.

PR test workflows (api-pr.yaml, lnbitsapi-pr.yaml) bumped from Node 16.x
(EOL) to Node 18.x to match the production Dockerfile.

Required secrets per repo (set on top of DOCKER_USERNAME/PASSWORD):
- DEPLOY_DEV_SSH_KEY, DEPLOY_DEV_SSH_KNOWN_HOSTS, DEPLOY_DEV_HOST, DEPLOY_DEV_USER
- DEPLOY_PRD_SSH_KEY, DEPLOY_PRD_SSH_KNOWN_HOSTS, DEPLOY_PRD_HOST, DEPLOY_PRD_USER

The DEV deploy will only succeed once dfxdev:~/lds/docker-compose.yaml is
in place (skeleton currently committed without compose). Until then the
build step pushes to Docker Hub and the deploy step fails — fine, image
is published either way.
@TaprootFreak TaprootFreak marked this pull request as ready for review May 7, 2026 16:31
@TaprootFreak TaprootFreak marked this pull request as draft May 7, 2026 16:32
@TaprootFreak TaprootFreak marked this pull request as ready for review May 7, 2026 16:45
@TaprootFreak TaprootFreak merged commit 3cdf85f into develop May 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant