Connecting to an API

Run it against an API

The image needs no build step. Point it at a running barakoCMS:

docker run -p 3000:3000 \
  -e NEXT_PUBLIC_API_URL=http://localhost:5005 \
  ghcr.io/baryodev/barako-brew:latest

Open http://localhost:3000 and sign in with the initial admin account (InitialAdmin__Username / InitialAdmin__Password on the API). The API has to allow the console's origin, so set CORS__AllowedOrigins=http://localhost:3000 on it.

No API yet? quickstart/ composes Postgres, the API and the console from published images.

NEXT_PUBLIC_API_URL is read at container start by entrypoint.sh, which writes public/env-config.js. Repointing the console at another API never needs a rebuild.

NEXT_PUBLIC_PRESS_URL is optional: the address of the barakoPress site that renders the pages. With it set, a page's Blocks field is edited as blocks built from the schema the site publishes at /api/blocks; without it, that field stays a JSON editor. See docs/blocks.md.

Tags on ghcr.io/baryodev/barako-brew:

Tag Built from
latest, <version> a v* tag, linux/amd64 and linux/arm64
dev, dev-<sha> every merge to master, both architectures
playground, playground-<version> the release image plus playground.baryo.dev's configuration, both architectures

Every tag is also pushed as ghcr.io/baryodev/barako-admin, the old name, at the same digest. That name stops at 2.0.0.