Run OpenD with Docker Compose
The smallest install: the app, the build worker and Postgres on one host, from the Compose file in the repository.
Before you begin
You need Docker with Compose, a checkout of the OpenD repository, and a host name readers can reach over HTTPS (terminate TLS in a reverse proxy in front of port 3000).
-
Create the configuration from the examples.
cp deploy/.env.example deploy/.env cp deploy/seed/seed.example.yaml deploy/seed/seed.yaml -
Edit
deploy/.env.Set at least
PUBLIC_URLand a randomSESSION_SECRET. For publishing setGITHUB_WEBHOOK_SECRET; for reader sign-in, theOIDC_*variables; for the admin API,OPEND_ADMIN_TOKEN. ChangePOSTGRES_PASSWORD. See the environment variable reference. -
Edit
deploy/seed/seed.yamlwith your docs repository, organizations, entitlements and readers.See Manage organizations, entitlements and readers for the format.
-
Build and start the stack.
docker compose -f deploy/docker-compose.yml up -d --buildCompose starts Postgres, runs the
migrateservice once to create the schema, then startsappon port 3000 (orOPEND_PORT) andworker. Both share theblobsvolume at/data/blobs. -
Load the seed file.
docker compose -f deploy/docker-compose.yml run --rm migrate seed /seed/seed.yamlSeeding is idempotent: everything is upserted, so run it again after each change.
-
Check health:
curl http://localhost:3000/healthzreturns {"status":"ok"}. - Connect GitHub and your identity provider.
Results
Readers sign in at PUBLIC_URL and get the live release for their version's line.
The first push to a release ref publishes it.
To evaluate without an identity provider, set NODE_ENV=development and
OPEND_DEV_LOGIN=1, then sign in at /auth/dev as any seeded
reader. Never do this with real content.
The web editor is an optional Compose profile, editor. See
Run the web editor.