Decap CMS (Netlify CMS)
Git-based CMS for static site generators.
Overview
Decap CMS is a Git-based content management system designed specifically for static site generators and JAMstack workflows. Originally developed as Netlify CMS, Decap CMS is now maintained by the community and provides a web-based interface for managing content stored directly in Git repositories. The CMS operates by reading and writing markdown files with YAML frontmatter, making it ideal for developers who want to maintain their content in version control while providing non-technical users with an intuitive editing interface.
This Docker stack combines the Decap CMS proxy server with an NGINX web server to create a complete local development environment for Git-based content management. The proxy server handles authentication and Git operations, while NGINX serves your static site files. This configuration eliminates the need for complex OAuth setup during development and provides immediate feedback when content changes are made through the CMS interface.
This setup is perfect for developers building static sites with Hugo, Jekyll, Gatsby, or Next.js who need a user-friendly content management interface. The Git-based approach means all content changes are tracked in version control, providing full audit trails and the ability to roll back changes. Content editors can use the familiar CMS interface while developers maintain full control over the underlying file structure and deployment pipeline.
Key Features
- Git-based content storage with automatic commit generation for all CMS changes
- Real-time preview functionality showing content changes before publishing
- Customizable content schemas through YAML configuration files
- Rich text editor with markdown support and media asset management
- Branch-based editorial workflow supporting draft and published content states
- Local proxy server eliminating OAuth requirements for development environments
- Multi-collection support for different content types like posts, pages, and data files
- Automatic slug generation and frontmatter field validation
Common Use Cases
- 1Local development environment for static site generators with content management needs
- 2Documentation websites requiring non-technical team members to edit content
- 3Marketing websites where content teams need to update pages without developer intervention
- 4Personal blogs and portfolios with multiple authors or collaborative editing
- 5Company websites needing approval workflows and content versioning
- 6Educational platforms managing course content and resources through Git repositories
- 7Portfolio sites for agencies managing multiple client projects with different content structures
Prerequisites
- Git repository initialized in your project directory with existing static site structure
- Docker and Docker Compose installed with at least 512MB RAM available
- Static site generator files in ./public directory (Hugo, Jekyll, Gatsby build output)
- Decap CMS configuration file created at admin/config.yml with collections defined
- Content directory structure matching your config.yml collection settings
- Basic understanding of YAML configuration and markdown file formatting
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 decap-proxy: 3 image: netlify/netlify-cms-proxy-server:latest4 container_name: decap-proxy5 restart: unless-stopped6 volumes: 7 - ./content:/app/content8 ports: 9 - "8081:8081"10 networks: 11 - decap-network1213 site: 14 image: nginx:alpine15 container_name: decap-site16 restart: unless-stopped17 volumes: 18 - ./public:/usr/share/nginx/html:ro19 ports: 20 - "80:80"21 networks: 22 - decap-network2324networks: 25 decap-network: 26 driver: bridge.env Template
.env
1# Configure in admin/config.ymlUsage Notes
- 1Docs: https://decapcms.org/docs/
- 2Site at http://localhost, admin at /admin
- 3Configure in admin/config.yml (collections, fields)
- 4Git-based: commits directly to your repository
- 5Works with Hugo, Jekyll, Gatsby, Next.js, any SSG
- 6Formerly Netlify CMS - community maintained fork
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
decap-proxy
decap-proxy:
image: netlify/netlify-cms-proxy-server:latest
container_name: decap-proxy
restart: unless-stopped
volumes:
- ./content:/app/content
ports:
- "8081:8081"
networks:
- decap-network
site
site:
image: nginx:alpine
container_name: decap-site
restart: unless-stopped
volumes:
- ./public:/usr/share/nginx/html:ro
ports:
- "80:80"
networks:
- decap-network
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 decap-proxy:5 image: netlify/netlify-cms-proxy-server:latest6 container_name: decap-proxy7 restart: unless-stopped8 volumes:9 - ./content:/app/content10 ports:11 - "8081:8081"12 networks:13 - decap-network1415 site:16 image: nginx:alpine17 container_name: decap-site18 restart: unless-stopped19 volumes:20 - ./public:/usr/share/nginx/html:ro21 ports:22 - "80:80"23 networks:24 - decap-network2526networks:27 decap-network:28 driver: bridge29EOF3031# 2. Create the .env file32cat > .env << 'EOF'33# Configure in admin/config.yml34EOF3536# 3. Start the services37docker compose up -d3839# 4. View logs40docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/decap-cms/run | bashTroubleshooting
- Error: Failed to persist entry: Ensure your Git repository is initialized and the content directory has write permissions
- CMS loads but shows no collections: Verify admin/config.yml exists and contains properly formatted collection definitions
- Unable to load media files: Check that media_folder path in config.yml matches your actual asset directory structure
- Proxy server connection refused: Confirm port 8081 is not in use by another service and restart the decap-proxy container
- Git authentication errors: Verify the proxy server has access to your repository and Git credentials are properly configured
- Changes not appearing on site: Ensure your static site generator has rebuilt after CMS commits and NGINX is serving the updated files
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download