diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5a7a9fc --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +.git +.github +target +**/target +.env +.env.* +!.env.example +docker-compose.yml +compose.yml +*.log diff --git a/.github/workflows/publish-ghcr.yml b/.github/workflows/publish-ghcr.yml new file mode 100644 index 0000000..b4fc908 --- /dev/null +++ b/.github/workflows/publish-ghcr.yml @@ -0,0 +1,59 @@ +name: Publish GHCR image + +on: + push: + branches: + - master + tags: + - "v*" + workflow_dispatch: + +permissions: + contents: read + packages: write + +env: + IMAGE_NAME: ghcr.io/${{ github.repository }} + +jobs: + docker: + name: Build and publish Docker image + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=ref,event=branch + type=ref,event=tag + type=sha,prefix=sha- + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ff022f9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "pjsua/pjproject"] + path = pjsua/pjproject + url = https://github.com/pjsip/pjproject.git diff --git a/Cargo.toml b/Cargo.toml index 0d0c557..84d83b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,5 +5,5 @@ resolver = "2" [workspace.package] authors = ["coral "] license = "AGPL-3.0-only" -repository = "https://github.com/coral/sipcord-bridge" +repository = "https://github.com/legop3/sipcord-bridge" homepage = "https://sipcord.net/" diff --git a/README.md b/README.md index 4c6f338..054927d 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Create a `docker-compose.yml`: ```yaml services: sipcord-bridge: - image: ghcr.io/coral/sipcord-bridge:latest + image: ghcr.io/legop3/sipcord-bridge:latest container_name: sipcord-bridge restart: always network_mode: host @@ -95,6 +95,15 @@ docker logs -f sipcord-bridge You should see it load the dialplan and start listening. +Images are published by GitHub Actions to `ghcr.io/legop3/sipcord-bridge` +on pushes to `master`, version tags like `v2.1.2`, and manual workflow runs. +If the package is private, make it public in the GitHub package settings or +log in to GHCR from your OMV host before pulling. + +For a FreePBX trunk, point the trunk host at your Docker host and send the +extension digits you configured in `dialplan.toml`. The static router ignores +SIP usernames/passwords and routes only by the dialed extension. + ### 4b. Build from source Requires Rust nightly (for `portable_simd`) and system dependencies for pjproject (OpenSSL, Opus, libtiff, etc). See the `Dockerfile` for the full list. @@ -163,4 +172,4 @@ The bridge can receive faxes (both G.711 passthrough and T.38 UDPTL). Received f Code is AGPLv3 -Dusthillguy track is whatever dusthillguy wishes \ No newline at end of file +Dusthillguy track is whatever dusthillguy wishes diff --git a/sipcord-bridge/Cargo.toml b/sipcord-bridge/Cargo.toml index a3aa3bf..1ada4df 100644 --- a/sipcord-bridge/Cargo.toml +++ b/sipcord-bridge/Cargo.toml @@ -4,7 +4,7 @@ version = "2.1.2" edition = "2024" authors = ["coral "] license = "AGPL-3.0-only" -repository = "https://github.com/coral/sipcord-bridge" +repository = "https://github.com/legop3/sipcord-bridge" homepage = "https://sipcord.net/" publish = false