PHPackages                             creative-commoners/create-ss-demo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. creative-commoners/create-ss-demo

ActiveProject[Utility &amp; Helpers](/categories/utility)

creative-commoners/create-ss-demo
=================================

Creates demo sites from the current working directory

25[4 issues](https://github.com/creative-commoners/create-ss-demo/issues)PHP

Since May 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/creative-commoners/create-ss-demo)[ Packagist](https://packagist.org/packages/creative-commoners/create-ss-demo)[ RSS](/packages/creative-commoners-create-ss-demo/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

create-ss-demo
==============

[](#create-ss-demo)

[![Build Status](https://camo.githubusercontent.com/b62541318fdb5d1a8e6427e947d315894d037e17ac4c9719e16304e0c03ec7e5/68747470733a2f2f7472617669732d63692e6f72672f63726561746976652d636f6d6d6f6e6572732f6372656174652d73732d64656d6f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/creative-commoners/create-ss-demo)

A command line utility that creates demo sites using the SilverStripe Platform API.

Requirements
------------

[](#requirements)

- PHP ^7.1
- Docker to create containers
- A Docker Hub account to store the container tags
- SilverStripe Platform stack permissions for the content snapshots
- [sspak](https://github.com/silverstripe/sspak) to create snapshots

Installation
------------

[](#installation)

Install globally with Composer:

```
composer global require creative-commoners/create-ss-demo dev-master

```

Ensure the global Composer bin folder is in your system path.

Configuration
-------------

[](#configuration)

Ensure you have logged into your Docker Hub account:

```
docker login

```

You will also need to have set up a SilverStripe Platform API token (which can be done through the "My profile" section) and have it defined in environment variables:

- `SS_DEMO_AUTH_USER`: your SSP email address
- `SS_DEMO_AUTH_KEY`: your SSP API token

Ensure you don't commit these into any codebases anywhere.

Usage
-----

[](#usage)

You have a local environment ready to share with someone, and you want to publish it. The steps involved are:

- Build and publish (`build`) a Docker container
- Create (`instantiate`) the demo instance
- Destroy (`destroy`) the demo instance once finished with it

### Building the Docker container

[](#building-the-docker-container)

You don't need to have Docker enabled for your project, this tool will copy the necessary Docker configuration files into your project in order to build it into an image. You can then delete the files manually, or leave them there. At some point this will be automated as well.

To build the container, run `create-ss-demo build` with the following arguments:

- `name`: The name for your image, e.g. "sprint-2019-01-02"
- `username`: Your Docker Hub username, e.g. "johnsmith"
- `version`: The version to tag the image with, e.g. `0.1`

```
create-ss-demo build sprint-2019-01-02 johnsmith 0.1

```

This will build a Docker image with the specified name, tag it as the specified version, and push it to Docker Hub under the specified username.

#### Custom environment variables

[](#custom-environment-variables)

If your demo site image needs to have custom environment variables defined in it, add them to a `.env` file in the project's folder you're building. These will be merged with the default container environment variables when the SilverStripe application runs.

```
# File: .env
FOO=BAR

```

**Important:** Your Docker image will need to be public on Docker Hub in order for SilverStripe Platform to access and use it for demo builds. For this reason, **ensure you do not include any sensitive data in your `.env` file.**Only use mocked values and do not store any API keys, etc.

### Create the demo instance

[](#create-the-demo-instance)

Once you have a Docker container, you can ask SilverStripe Platform to build a demo environment with it. You will also need a [sspak](https://github.com/silverstripe/sspak) snapshot which will need to be uploaded to a SilverStripe Platform stack via the "Snapshots" section. Once this is complete, you will need to obtain the numeric ID for it from the "Snapshots" section.

To request a demo instance, run `create-ss-demo instantiate` with the following arguments:

- `site_name`: The site name used for the demo subdomain, e.g. `johnsmithsprint1` (cannot contain dashes etc)
- `image`: The Docker Hub image name and tag/version, e.g. "johnsmith/sprint-2019-01-02:01"
- `stack_name`: The SilverStripe platform stack code, e.g. `mystack`
- `snapshot_id`: The sspak snapshot ID from SilverStripe platform to use for content, e.g. 12846

```
create-ss-demo instantiate johnsmithsprint1 johnsmith/sprint-2019-01-02:0.1 mystack 12846

```

The SilverStripe Platform API will start processing your request, and the command will poll occasionally and provide the command with status updates. Once complete, you will be given the demo site URL and username/password to log into it. This can now be shared with other people.

**Note:** You will need to have necessary permissions on the specified SilverStripe Platform stack in order to perform this action.

### Destroying demo sites

[](#destroying-demo-sites)

Once your demo environment is no longer required you should close it down to prevent wasting AWS resources. To do this you can run `create-ss-demo destroy` with the following arguments:

- `demo_id`: The demo site ID to destroy
- `stack_name`: The SilverStripe platform stack code, e.g. `mystack`

```
create-ss-demo destroy 1123 mystack

```

**Note:** You will need to have necessary permissions on the demo's original SilverStripe Platform stack in order to perform this action.

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/04057079b9a8a168a9e8c40cf7bac17f05047255c48b71b63fc610db06f096cb?d=identicon)[robbieaverill](/maintainers/robbieaverill)

---

Top Contributors

[![robbieaverill](https://avatars.githubusercontent.com/u/5170590?v=4)](https://github.com/robbieaverill "robbieaverill (25 commits)")

### Embed Badge

![Health badge](/badges/creative-commoners-create-ss-demo/health.svg)

```
[![Health](https://phpackages.com/badges/creative-commoners-create-ss-demo/health.svg)](https://phpackages.com/packages/creative-commoners-create-ss-demo)
```

###  Alternatives

[naux/auto-correct

12211.4k2](/packages/naux-auto-correct)[sail/useragent

Library to detect the browser and all its info (OS, Platform, ...)

282.7k](/packages/sail-useragent)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
