feat(docker): add production docker image for mediatmx

This commit is contained in:
2026-03-02 08:23:46 +01:00
parent 2c95ddc6dd
commit 6d5f7b4fd5
4 changed files with 47 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ jobs:
name: Push frontend to Docker Hub name: Push frontend to Docker Hub
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Wait - name: Wait
uses: NathanFirmo/wait-for-other-action@v1.0.4 uses: NathanFirmo/wait-for-other-action@v1.0.4
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
@@ -40,12 +40,12 @@ jobs:
RELEASE_URL=$(curl -s https://api.github.com/repos/srizan10/hctv/releases/latest | \ RELEASE_URL=$(curl -s https://api.github.com/repos/srizan10/hctv/releases/latest | \
grep "browser_download_url.*slack-import-emojis-linux-x86_64" | \ grep "browser_download_url.*slack-import-emojis-linux-x86_64" | \
cut -d '"' -f 4) cut -d '"' -f 4)
curl -L -o slack-import-emojis-bin $RELEASE_URL curl -L -o slack-import-emojis-bin $RELEASE_URL
chmod +x slack-import-emojis-bin chmod +x slack-import-emojis-bin
mkdir -p apps/web/src/lib/instrumentation/ mkdir -p apps/web/src/lib/instrumentation/
./slack-import-emojis-bin default ./slack-import-emojis-bin default
cp emojis.json apps/web/ cp emojis.json apps/web/
@@ -98,11 +98,43 @@ jobs:
secrets: | secrets: |
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }} TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
TURBO_TEAM=${{ secrets.TURBO_TEAM }} TURBO_TEAM=${{ secrets.TURBO_TEAM }}
mediamtx:
name: Push MediaMTX image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: srizan10/hclive-mediamtx
tags: latest
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/mediamtx/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
deploy: deploy:
name: Deploy to Coolify name: Deploy to Coolify
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [frontend, chat] needs: [frontend, chat, mediamtx]
steps: steps:
- name: Send coolify redeploy webhook - name: Send coolify redeploy webhook
run: | run: |
curl -X POST -H "Authorization: Bearer ${{ secrets.COOLIFY_API_KEY }}" https://coolify.srizan.dev/api/v1/deploy?uuid=${{ secrets.COOLIFY_APP_UUID }}&force=true curl -X POST -H "Authorization: Bearer ${{ secrets.COOLIFY_API_KEY }}" https://coolify.srizan.dev/api/v1/deploy?uuid=${{ secrets.COOLIFY_APP_UUID }}&force=true

View File

@@ -58,8 +58,6 @@ services:
volumes: volumes:
- 'hctv_redis:/data' - 'hctv_redis:/data'
mediamtx: mediamtx:
image: 'bluenviron/mediamtx:latest' image: 'srizan10/hclive-mediamtx:latest'
ports: ports:
- '8890:8890/udp' - '8890:8890/udp'
volumes:
- './mediamtx.yml:/mediamtx.yml'

View File

@@ -0,0 +1,8 @@
FROM bluenviron/mediamtx:1 AS mediamtx
FROM ubuntu:24.04
COPY --from=mediamtx /mediamtx /
COPY ./docker/mediamtx/mediamtx.yml /mediamtx.yml
ENTRYPOINT ["/mediamtx"]