diff --git a/.gitea/workflows/build-bee-dashboard.yaml b/.gitea/workflows/build-bee-dashboard.yaml new file mode 100644 index 0000000..84f21fe --- /dev/null +++ b/.gitea/workflows/build-bee-dashboard.yaml @@ -0,0 +1,43 @@ +name: CI +on: + push: + branches: [ master ] + paths: + - 'bee-dashboard/**' + - '.gitea/workflows/build-bee-dashboard.yaml' +jobs: + "Build bee-dashboard docker images": + runs-on: hostinger + steps: + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3.4.0 + with: + driver: docker-container + platforms: | + linux/amd64 + linux/arm64 + - + name: Login to Gitea container registry + uses: docker/login-action@v3 + with: + registry: gitea.woggioni.net + username: woggioni + password: ${{ secrets.PUBLISHER_TOKEN }} + - + name: Build and push bee-dashboard images + uses: docker/build-push-action@v6 + with: + platforms: | + linux/amd64 + linux/arm64 + context: "{{defaultContext}}:bee-dashboard" + push: true + pull: true + ssh: default=/home/luser/.ssh/id_ed25519 + build-args: "VERSION=0.32.0" + tags: | + "gitea.woggioni.net/woggioni/bee-dashboard:0.32.0" + cache-from: type=registry,ref=gitea.woggioni.net/woggioni/bee-dashboard:buildx + cache-to: type=registry,mode=max,compression=zstd,image-manifest=true,oci-mediatypes=true,ref=gitea.woggioni.net/woggioni/bee-dashboard:buildx + diff --git a/bee-dashboard/Dockerfile b/bee-dashboard/Dockerfile new file mode 100644 index 0000000..3c62232 --- /dev/null +++ b/bee-dashboard/Dockerfile @@ -0,0 +1,17 @@ +FROM alpine:3.22 AS base +RUN --mount=type=cache,target=/var/cache/apk apk add nodejs npm + +FROM base AS build +ARG VERSION +RUN --mount=type=cache,target=/var/cache/apk apk add chromium +WORKDIR /src +ADD git@github.com:ethersphere/bee-dashboard.git#v${VERSION} . +RUN PUPPETEER_SKIP_DOWNLOAD=1 npm ci +RUN npm run build + +FROM base AS final +RUN npm i -g serve +WORKDIR /app +COPY --from=build /src/build . +EXPOSE 8080 +ENTRYPOINT ["serve", "-l", "8080"]