-
Notifications
You must be signed in to change notification settings - Fork 32
40 lines (30 loc) · 1.33 KB
/
install-dockerfile-and-check-ssl.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Docker Build and Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
run: docker build -f docker/Dockerfile_Process --network=host -t antmediaserver --build-arg LicenseKey="${{ secrets.ENTERPRISE_LICENSE }}" .
- name: Run Docker container
run: docker run -d --name antmedia --network=host -it antmediaserver
- name: Run enable_ssl.sh inside container
run: docker exec antmedia bash wget -O /usr/local/antmedia/enable_ssl.sh https://raw.githubusercontent.com/ant-media/Ant-Media-Server/21b57c461ba8eae496b830e779d2c628f25aecce/src/main/server/enable_ssl.sh && bash /usr/local/antmedia/enable_ssl.sh
- name: Verify container is running
run: |
docker ps -f name=antmedia
if [ $(docker ps -f name=antmedia --format '{{.Names}}') != "antmedia" ]; then
echo "Container is not running"
exit 1
fi
- name: Test application
run: |
docker exec antmedia curl -f http://localhost:5443 # Örneğin HTTP endpoint test
- name: Stop and remove container
run: |
docker stop antmedia
docker rm antmedia