From 4fad4ed5909d7e881135b69f6ec7f8c704cc638e Mon Sep 17 00:00:00 2001 From: Matt0550 <65899974+Matt0550@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:35:16 +0200 Subject: [PATCH] ci/cd docker build demo livekit server --- .github/workflows/docker.build.yaml | 35 ++++++++++++++++++++++++++++ docker-compose.yml | 36 ++++++++++++++++++++++++++++- 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docker.build.yaml diff --git a/.github/workflows/docker.build.yaml b/.github/workflows/docker.build.yaml new file mode 100644 index 0000000..e73e4cc --- /dev/null +++ b/.github/workflows/docker.build.yaml @@ -0,0 +1,35 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }}/meet-app + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 46aa775..5816fb6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,4 +6,38 @@ services: ports: - "3000:3000" env_file: - - .env \ No newline at end of file + - .env + depends_on: + - livekit + + livekit: + image: livekit/livekit-server:latest + ports: + - "7880:7880" # HTTP + - "7881:7881" # HTTPS/WSS + - "7882:7882/udp" # WebRTC UDP + environment: + - LIVEKIT_CONFIG_FILE=/config/config.yaml + env_file: + - .env + volumes: + - ./livekit:/config + command: ["--config", "/config/config.yaml"] + +# EXAMPLE CONFIG yaml for LiveKit +# Save this as livekit/config.yaml +# port: 7880 +# bind_addresses: +# - "" +# api: +# key: your_actual_api_key +# secret: your_actual_api_secret +# rtc: +# tcp_port: 7881 +# port_range_start: 50000 +# port_range_end: 60000 +# turn: +# enabled: true +# domain: localhost +# tls_port: 5349 +# udp_port: 3478 \ No newline at end of file