A virtual newsroom powered by RSS and AI.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rob Colbert 1639e48685 renamed 3 months ago
.vscode project created (forked from experimental Base v2) 3 months ago
docs project created (forked from experimental Base v2) 3 months ago
logs project created (forked from experimental Base v2) 3 months ago
src project created (forked from experimental Base v2) 3 months ago
ssl project created (forked from experimental Base v2) 3 months ago
supervisord project created (forked from experimental Base v2) 3 months ago
types project created (forked from experimental Base v2) 3 months ago
.gitignore project created (forked from experimental Base v2) 3 months ago
LICENSE project created (forked from experimental Base v2) 3 months ago
README.md project created (forked from experimental Base v2) 3 months ago
acosta.wav A Jim Acosta voice model sampled from his CNN resignation 3 months ago
build project created (forked from experimental Base v2) 3 months ago
build-less project created (forked from experimental Base v2) 3 months ago
dtp-newsroom.code-workspace renamed 3 months ago
eslint.config.js project created (forked from experimental Base v2) 3 months ago
nodemon.json project created (forked from experimental Base v2) 3 months ago
package.json project created (forked from experimental Base v2) 3 months ago
pnpm-lock.yaml project created (forked from experimental Base v2) 3 months ago
register.js project created (forked from experimental Base v2) 3 months ago
robc.wav A Rob Colbert voice model because I can. 3 months ago
start-local project created (forked from experimental Base v2) 3 months ago
tsconfig.json project created (forked from experimental Base v2) 3 months ago

README.md

DTP Newsroom

A virtual newsroom powered by RSS and AI that produces its own watchable media and publishes it online.

Web Application

The DTP Newsroom website.

Newsroom Worker

A running process that fetches news stories, creates audiovisual media from those stories, and publishes them.

Getting Started

You will repeat this host configuration process for each host system and running process added to the DTP infrastructure.

Host Configuration

Ubuntu is the only tested and supported host operating system for DTP. Ubuntu 24.04 LTS is recommended for development, testing, and hosting. Ubuntu 24.10 can be used for workstation duties, but 24.04 LTS is recommended for hosting.

Supervisor is used to manage Control and Agent Node process instances.

System Requirements

Make sure you've got the latest/greatest for your Ubuntu.

apt -y update && apt -y upgrade
apt -y install python3-pip build-essential ffmpeg supervisor

Install Node Version Manager (NVM) and Node.js

Node Version Manager is used to manage the Node.js installation on the host.

First, install nvm:

Using cURL

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

Using wget

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

Next, run nvm to install the current LTS version of Node.js:

nvm install --lts

pnpm (NPM alternative)

DTP Newsroom uses the pnpm package manager to manage the node_modules directory and provide runtime services.

Corepack, a Node.js utility, is used to install and enable pnpm for use.

The latest pnpm instructions can always be found here: pnpm installation

These are just convenience copies from that page.

corepack enable pnpm
corepack use pnpm@latest

And then run pnpm to install the DTP Newsroom application dependencies:

pnpm install

Preparing a Fresh Install

This is the basic configuration of a Node in the DTP network. Once these steps are completed, the host is ready to start the Web application, Newsroom Worker, or both.

cd ~/live
git clone [DTP_NEWSROOM_GIT_URL]

cd ~/live/dtp-newsroom
pnpm install

Next, you have to generate an SSL certificate for your local builds:

cd ~/live/dtp-newsroom/ssl
./mkcert

Controlling The Processes

Development Environment

A developer working in a local directory will use pnpm scripts to start the Web application and Newsroom Worker as needed. VS Code launchers are also provided with TypeScript debug configurations that debug the TypeScript sources directly.

Start Web Application

pnpm start-web
pnpm web-dev

Start Newsroom Worker

pnpm start-newsroom
pnpm newsroom-dev

Test and Production Environments

supervisord

The system administrator will use Supervisor to manage the Control and Agent Node processes. Sample configuration files are provided here in the repo for use with [supervisord]:

The system administrator may need to specialize those configurations for various differences in how they store logs, where they choose to install and manage the application, etc.

Logs

By default, DTP Newsroom will write logs to /var/log/dtp. The system administrator in test and production environments, or the developer in local environments, manages the logs directory using DTP_LOG_FILE_PATH in .env.

Log files are written with ANSI color. to view them in a terminal over an SSH connection, use the following command:

less -r logfile.log

In production environments, Supervisor can be used to tail process logs in real time.

To get a list of running processes:

supervisorctl status

To tail the logs of a running process:

supervisorctl tail -f [process]