Skip to main content

Installing Brightspot locally

You can run a bare-bones instance of Brightspot on your own computer for development and evaluation. The Brightspot Quick Start project on GitHub is a template that contains everything needed to build Brightspot and run it in Docker containers.

note

The Quick Start project and the Brightspot Docker images are for local development only. They are not intended for production use.

Prerequisites​

Install the following software before you begin.

SoftwareVersionNotes
Java Development Kit (JDK)11The Quick Start project compiles against Java 11.
DockerDocker Desktop, or Docker Engine with the Docker Compose pluginDocker runs the database, search, application, and web servers.
GitAny current versionRequired to clone the Quick Start project.

You do not need to install Gradle. The project includes the Gradle wrapper (gradlew and gradlew.bat), which downloads the correct version of Gradle the first time you run it.

Make sure the following ports are not in use by other applications on your computer.

PortUsed by
80Apache web server (HTTP)
443Apache web server (HTTPS)
5005Java remote debugger for Tomcat
8081Solr
tip

If the CMS is slow to start or the Tomcat container stops unexpectedly, increase the memory available to Docker to at least 4 GB in Docker Desktop's resource settings.

How the local environment works​

The Quick Start project builds Brightspot into a .war file with Gradle. Docker Compose then starts four containers that run the application.

ContainerImagePurpose
mysqlbrightspot/mysqlStores content and configuration.
solrbrightspot/solrProvides search indexing.
tomcatbrightspot/tomcatRuns Brightspot from the .war file in web/build/libs/.
apachebrightspot/apacheServes requests on http://localhost and forwards them to Tomcat.

The containers store their data in named Docker volumes, so your content persists when you stop and restart the containers.

The Brightspot version is set in the project's settings.gradle file, in the brightspot-bom and brightspot-dependencies library entries.

Installing and starting Brightspot​

To install and start Brightspot:

  1. Make sure Docker is running.

  2. Make sure the JAVA_HOME environment variable points to your JDK 11 installation.

  3. Clone the Quick Start project, and change to its directory.

    1
    git clone https://github.com/brightspot/quick-start.git
    2
    cd quick-start
  4. Build the project.

    macOS and Linux

    1
    ./gradlew

    Windows Command Prompt

    1
    gradlew.bat

    Windows PowerShell

    1
    .\gradlew.bat

    The first build downloads Gradle and all Brightspot dependencies, so it can take several minutes. Subsequent builds are faster.

  5. Start the containers in the background.

    1
    docker compose up -d

    The first time you run this command, Docker downloads the Brightspot images. Docker Compose may warn that the version attribute is obsolete. You can ignore this warning.

  6. In a browser, open http://localhost/cms.

    Brightspot takes a few seconds to start after the containers are running. If the page does not load, wait a moment and refresh until the login page appears.

Logging in for the first time​

A new installation has no users. The first time you open the CMS, the login page displays a welcome message stating that you are the first user.

To create the first administrator account:

  1. Type an email address or username, and a password.
  2. Click Log In.

Brightspot creates the account with administrator privileges. Use this account to create additional users, configure sites, and create content.

Rebuilding after code changes​

The tomcat container runs the .war file that Gradle builds in web/build/libs/. After you change your project's code, rebuild the .war file and restart Tomcat to deploy it.

1
./gradlew
2
docker compose restart tomcat

On Windows, run gradlew.bat (Command Prompt) or .\gradlew.bat (PowerShell) instead of ./gradlew.

Viewing logs​

To follow the Tomcat logs, run the following command:

1
docker compose logs -f --tail=1000 tomcat

To view the logs for another container, replace tomcat with the container name, such as mysql or solr. Press Ctrl+C to stop following the logs.

Stopping and starting Brightspot​

The following table lists common Docker Compose commands for managing the local environment. Run these commands from the project directory.

TaskCommandEffect on data
Stop the containersdocker compose stopData is kept.
Start stopped containersdocker compose startData is kept.
Remove the containersdocker compose downData in named volumes is kept.
Remove the containers and all datadocker compose down -vDeletes the database, search index, and uploaded files.
warning

Running docker compose down -v permanently deletes all content, users, and uploaded files in your local instance. The next time you start the containers, Brightspot starts with an empty database.

Debugging​

The tomcat container exposes a Java remote debugging port on 5005. To debug Brightspot from your IDE, create a remote JVM debug configuration that attaches to localhost:5005.

Troubleshooting​

ProblemSolution
http://localhost/cms does not load right after starting the containers.Brightspot is still starting. Wait a few seconds and refresh the page. To check progress, view the Tomcat logs.
Docker reports that a port is already allocated.Another application is using port 80, 443, 5005, or 8081. Stop that application, or change the published port in docker-compose.yml.
The Gradle build fails with a Java version error.Make sure JAVA_HOME points to a JDK 11 installation, and run the build again.
The Gradle build fails with Downloading from https://services.gradle.org/... failed: timeout (10000ms).The Gradle wrapper stops a download that receives no data for 10 seconds, which can happen on slow networks. In gradle/wrapper/gradle-wrapper.properties, increase the networkTimeout value (in milliseconds), for example to 120000, and run the build again.
On Linux or WSL, Docker commands fail with permission denied while trying to connect to the ....Your account is not in the docker group, or your terminal session started before you were added to it. Run sudo usermod -aG docker $USER, and then open a new terminal session.
In WSL, the docker command is not found.Docker Desktop adds the docker command to WSL only while it is running. Start Docker Desktop, and make sure your WSL distribution is turned on in Docker Desktop under Settings > Resources > WSL integration. Then open a new terminal session.
docker compose up -d fails while downloading an image with unexpected EOF.The download was interrupted. Run docker compose pull to download the images again, and then run docker compose up -d.
After Docker Desktop restarts, only the tomcat container is running.The tomcat container restarts automatically, but the other containers do not. Run docker compose up -d to start them.
After Docker Desktop restarts, the containers are running but http://localhost/cms returns 404 Not Found.The tomcat container lost access to the project directory, so it cannot find the .war file. Run docker compose up -d --force-recreate tomcat to re-create the container. Your content is kept, because it is stored in named volumes.
Changes to your code do not appear in the CMS.Rebuild the project and restart the tomcat container. See Rebuilding after code changes.

Next steps​

After Brightspot is running, you can start building your project. To model your first content type, see Creating a content type. Some features, such as collections, require a task host. To find the task host for your local tomcat container, see Determining a task host in a local development environment.

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.