Skip to content

Commit

Permalink
feat: added release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmarksilly committed Mar 30, 2023
1 parent 3b5897a commit e3292ef
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 18 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
46 changes: 46 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 1 addition & 18 deletions kubernetes/development/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,23 @@ 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"
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: PORT
value: "80"
ports:
- containerPort: 80
resources:
limits:
cpu: 2000m
memory: 512Mi
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
Expand Down

0 comments on commit e3292ef

Please sign in to comment.