elestio/mirotalk-sfu

Verified Publisher

By Elestio

Updated 8 months ago

Mirotalk-sfu, verified and packaged by Elestio

Image
Integration & Delivery
Networking
Security

1.6K

elest.io

DiscordElestio examplesBlog

Mirotalk, verified and packaged by Elestio

Mirotalk is Free WebRTC - P2P - Simple, Secure, Fast Real-Time Video Conferences with support for up to 4k resolution and 60fps. It's compatible with all major browsers and platforms.

mirotalk

deploy

Deploy a fully managed mirotalk on elest.io if you want automated backups, reverse proxy with SSL termination, firewall, automated OS & Software updates, and a team of Linux experts and open source enthusiasts to ensure your services are always safe, and functional.

Why use Elestio images?

  • Elestio stays in sync with updates from the original source and quickly releases new versions of this image through our automated processes.
  • Elestio images provide timely access to the most recent bug fixes and features.
  • Our team performs quality control checks to ensure the products we release meet our high standards.

Usage

Git clone

You can deploy it easily with the following command:

git clone https://github.com/elestio-examples/mirotalk.git

Copy the .env files from tests folder to the project directory

cp ./tests/webrtc/.env ./.env
cp ./tests/webrtc/bro.env ./bro.env
cp ./tests/webrtc/c2c.env ./c2c.env
cp ./tests/webrtc/p2p.env ./p2p.env

Edit the .env files with your own values.

Copy the config.js and sfu.js files from tests folder to the project directory

cp ./tests/webrtc/config.js ./config.js
cp ./tests/webrtc/sfu.js ./sfu.js

Edit them with your own values.

Run the project with the following command

docker-compose up -d
./scripts/postInstall.sh

You can access the Web UI at: http://your-domain:26645

Docker-compose

Here are some example snippets to help you get started creating a container.

    version: "3"

    services:
    mirotalkwebrtc:
        image: elestio/mirotalk:${SOFTWARE_VERSION_TAG}
        restart: always
        hostname: mirotalkwebrtc
        volumes:
            - .env:/src/.env:ro
            - ./configs/config.js:/src/backend/config.js:ro
            # - ./backend/:/src/backend/:ro
            # - ./frontend/:/src/frontend/:ro
        ports:
            - "172.17.0.1:26645:${SERVER_PORT}"
        links:
            - mongodb

    mongodb:
        image: mongo:latest
        restart: always
        environment:
        MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
        MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
        MONGO_INITDB_DATABASE: ${MONGO_DATABASE}
        ports:
            - "172.17.0.1:${MONGO_PORT}:${MONGO_PORT}"
        volumes:
            - "./.mongodb_data:/data/db"
        command: mongod --quiet --logpath /dev/null

    mirotalksfu:
        image: mirotalk/sfu:latest
        restart: always
        volumes:
            - ./configs/sfu.js:/src/app/src/config.js:ro
            # These volumes are not mandatory, comment if you want to use it
            # - ./app/:/src/app/:ro
            # - ./public/:/src/public/:ro
        ports:
            - "172.17.0.1:3010:3010/tcp"
            - "40000-40100:40000-40100/tcp"
            - "40000-40100:40000-40100/udp"

    mirotalkc2c:
        image: mirotalk/c2c:latest
        volumes:
            - ./c2c.env:/src/.env:ro
            # These volumes are not mandatory, uncomment if you want to use it
            # - ./frontend/:/src/frontend/:ro
            # - ./backend/:/src/backend/:ro
        restart: always
        ports:
            - "172.17.0.1:36703:8080"

    mirotalkbro:
        image: mirotalk/bro:latest
        volumes:
            - ./bro.env:/src/.env:ro
            # These volumes are not mandatory, uncomment if you want to use it
            # - ./app/:/src/app/:ro
            # - ./public/:/src/public/:ro
        restart: always
        ports:
            - "172.17.0.1:21208:3016"

    mirotalkp2p:
        image: mirotalk/p2p:latest
        volumes:
            - ./p2p.env:/src/.env:ro
            # These volumes are not mandatory, uncomment if you want to use it
            # - ./app/:/src/app/:ro
            # - ./public/:/src/public/:ro
        restart: always
        ports:
            - "172.17.0.1:43850:3000"
Environment variables
VariableValue (example)
SERVER_HOSTyour_domain
ADMIN_EMAILyour@email.com
ADMIN_PASSWORDyour-password
SERVER_PORT9000
SERVER_URLhttps://your_domain
JWT_KEYyour_key
JWT_EXP2h
MONGO_HOSTmongodb
MONGO_USERNAMEroot
MONGO_PASSWORDyour-password
MONGO_DATABASEmirotalk
MONGO_PORT27017
MONGO_URLmongodb://root:[your_password]@mongodb:27017
EMAIL_VERIFICATIONtrue
ADMIN_USERNAMEUSERNAME
NGROK_ENABLEDfalse
TWILIO_SMSfalse
USER_REGISTRATION_MODEtrue
IP51.15.194.244
EMAIL_HOSTyour.email.host
EMAIL_PORTyour.email.port
EMAIL_USERNAMEyour@email.com
EMAIL_PASSWORDyour-email-password

Maintenance

Logging

The Elestio Mirotalk Docker image sends the container logs to stdout. To view the logs, you can use the following command:

docker-compose logs -f

To stop the stack you can use the following command:

docker-compose down

Backup and Restore with Docker Compose

To make backup and restore operations easier, we are using folder volume mounts. You can simply stop your stack with docker-compose down, then backup all the files and subfolders in the folder near the docker-compose.yml file.

Creating a ZIP Archive For example, if you want to create a ZIP archive, navigate to the folder where you have your docker-compose.yml file and use this command:

zip -r myarchive.zip .

Restoring from ZIP Archive To restore from a ZIP archive, unzip the archive into the original folder using the following command:

unzip myarchive.zip -d /path/to/original/folder

Starting Your Stack Once your backup is complete, you can start your stack again with the following command:

docker-compose up -d

That's it! With these simple steps, you can easily backup and restore your data volumes using Docker Compose.

Links

Docker Pull Command

docker pull elestio/mirotalk-sfu