Skip to main content
Version: Latest

Quick install

Installing for testing (or production)

Prerequisites

Installation

This docker-compose file automates the basic setup of the Sofie-Core application, the backend database and different Gateway options.

# This is NOT recommended to be used for a production deployment.
# It aims to quickly get an evaluation version of Sofie running and serve as a basis for how to set up a production deployment.
services:
db:
hostname: mongo
image: mongo:6.0
restart: always
entrypoint: ['/usr/bin/mongod', '--replSet', 'rs0', '--bind_ip_all']
# the healthcheck avoids the need to initiate the replica set
healthcheck:
test: test $$(mongosh --quiet --eval "try {rs.initiate()} catch(e) {rs.status().ok}") -eq 1
interval: 10s
start_period: 30s
ports:
- '27017:27017'
volumes:
- db-data:/data/db
networks:
- sofie

# Fix Ownership Snapshots mount
# Because docker volumes are owned by root by default
# And our images follow best-practise and don't run as root
change-vol-ownerships:
image: node:22-alpine
user: 'root'
volumes:
- sofie-store:/mnt/sofie-store
entrypoint: ['sh', '-c', 'chown -R node:node /mnt/sofie-store']

core:
hostname: core
image: sofietv/tv-automation-server-core:release52
restart: always
ports:
- '3000:3000' # Same port as meteor uses by default
environment:
PORT: '3000'
MONGO_URL: 'mongodb://db:27017/meteor'
MONGO_OPLOG_URL: 'mongodb://db:27017/local'
ROOT_URL: 'http://localhost:3000'
SOFIE_STORE_PATH: '/mnt/sofie-store'
networks:
- sofie
volumes:
- sofie-store:/mnt/sofie-store
depends_on:
change-vol-ownerships:
condition: service_completed_successfully
db:
condition: service_healthy

playout-gateway:
image: sofietv/tv-automation-playout-gateway:release52
restart: always
environment:
DEVICE_ID: playoutGateway0
CORE_HOST: core
CORE_PORT: '3000'
networks:
- sofie
- lan_access
depends_on:
- core

# Choose one of the following images, depending on which type of ingest gateway is wanted.

# spreadsheet-gateway:
# image: superflytv/sofie-spreadsheet-gateway:latest
# restart: always
# environment:
# DEVICE_ID: spreadsheetGateway0
# CORE_HOST: core
# CORE_PORT: '3000'
# networks:
# - sofie
# depends_on:
# - core

# mos-gateway:
# image: sofietv/tv-automation-mos-gateway:release52
# restart: always
# ports:
# - "10540:10540" # MOS Lower port
# - "10541:10541" # MOS Upper port
# # - "10542:10542" # MOS query port - not used
# environment:
# DEVICE_ID: mosGateway0
# CORE_HOST: core
# CORE_PORT: '3000'
# networks:
# - sofie
# depends_on:
# - core

# inews-gateway:
# image: tv2media/inews-ftp-gateway:1.37.0-in-testing.20
# restart: always
# command: yarn start -host core -port 3000 -id inewsGateway0
# networks:
# - sofie
# depends_on:
# - core

# rundown-editor:
# image: ghcr.io/superflytv/sofie-automation-rundown-editor:v2.2.4
# restart: always
# ports:
# - '3010:3010'
# environment:
# PORT: '3010'
# networks:
# - sofie
# depends_on:
# - core

networks:
sofie:
lan_access:
driver: bridge

volumes:
db-data:
sofie-store:

Create a Sofie folder, copy the above content, and save it as docker-compose.yaml within the Sofie folder.

Visit Rundowns & Newsroom Systems to see which Ingest Gateway can be used in your specific production environment. If you don't have an NRCS that you would like to integrate with, you can use the Rundown Editor as a simple Rundown creation utility. Navigate to the ingest-gateway section of docker-compose.yaml and select which type of ingest-gateway you'd like installed by uncommenting it. Save your changes.

Open a terminal, execute cd Sofie and sudo docker-compose up (or just docker-compose up on Windows). This will download MongoDB and Sofie components' container images and start them up. The installation will be done when your terminal window will be filled with messages coming from playout-gateway_1 and core_1.

Once the installation is done, Sofie should be running on http://localhost:3000. Next, you need to make sure that the Playout Gateway and Ingest Gateway are connected to the default Studio that has been automatically created. Open the Sofie User Interface with Configuration Access level by opening http://localhost:3000/?admin=1 in your Web Browser and navigate to Settings 🡒 Studios 🡒 Default Studio 🡒 Peripheral Devices. In the Parent Devices section, create a new Device using the + button, rename the device to Playout Gateway and select Playout gateway from the Peripheral Device drop down menu. Repeat this process for your Ingest Gateway or Sofie Rundown Editor.

note

Starting with Sofie version 1.52.0, sofietv container images will run as UID 1000.

Tips for running in production

There are some things not covered in this guide needed to run Sofie in a production environment:

  • Logging: Collect, store and track error messages. Kibana and logstash is one way to do it.
  • NGINX: It is customary to put a load-balancer in front of Sofie Core.
  • Memory and CPU usage monitoring.

Installing for Development

Installation instructions for installing Sofie-Core or the various gateways are available in the README file in their respective github repos.

Common prerequisites are Node.js and Yarn. Links to the repos are listed at Applications & Libraries.

Sofie Core GitHub Page for Developers