Public | Automated Build

Last pushed: a month ago
Short Description
Can be configured to 2 endpoints for retrieval and transformation of preview content.
Full Description

Content Preview Service (content-preview)

Content Preview service serves published and unpublished content from Methode CMS (and in the future from Wordpress)
so that journalists can preview unpublished articles in the context that closely matches the live publication on Next FT platform.
It is one of internal services that comprise UPP read stack and as such is not meant to be accessible publicly
but to collaborate with other services such as Content-Public-Read-Preview service,
which in turn gives access to authenticated public API to read preview content.
Content Preview service relies on Methode API service and Methode Article Transformer service;
both underlying services are crucial to serve preview content


For the first time:

go get

or update:

go get -u


Locally with default configuration:

go install

Locally with properties set:

go install
$GOPATH/bin/content-preview \
--app-port "8084" \
--source-app-name "methode-api" \
--source-app-auth "*<key>*" \
--source-app-uri "" \
--source-app-health-uri "" \
--source-app-panic-guide "" \
--transform-app-name "methode-article-transformer" \
--transform-app-uri "" \
--transform-app-health-uri "" \
--transform-app-panic-guide "" \
--graphite-tcp-address "" \
--graphite-prefix "$ENV.content-preview.%i"

With Docker:

docker build -t coco/content-preview .

docker run -ti coco/content-preview

docker run -ti --env "APP_PORT=8080" \ --env "SOURCE_APP_NAME=methode-api" \ --env "SOURCE_APP_AUTH=*<key>*" \ --env "SOURCE_APP_URI=" \ --env "SOURCE_APP_HEALTH_URI=" \ --env "SOURCE_APP_PANIC_GUIDE=" \ --env "TRANSFORM_APP_NAME=methode-article-transformer" \ --env "TRANSFORM_APP_URI=http://$HOSTNAME:8080/map/" \ --env "TRANSFORM_APP_HEALTH_URI=http://$HOSTNAME:8080/__health" \ --env "TRANSFORM_APP_PANIC_GUIDE=" \ --env "" \ --env "$ENV.content-preview.%i" \ coco/content-preview

When deployed locally arguments are optional.

When you set URI of the production instance of Methode API you also need to specify an authorisation key.
Authorisation key can be obtained from a secure note soted in LastPass.
You will need to ask team members to grant you access to the shared secure note containing production methode API key


curl -v http://localhost:8084/content-preview/9358ba1e-c07f-11e5-846f-79b0e3d20eaf


The read should return transformed content of an article

404 if article with given uuid doesn't exist or cannot be transformed successfully

503 when one of the collaborating services is inaccessible

Admin endpoints

Healthchecks: http://localhost:8084/__health

Ping: http://localhost:8084/__ping

Build-info: http://localhost:8084/__build-info - [Documentation on how to generate build-info] (

Metrics: http://localhost:8084/__metrics

Docker Pull Command
Source Repository