Specmatic Insights self-hosted server
10K+
This guide will help you quickly set up and run Specmatic Insights using Docker.
Specmatic Insights is an application that unlocks insights into your microservices, helps you track dependencies, and spot problems early. It aggregates and visualizes service interactions across different environments, providing an "x-ray view" of your microservices architecture.
This Docker image includes a trial license that enables you to ingest 10 total API operations.
The Insights app requires a MariaDB database. You can run it using Docker:
docker run -d \
--name insights-db \
-e MARIADB_ROOT_PASSWORD=admin \
-e MARIADB_DATABASE=insights \
-e MARIADB_USER=insights_user \
-e MARIADB_PASSWORD=foobar \
-p 3306:3306 \
mariadb:11.7.2
Pull and run the Specmatic Insights image:
docker run -d \
--name specmatic-insights \
-p 8080:8080 \
-e SPRING_DATASOURCE_URL=jdbc:mariadb://host.docker.internal:3306/insights \
-e SPRING_DATASOURCE_USERNAME=insights_user \
-e SPRING_DATASOURCE_PASSWORD=foobar \
specmatic/specmatic-insights:latest
If you're using Docker Compose, you can use the following docker-compose.yml file:
services:
db:
image: mariadb:11.7.2
container_name: insights_db
restart: always
environment:
MARIADB_ROOT_PASSWORD: admin
MARIADB_DATABASE: insights
MARIADB_USER: insights_user
MARIADB_PASSWORD: foobar
ports:
- "3306:3306"
volumes:
- mariadb_data:/var/lib/mysql
networks:
- insights-network
insights-app:
image: specmatic/specmatic-insights:latest
container_name: insights_app
restart: always
depends_on:
- db
environment:
SPRING_PROFILES_ACTIVE: prod
SPRING_DATASOURCE_URL: jdbc:mariadb://db:3306/insights
SPRING_DATASOURCE_USERNAME: insights_user
SPRING_DATASOURCE_PASSWORD: foobar
# Uncomment below when using SAML
# Relying Party (Service Provider) configuration
# SAML_RELYING_PARTY_PRIVATE_KEY_LOCATION: file:/config/keys/localhost.key
# SAML_RELYING_PARTY_CERTIFICATE_LOCATION: file:/config/certs/localhost.pem
ports:
- "8080:8080"
# Uncomment below when using SAML
# volumes:
# - /path/to/keys:/config/keys/
# - /path/to/certs:/config/certs/
networks:
- insights-network
volumes:
mariadb_data:
networks:
insights-network:
driver: bridge
Run with:
docker-compose up -d
The Docker image includes a trial license that allows for ingesting 10 total API operations. This is sufficient for testing and evaluation purposes. For production use, you'll need to acquire a full license: https://insights.specmatic.io/contact/.
The application comes with a bundled web interface. To access the dashboard, visit:
http://localhost:8080/dashboard
The Specmatic Insights app can be configured using the following environment variables:
| Environment Variable | Description | Default Value |
|---|---|---|
| SPRING_DATASOURCE_URL | JDBC URL for the database | jdbc:mariadb://db:3306/insights |
| SPRING_DATASOURCE_USERNAME | Database username | insights_user |
| SPRING_DATASOURCE_PASSWORD | Database password | in!ight! |
| SPRING_PROFILES_ACTIVE | Spring profiles | prod,trial |
If the app fails to connect to the database, check the following:
Ensure the database container is running:
docker ps | grep insights_db
Verify the database credentials are correct
Check the logs for any connection errors:
docker logs insights_app
If you encounter license-related errors:
After you have the app running successfully:
Specmatic Insights becomes most valuable when integrated with your CI/CD pipelines. By collecting Specmatic reports from your build processes, you can:
We provide first-class support for GitHub actions, and have detailed instructions on our documentation website: Setup Insights in your pipelines
However, if you're not using GitHub actions, you can use send-specmatic-build-report.sh to help you integrate.
Preconditions
specmatic-insights-github-build-reporter, which will download the package if it's not already cached.--specmatic-reports-dir (or -srd) argument.
If you run the script from within the directory containing the reports, you can use --specmatic-reports-dir .
If you run the script from a different directory, you'll need to provide the correct relative or absolute path to the reports directory./path/to/send-specmatic-build-report.sh).As an example, for Gitlab, the build step would look like:
# .gitlab-ci.yml
stages:
- report
send_specmatic_report:
image: node:18
stage: report
script:
- chmod +x send-specmatic-build-report.sh
- ./send-specmatic-build-report.sh
Similarly, a Jenkins groovy snippet would look like:
pipeline {
agent any
stages {
stage('Send Specmatic Report') {
steps {
// make sure Node+npm are available on this agent
sh '''
chmod +x send-specmatic-build-report.sh
./send-specmatic-build-report.sh
'''
}
}
}
}
If you need further assistance, please:
Content type
Image
Digest
sha256:97cf6e1bf…
Size
209.6 MB
Last updated
10 days ago
docker pull specmatic/specmatic-insights