docker.recipes

SilverStripe CMS

intermediate

Flexible PHP CMS with built-in versioning and workflows.

Overview

SilverStripe is a mature PHP-based content management system originally developed in New Zealand, known for its sophisticated content versioning, built-in workflow capabilities, and developer-friendly ORM. Unlike simpler CMSs, SilverStripe provides enterprise-grade features including draft/published content states, hierarchical page structures, and extensible template systems that make it ideal for complex websites requiring editorial workflows and content governance. This stack combines SilverStripe with MySQL 8.0 to deliver a robust content management platform where MySQL's InnoDB storage engine provides ACID compliance for SilverStripe's versioning system, ensuring data integrity across content revisions and user permissions. The configuration leverages MySQL's JSON data type support for SilverStripe's flexible field storage and MySQL's full-text search capabilities to power the CMS's built-in search functionality. This combination serves organizations that need more than basic blogging capabilities - those requiring sophisticated content workflows, multi-user editorial processes, and the ability to maintain complex content hierarchies with full audit trails and rollback capabilities.

Key Features

  • Built-in content versioning with draft/published states powered by MySQL's transactional integrity
  • Hierarchical page structure with unlimited nesting supported by MySQL's recursive queries
  • Fluent ORM query builder that generates optimized MySQL queries with automatic escaping
  • Multi-user editorial workflows with approval processes tracked in MySQL audit tables
  • Template inheritance system with partial caching stored in MySQL for performance
  • Extensible field types including relations that leverage MySQL's foreign key constraints
  • Built-in search functionality utilizing MySQL's full-text indexing capabilities
  • Module system for extending functionality with database schema migrations

Common Use Cases

  • 1Corporate websites requiring editorial approval workflows and content governance
  • 2Educational institutions managing complex course catalogs and faculty information
  • 3Government agencies needing audit trails and content versioning for compliance
  • 4Marketing agencies building client websites with sophisticated content management needs
  • 5E-commerce sites using SilverStripe's flexible product catalog capabilities
  • 6Membership organizations with complex user hierarchies and content permissions
  • 7News and media sites requiring editorial workflows and publishing schedules

Prerequisites

  • Docker and Docker Compose installed on the host system
  • Minimum 1GB RAM recommended for MySQL 8.0 optimal performance
  • Port 80 available on host for SilverStripe web interface
  • Basic understanding of PHP development and Composer package management
  • Familiarity with MySQL administration for database maintenance tasks
  • Understanding of web server concepts and virtual hosting

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 silverstripe:
3 image: brettt89/silverstripe-web:latest
4 container_name: silverstripe
5 restart: unless-stopped
6 environment:
7 SS_DATABASE_CLASS: MySQLDatabase
8 SS_DATABASE_SERVER: mysql
9 SS_DATABASE_USERNAME: silverstripe
10 SS_DATABASE_PASSWORD: ${DB_PASSWORD}
11 SS_DATABASE_NAME: silverstripe
12 volumes:
13 - ./app:/var/www/html
14 ports:
15 - "80:80"
16 depends_on:
17 - mysql
18 networks:
19 - silverstripe-network
20
21 mysql:
22 image: mysql:8.0
23 container_name: silverstripe-mysql
24 environment:
25 MYSQL_ROOT_PASSWORD: ${ROOT_PASSWORD}
26 MYSQL_DATABASE: silverstripe
27 MYSQL_USER: silverstripe
28 MYSQL_PASSWORD: ${DB_PASSWORD}
29 volumes:
30 - mysql_data:/var/lib/mysql
31 networks:
32 - silverstripe-network
33
34volumes:
35 mysql_data:
36
37networks:
38 silverstripe-network:
39 driver: bridge

.env Template

.env
1DB_PASSWORD=changeme
2ROOT_PASSWORD=changeme

Usage Notes

  1. 1Docs: https://docs.silverstripe.org/
  2. 2Create project: composer create-project silverstripe/installer
  3. 3Access at http://localhost, admin at /admin
  4. 4Built-in versioning, draft/published states
  5. 5ORM with fluent query builder
  6. 6Workflow module for approval processes

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

silverstripe
silverstripe:
  image: brettt89/silverstripe-web:latest
  container_name: silverstripe
  restart: unless-stopped
  environment:
    SS_DATABASE_CLASS: MySQLDatabase
    SS_DATABASE_SERVER: mysql
    SS_DATABASE_USERNAME: silverstripe
    SS_DATABASE_PASSWORD: ${DB_PASSWORD}
    SS_DATABASE_NAME: silverstripe
  volumes:
    - ./app:/var/www/html
  ports:
    - "80:80"
  depends_on:
    - mysql
  networks:
    - silverstripe-network
mysql
mysql:
  image: mysql:8.0
  container_name: silverstripe-mysql
  environment:
    MYSQL_ROOT_PASSWORD: ${ROOT_PASSWORD}
    MYSQL_DATABASE: silverstripe
    MYSQL_USER: silverstripe
    MYSQL_PASSWORD: ${DB_PASSWORD}
  volumes:
    - mysql_data:/var/lib/mysql
  networks:
    - silverstripe-network

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 silverstripe:
5 image: brettt89/silverstripe-web:latest
6 container_name: silverstripe
7 restart: unless-stopped
8 environment:
9 SS_DATABASE_CLASS: MySQLDatabase
10 SS_DATABASE_SERVER: mysql
11 SS_DATABASE_USERNAME: silverstripe
12 SS_DATABASE_PASSWORD: ${DB_PASSWORD}
13 SS_DATABASE_NAME: silverstripe
14 volumes:
15 - ./app:/var/www/html
16 ports:
17 - "80:80"
18 depends_on:
19 - mysql
20 networks:
21 - silverstripe-network
22
23 mysql:
24 image: mysql:8.0
25 container_name: silverstripe-mysql
26 environment:
27 MYSQL_ROOT_PASSWORD: ${ROOT_PASSWORD}
28 MYSQL_DATABASE: silverstripe
29 MYSQL_USER: silverstripe
30 MYSQL_PASSWORD: ${DB_PASSWORD}
31 volumes:
32 - mysql_data:/var/lib/mysql
33 networks:
34 - silverstripe-network
35
36volumes:
37 mysql_data:
38
39networks:
40 silverstripe-network:
41 driver: bridge
42EOF
43
44# 2. Create the .env file
45cat > .env << 'EOF'
46DB_PASSWORD=changeme
47ROOT_PASSWORD=changeme
48EOF
49
50# 3. Start the services
51docker compose up -d
52
53# 4. View logs
54docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/silverstripe/run | bash

Troubleshooting

  • SilverStripe shows database connection error: Verify MySQL container is running and DB_PASSWORD environment variable matches between services
  • Admin interface returns 500 error: Check that ./app directory exists and has proper write permissions for SilverStripe cache and assets
  • MySQL container fails to start: Ensure mysql_data volume has sufficient disk space and ROOT_PASSWORD is set in environment file
  • SilverStripe installer loops endlessly: Clear browser cache and ensure database credentials are correct in environment variables
  • Assets upload fails: Verify ./app/assets directory exists with write permissions for web server user
  • Module installation fails: Check that Composer cache directory is writable within the silverstripe container

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

Components

silverstripemysql

Tags

#silverstripe#php#versioning#workflow

Category

CMS & Blogging
Ad Space