ci/cd docker build

demo livekit server
This commit is contained in:
Matt0550 2025-06-25 13:35:16 +02:00
parent 18a45e0eeb
commit 4fad4ed590
No known key found for this signature in database
GPG Key ID: 68FF7681DEFF2638
2 changed files with 70 additions and 1 deletions

35
.github/workflows/docker.build.yaml vendored Normal file
View File

@ -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 }}

View File

@ -6,4 +6,38 @@ services:
ports:
- "3000:3000"
env_file:
- .env
- .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