From 23d8da9f4c087a6b8701eedc6e3bbd748f91a4a2 Mon Sep 17 00:00:00 2001 From: Kevin K Biju <52661649+heavycrystal@users.noreply.github.com> Date: Thu, 5 Oct 2023 12:50:06 +0000 Subject: [PATCH] misc changes to docker and image publishing (#485) --- .github/workflows/dev-docker.yml | 18 ++++++++- .github/workflows/stable-docker.yml | 16 ++++++++ docker-compose.yml | 40 ++++++++++--------- ...us.Dockerfile => peerdb-server.Dockerfile} | 0 .../{ui.Dockerfile => peerdb-ui.Dockerfile} | 0 5 files changed, 54 insertions(+), 20 deletions(-) rename stacks/{nexus.Dockerfile => peerdb-server.Dockerfile} (100%) rename stacks/{ui.Dockerfile => peerdb-ui.Dockerfile} (100%) diff --git a/.github/workflows/dev-docker.yml b/.github/workflows/dev-docker.yml index 0bc3f33538..65e9c7999c 100644 --- a/.github/workflows/dev-docker.yml +++ b/.github/workflows/dev-docker.yml @@ -41,10 +41,11 @@ jobs: token: ${{ secrets.DEPOT_TOKEN }} platforms: linux/amd64,linux/arm64 context: . - file: stacks/nexus.Dockerfile + file: stacks/peerdb-server.Dockerfile push: ${{ github.ref == 'refs/heads/main' }} tags: | ghcr.io/peerdb-io/peerdb-server:dev-${{ steps.vars.outputs.sha_short }} + ghcr.io/peerdb-io/peerdb-server:latest-dev - name: Build (optionally publish) Flow API Dev Image uses: depot/build-push-action@v1 @@ -56,6 +57,7 @@ jobs: push: ${{ github.ref == 'refs/heads/main' }} tags: | ghcr.io/peerdb-io/flow-api:dev-${{ steps.vars.outputs.sha_short }} + ghcr.io/peerdb-io/flow-api:latest-dev - name: Build (optionally publish) Flow Worker Dev Image uses: depot/build-push-action@v1 @@ -67,6 +69,7 @@ jobs: push: ${{ github.ref == 'refs/heads/main' }} tags: | ghcr.io/peerdb-io/flow-worker:dev-${{ steps.vars.outputs.sha_short }} + ghcr.io/peerdb-io/flow-worker:latest-dev - name: Build (optionally publish) Flow Snapshot Worker Dev Image uses: depot/build-push-action@v1 @@ -78,3 +81,16 @@ jobs: push: ${{ github.ref == 'refs/heads/main' }} tags: | ghcr.io/peerdb-io/flow-snapshot-worker:dev-${{ steps.vars.outputs.sha_short }} + ghcr.io/peerdb-io/flow-snapshot-worker:latest-dev + + - name: Build (optionally publish) PeerDB UI Dev Image + uses: depot/build-push-action@v1 + with: + token: ${{ secrets.DEPOT_TOKEN }} + platforms: linux/amd64,linux/arm64 + context: . + file: stacks/peerdb-ui.Dockerfile + push: ${{ github.ref == 'refs/heads/main' }} + tags: | + ghcr.io/peerdb-io/peerdb-ui:dev-${{ steps.vars.outputs.sha_short }} + ghcr.io/peerdb-io/peerdb-ui:latest-dev diff --git a/.github/workflows/stable-docker.yml b/.github/workflows/stable-docker.yml index a4b68f37c3..8ca0b96522 100644 --- a/.github/workflows/stable-docker.yml +++ b/.github/workflows/stable-docker.yml @@ -40,6 +40,7 @@ jobs: push: true tags: | ghcr.io/peerdb-io/peerdb-server:${{ github.ref_name }} + ghcr.io/peerdb-io/peerdb-server:latest-stable - name: Publish Flow API Image uses: depot/build-push-action@v1 @@ -51,6 +52,7 @@ jobs: push: true tags: | ghcr.io/peerdb-io/flow-api:${{ github.ref_name }} + ghcr.io/peerdb-io/flow-api:latest-stable - name: Publish Flow Worker Stable Image uses: depot/build-push-action@v1 @@ -62,6 +64,7 @@ jobs: push: true tags: | ghcr.io/peerdb-io/flow-worker:${{ github.ref_name }} + ghcr.io/peerdb-io/flow-worker:latest-stable - name: Publish Flow Snapshot Worker Stable Image uses: depot/build-push-action@v1 @@ -73,3 +76,16 @@ jobs: push: true tags: | ghcr.io/peerdb-io/flow-snapshot-worker:${{ github.ref_name }} + ghcr.io/peerdb-io/flow-snapshot-worker:latest-stable + + - name: Build (optionally publish) PeerDB UI Stable Image + uses: depot/build-push-action@v1 + with: + token: ${{ secrets.DEPOT_TOKEN }} + platforms: linux/amd64,linux/arm64 + context: . + file: stacks/peerdb-ui.Dockerfile + push: ${{ github.ref == 'refs/heads/main' }} + tags: | + ghcr.io/peerdb-io/peerdb-ui:${{ github.ref_name }} + ghcr.io/peerdb-io/peerdb-ui:latest-stable diff --git a/docker-compose.yml b/docker-compose.yml index 75e1b8234d..a950a51c2b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,7 +23,7 @@ x-flow-worker-env: &flow-worker-env services: catalog: container_name: catalog - image: debezium/postgres:15-alpine + image: debezium/postgres:16-alpine ports: - 9901:5432 environment: @@ -95,7 +95,7 @@ services: ports: - 8085:8080 - flow_api: + flow-api: container_name: flow_api build: context: . @@ -109,8 +109,8 @@ services: temporal-admin-tools: condition: service_healthy - flow_snapshot_worker: - container_name: flow_snapshot_worker + flow-snapshot-worker: + container_name: flow-snapshot-worker build: context: . dockerfile: stacks/flow-snapshot-worker.Dockerfile @@ -120,8 +120,8 @@ services: temporal-admin-tools: condition: service_healthy - flow_worker1: - container_name: flow_worker1 + flow-worker1: + container_name: flow-worker1 build: context: . dockerfile: stacks/flow-worker.Dockerfile @@ -135,8 +135,8 @@ services: temporal-admin-tools: condition: service_healthy - flow_worker2: - container_name: flow_worker2 + flow-worker2: + container_name: flow-worker2 build: context: . dockerfile: stacks/flow-worker.Dockerfile @@ -153,8 +153,8 @@ services: temporal-admin-tools: condition: service_healthy - flow_worker3: - container_name: flow_worker3 + flow-worker3: + container_name: flow-worker3 build: context: . dockerfile: stacks/flow-worker.Dockerfile @@ -172,10 +172,10 @@ services: condition: service_healthy peerdb: - container_name: peerdb_server + container_name: peerdb-server build: context: . - dockerfile: stacks/nexus.Dockerfile + dockerfile: stacks/peerdb-server.Dockerfile environment: <<: *catalog-config PEERDB_LOG_DIR: /var/log/peerdb @@ -189,8 +189,8 @@ services: catalog: condition: service_healthy - peerdb_prometheus: - container_name: peerdb_prometheus + peerdb-prometheus: + container_name: peerdb-prometheus build: context: . dockerfile: stacks/prometheus.Dockerfile @@ -202,8 +202,9 @@ services: - multi-metrics - metrics - peerdb_grafana: - container_name: peerdb_grafana + + peerdb-grafana: + container_name: peerdb-grafana build: context: . dockerfile: stacks/grafana.Dockerfile @@ -216,11 +217,12 @@ services: - multi-metrics - metrics - peerdb_ui: - container_name: peerdb_ui + + peerdb-ui: + container_name: peerdb-ui build: context: . - dockerfile: stacks/ui.Dockerfile + dockerfile: stacks/peerdb-ui.Dockerfile ports: - 3001:3000 environment: diff --git a/stacks/nexus.Dockerfile b/stacks/peerdb-server.Dockerfile similarity index 100% rename from stacks/nexus.Dockerfile rename to stacks/peerdb-server.Dockerfile diff --git a/stacks/ui.Dockerfile b/stacks/peerdb-ui.Dockerfile similarity index 100% rename from stacks/ui.Dockerfile rename to stacks/peerdb-ui.Dockerfile