From e3292ef56b19b15f310fd6d81e14280a22da19a7 Mon Sep 17 00:00:00 2001 From: JohnMark Sill Date: Thu, 30 Mar 2023 16:09:54 -0500 Subject: [PATCH] feat: added release workflow --- .github/workflows/release.yml | 28 ++++++++++++++++ docker-compose.yml | 46 +++++++++++++++++++++++++++ kubernetes/development/deployment.yml | 19 +---------- 3 files changed, 75 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 docker-compose.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e5d0261 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: release + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/github-script@v6 + id: tag + with: + result-encoding: string + script: return context.sha.substring(0,7) + - name: login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2 + - name: create image from repository + run: docker build -t ghcr.io/${{ github.repository }}:${{ github.ref_name }} -t ghcr.io/${{ github.repository }}:latest . + - name: push image to GitHub Container Registry + run: docker push --all-tags ghcr.io/${{ github.repository }} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2cbb28d --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,46 @@ +version: "2" + +services: + frigate-kafka-relay: + image: ghcr.io/brilliant-monkey/frigate-kafka-relay:latest + environment: + - FRIGATE_KAFKA_RELAY_CONFIG_PATH=/app/config.yml + - PORT=8809 + ports: + - 8809:8809 + volumes: + - secret.yml:/app/config.yml:ro + kafka-ui: + container_name: kafka-ui + image: provectuslabs/kafka-ui:latest + ports: + - 8081:8080 + environment: + DYNAMIC_CONFIG_ENABLED: true + zookeeper: + image: docker.io/bitnami/zookeeper:3.8 + ports: + - "2181:2181" + volumes: + - "zookeeper_data:/bitnami" + environment: + - ALLOW_ANONYMOUS_LOGIN=yes + kafka: + image: docker.io/bitnami/kafka:3.4 + ports: + - "9092:9092" + - "9093:9093" + volumes: + - "kafka_data:/bitnami" + environment: + - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 + - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,PLAINTEXT://localhost:9093 + - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,PLAINTEXT://localhost:9093 + - ALLOW_PLAINTEXT_LISTENER=yes + depends_on: + - zookeeper +volumes: + zookeeper_data: + driver: local + kafka_data: + driver: local diff --git a/kubernetes/development/deployment.yml b/kubernetes/development/deployment.yml index 3796cae..3585386 100644 --- a/kubernetes/development/deployment.yml +++ b/kubernetes/development/deployment.yml @@ -17,11 +17,9 @@ spec: app: frigate-kafka-relay platform: frigate spec: - imagePullSecrets: - - name: regcred containers: - name: app - image: ghcr.io/brilliant-monkey/frigate-kafka-relay + image: ghcr.io/brilliant-monkey/frigate-kafka-relay:23e2a7f env: - name: FRIGATE_KAFKA_RELAY_CONFIG_PATH value: "/app/config.yml" @@ -29,10 +27,6 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name - - name: PORT - value: "80" - ports: - - containerPort: 80 resources: limits: cpu: 2000m @@ -40,17 +34,6 @@ spec: requests: cpu: 500m memory: 256Mi - livenessProbe: - httpGet: - path: /health - scheme: HTTP - port: 80 - initialDelaySeconds: 60 - readinessProbe: - httpGet: - path: /health - scheme: HTTP - port: 80 volumeMounts: - mountPath: /app/config.yml subPath: config.yml