How to Self-Host using Docker
If you are an Enterprise customer, you can self-host Accurate Video LTA instead of using apps.accurate.video. You will need access to the Codemill repository that contains the deployment artifacts. Contact your sales representative for the credentials. This guide covers how you can use Docker to host the application.
Prerequisites
Before you begin, make sure you have the following:
- Docker installed and running on your machine. For example
Docker Desktopcan be downloaded from the official Docker website. - Your username and password for the Codemill Docker repository (
codemill-docker.jfrog.io).
List available docker images
You can run the following command to list the available docker images:
curl -u '<REPOSITORY_USERNAME>:<REPOSITORY_PASSWORD>' \
"https://codemill-docker.jfrog.io/artifactory/api/docker/docker/v2/accurate-player/accurate-video-lta/tags/list"
Step 1: Log in to the Docker Registry
First, you need to authenticate with the Codemill Docker registry. Open your terminal or command prompt and run the following command. You will be prompted to enter your password.
docker login codemill-docker.jfrog.io
You should see a "Login Succeeded" message upon successful authentication.
Step 2: Pull the Docker Image
Next, pull the Accurate Video LTA image from the registry to your local machine.
docker pull codemill-docker.jfrog.io/accurate-player/accurate-video-lta:7.0.0
Step 3: Run the Application
With the image downloaded, you can now run the application as a Docker container.
Basic Run Command
The simplest way to run the container is to map a local port to the container's port. The application inside the container listens on port 80. We will map port 8080 on your local machine to the container's port 80.
docker run -d --name accurate-video-lta -p 8080:80 codemill-docker.jfrog.io/accurate-player/accurate-video-lta:7.0.0
Let's break down the flags:
-d: Runs the container in detached mode (in the background).--name accurate-video-lta: Assigns a memorable name to your container.-p 8080:80: Maps port 8080 on your host machine to port 80 inside the container.
Adding Configuration
For a real deployment, you may want to provide some configuration, such as a license key. This is done using environment variables that you pass using the -e flag.
The environment variables shown below are just examples. Please refer to Environment Variables for a complete list of variables for your setup.
Here's an example of how to run the container with a license key:
docker run -d \
--name accurate-video-lta \
-p 8080:80 \
-e LICENSE_KEY="<YOUR_LICENSE_KEY_HERE>" \
codemill-docker.jfrog.io/accurate-player/accurate-video-lta:7.0.0
Step 4: Verify the Application is Running
You can check that your container is running with the docker ps command:
docker ps
You should see accurate-video-lta in the list of running containers.
Now, open your web browser and navigate to http://localhost:8080. You should see the Accurate Video LTA application.
Environment variables
| Variable | Description |
|---|---|
LICENSE_KEY | License key provided to you by our sales representatives, see License key. |
AV_BASE_HREF | If set when running the docker image, the <base href="/" /> in index.html will be rewritten. If Accurate.Video LTA is hosted on subpath, for example http://example.com/lta/, AV_BASE_HREF should be set to lta |
License key
When the license key is provided through the environment variable LICENSE_KEY the docker image performs some file changes when started.
The license key given will be added to the files /usr/share/nginx/html/assets/json/settings.js and /usr/share/nginx/html/assets/json/license.json.
The settings.js file will act as default settings when no license key has been set in the launch template.
The license.json file can and is used in the default template as a $ref
{
"settings": [
{
"$ref": "license.json"
}
]
}
If the environment variable LICENSE_KEY is not provided you can of course also add the license key to the launch template manually:
{
"settings": {
"licenseKey": "you-license-key-here"
}
}