Recaster as a Docker container

This section provides instructions for deploying and running the software as a Docker container on a Linux environment.

Prerequisites

Ensure Docker is installed on your Linux system. Refer to the Docker documentation for installation instructions specific to your Linux distribution.
If you prefer managing your Docker deployment with Docker Compose, ensure that Docker Compose is also installed.

Docker Compose

Create Docker Compose Configuration File or download it from the github repository:

  • Create a docker-compose.yml file in your preferred directory and define the services required for running the Recaster.

Example docker-compose.yml:

version: '3.4'

services:
    recaster:
        image: impleo/recaster:2.9.6
        container_name: recaster
        restart: always
        env_file: .env
        environment:
            PORT: ${PORT}
            BIND_IP: ${BIND_IP}
            USING_REVERSE_PROXY: ${USING_REVERSE_PROXY}
            KEEP_BITRATE_ITEMS: ${KEEP_BITRATE_ITEMS}
            BITRATE_UPDATE_INTERVAL: ${BITRATE_UPDATE_INTERVAL}
            START_PREVIEW_PORT: ${START_PREVIEW_PORT}
        volumes:
            - ./data/:/recaster/data/
            - recasterdb:/recaster/db/
            - recasterlic:/recaster/licenses/
        network_mode: host

volumes:
    recasterdb:
        external: false
    recasterlic:
        external: false

In the above example we have set up environment variables for recaster service using the env_file directive to load variables from a .env file. It is possible to set the directly.
If the environment variables like PORT, BIND_IP, START_PREVIEW_PORT, KEEP_BITRATE_ITEMS, and BITRATE_UPDATE_INTERVAL are not provided, the recaster will use default values specified by the application.

Providing initial platform configuration

You can provide initial configuration for the platform by mounting a volume to the container. Simply create a directory named data in your preferred location and copy the platform configuration file platforms.yml into it.
More on platform configuration file format

Running the container without Docker Compose

While Docker Compose provides a convenient way to manage multi-container applications, you can achieve similar functionality using a simple docker run command. Instead of defining services and configurations in a Docker Compose file, you can manually specify container options such as environment variables, volume mounts, and networking settings with docker run. Simply use the docker run command followed by the necessary options and the image name to start your containerized Recaster application.

docker run -d \
    --name recaster \
    --restart always \
    -e PORT=5000 \
    -e BIND_IP=192.168.1.42 \
    -v $(pwd)/data/:/recaster/data/ \
    -v recasterdb:/recaster/db/ \
    -v recasterlic:/recaster/licenses/ \
    --network host \
    impleo/recaster:2.9.6