itsmejoeeey / docker-decap-cms-standalone

Easy-to-use Docker image to self-host Decap CMS (formerly Netlify CMS).
21 stars 9 forks source link
cms docker netlify-cms

docker-decap-cms-standalone

Note Formerly docker-netlify-cms-standalone. In early 2023 Netlify CMS was rebranded to Decap CMS under new ownership (see post).


Easy-to-use Docker image to self-host Decap CMS (without using Netlify).

Includes Decap CMS + an external authentication provider to allow auth with Github/Gitlab.

Why use Decap CMS? Decap CMS is a headless CMS that presents a clean UI for editing content (e.g. markdown files) stored in a Git repository. Easy to configure with a YAML config file - a simple and flexible way to add content to any site built with a static site generator.

View on Docker Hub 🐳


Getting started

You will need Docker installed on your system

To get started using Github.com

docker run -d \
  -p 80:80 \
  -e ORIGINS='<your root url>' \
  -e OAUTH_CLIENT_ID='<your_github_client_id>' \
  -e OAUTH_CLIENT_SECRET='<your_github_client_secret>' \
  -v ./my-local-conf.yml:/app/config.yml:ro \
  --name decap-cms \
  --restart=always \
  itsmejoeeey/docker-decap-cms-standalone:latest

See also: "Supplying a valid config.yml file"

Environment variables:

Getting OAUTH_CLIENT_ID and OUTH_CLIENT_SECRET

  1. Visit Github and go to Settings > Developer settings > OAuth Apps
  2. Create a 'New OAuth App' with: Homepage URL = your application homepage (i.e. https://example.com) Authorization callback URL = {origin}/callback (i.e. https://cms.example.com/callback)

To get starting using Gitlab.com

docker run -d \
  -p 80:80 \
  -e ORIGINS='<your root url>' \
  -e OAUTH_CLIENT_ID='<your_gitlab_client_id>' \
  -e OAUTH_CLIENT_SECRET='<your_gitlab_client_secret>' \
  -e GIT_HOSTNAME='https://gitlab.com' \
  -e OAUTH_PROVIDER='gitlab' \
  -e SCOPES='api' \
  -e OAUTH_AUTHORIZE_PATH='/oauth/authorize' \
  -e OAUTH_TOKEN_PATH='/oauth/token' \
  -v ./my-local-conf.yml:/app/config.yml:ro \
  --name decap-cms \
  --restart=always \
  itsmejoeeey/docker-decap-cms-standalone:latest

See also: "Supplying a valid config.yml file"

Environment variables:

TODO: Elaborate more. See here for more information.

Supplying a valid config.yml file

See the example file stored in the repo here.