Skip to content

Conversation

Julusian
Copy link
Member

@Julusian Julusian commented Oct 14, 2025

About Me

This pull request is posted on behalf of NRK.

Type of Contribution

This is a: Feature

New Behavior

This starts on support for running the workers in docker. Instead of using an appContainer to spawn and manage workers, it relies on them being spawned manually.

At this stage it is focussing on manual spawning of workers, potentially using some k8s autoscaling. A follow up could implement an alternate appContainer which interacts directly with k8s to perform automatic scaling.

This is achieved with something like the following (plus volumes being mounted):

  workforce:
    build:
      context: .
      dockerfile: apps/workforce/app/Dockerfile
    ports:
      - '8070:8070' # this needs to be exposed so that external workers can connect back to it
    environment:
      - WORKFORCE_ALLOW_NO_APP_CONTAINERS=1

  worker0:
    build:
      context: .
      dockerfile: apps/worker/app/Dockerfile
    command:
      - --logLevel=debug
      - --workforceURL=ws://workforce:8070
      - --costMultiplier=0.5
      - --resourceId=docker
      - --networkIds=networkDocker
      # - --pickUpCriticalExpectationsOnly # Optional, but perhaps good to have for some workers
    volumes:
      - /some-path/source:/data/source:ro
      - /some-path/target/caspar01:/data/caspar01

Testing Instructions

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@Julusian Julusian changed the title feat: run workers in docker SOFIE-4071 feat: support workers in docker SOFIE-4071 Oct 15, 2025
@Julusian Julusian merged commit 681c62f into develop Oct 20, 2025
11 of 12 checks passed
@Julusian Julusian deleted the feat/docker-worker branch October 20, 2025 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants