Skip to content

Commit 80523e1

Browse files
feat: Add Elastic Beanstalk container configuration and update README for deployment instructions
1 parent 403223c commit 80523e1

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

.github/workflows/deploy.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,18 @@ jobs:
7070
shell: bash
7171
run: |
7272
ZIP_NAME="${{ matrix.service }}-${{ steps.suffix.outputs.value }}.zip"
73-
zip -r "../${ZIP_NAME}" .
73+
shopt -s dotglob
74+
zip -r "../${ZIP_NAME}" . -x "*/__pycache__/*" -x "*.pyc"
7475
echo "zip-name=${ZIP_NAME}" >> "$GITHUB_OUTPUT"
7576
77+
- name: Validate media relay package contents
78+
if: ${{ matrix.service == 'media-relay' }}
79+
env:
80+
ZIP_NAME: ${{ steps.package.outputs.zip-name }}
81+
shell: bash
82+
run: |
83+
unzip -l "${ZIP_NAME}" | grep '.platform/elasticbeanstalk/docker/container-configuration.json'
84+
7685
- name: Upload package to S3
7786
id: upload
7887
env:
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"containerDefinitions": [
3+
{
4+
"name": "app",
5+
"image": "local",
6+
"essential": true,
7+
"portMappings": [
8+
{ "containerPort": 8554, "hostPort": 8554, "protocol": "tcp" },
9+
{ "containerPort": 1935, "hostPort": 1935, "protocol": "tcp" },
10+
{ "containerPort": 8888, "hostPort": 8888, "protocol": "tcp" },
11+
{ "containerPort": 8889, "hostPort": 8889, "protocol": "tcp" },
12+
{ "containerPort": 9998, "hostPort": 9998, "protocol": "tcp" },
13+
{ "containerPort": 9999, "hostPort": 9999, "protocol": "tcp" },
14+
{ "containerPort": 8200, "hostPort": 8200, "protocol": "udp" }
15+
]
16+
}
17+
]
18+
}

media_relay/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Ports exposed by the container:
2626

2727
Ensure the Elastic Beanstalk load balancer and security groups forward the required ports. For WebRTC, terminate TLS at the load balancer and forward HTTPS traffic to port `8889`.
2828

29+
## Elastic Beanstalk configuration overrides
30+
31+
The `.platform/elasticbeanstalk/docker/container-configuration.json` file forces Elastic Beanstalk to publish every required TCP/UDP port when the single-instance environment launches the container. Do not remove this file: without it the platform only exposes the first port listed in the Dockerfile.
32+
2933
## Deployment bundle
3034

31-
The GitHub Actions workflow zips the contents of this folder and uploads the archive as an application version. The Dockerfile copies `mediamtx.yml` into the image and relies on the Mediamtx entrypoint to launch the server.
35+
The GitHub Actions workflow zips the contents of this folder (including the `.platform` overrides) and uploads the archive as an application version. The Dockerfile copies `mediamtx.yml` into the image and relies on the Mediamtx entrypoint to launch the server.

0 commit comments

Comments
 (0)