By Marek
Dashboard that lets you define which web hooks / endpoints you want to trigger or send request to.
released January 18, 2025
npm install strapi-plugin-deploy-dashboardA Strapi plugin that allows you to manage deployment webhooks directly from a dashboard. Configure your deployment endpoints, trigger builds, and manage multiple environments with ease.
Check it out on npm npm
Install the plugin:
npm install strapi-plugin-deploy-dashboardEnable the plugin in your Strapi project by adding it to your config/plugins.js file:
module.exports = {
'strapi-plugin-deploy-dashboard': {
enabled: true,
},
};To contribute to the development of this plugin or customize it, follow these steps:
plugins folder of your Strapi application.config/plugins.js file:
export default () => ({
'strapi-plugin-deploy-dashboard': {
enabled: true,
resolve: './src/plugins/strapi-plugin-deploy-dashboard'
}
});The following commands are available to streamline the development process:
npm run buildnpm run watchThe plugin is configured through the config object in your Strapi project. Here's how to set it up:
Add the following configuration to your config/plugins.js file:
module.exports = {
'strapi-plugin-deploy-dashboard': {
config: {
deployments: [
{
name: "Main Application",
instances: [
{
id: "production",
name: "Production",
hookUrl: "https://example.com/webhook/deploy",
requestOptions: {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: {
branch: "main"
}
}
},
{
id: "staging",
name: "Staging",
hookUrl: "https://staging.example.com/webhook/deploy"
}
]
},
{
name: "Secondary Application",
instances: [
{
id: "development",
name: "Development",
hookUrl: "https://dev.example.com/webhook/deploy"
}
]
}
]
}
}
};| Property | Type | Description | Required |
|---|---|---|---|
deployments | Array | A list of deployment configurations. Each deployment represents a group of instances. | Yes |
deployments[].name | String | The name of the deployment group (e.g., "Main Application"). | Yes |
deployments[].instances | Array | A list of instances within the deployment group. | Yes |
instances[].id | String | A unique identifier for the instance (e.g., "production", "staging"). | Yes |
instances[].name | String | A descriptive name for the instance (e.g., "Production"). | Yes |
instances[].hookUrl | String (URL) | The URL of the webhook to trigger the deployment. | Yes |
instances[].requestOptions | Object | Additional options for the request (e.g., headers, body, HTTP method). | No |
requestOptions.method | String | HTTP method to use for the request (default: POST). | No |
requestOptions.headers | Object | Headers to include with the request (e.g., Content-Type: application/json). | No |
requestOptions.body | Object | The body payload to send with the request (used for POST, PUT, etc.). | No |
{
name: "My Application",
instances
:
[
{
id: "prod",
name: "Production",
hookUrl: "https://example.com/webhook/deploy"
},
{
id: "dev",
name: "Development",
hookUrl: "https://dev.example.com/webhook/deploy"
}
]
}{
name: "Advanced Application",
instances
:
[
{
id: "staging",
name: "Staging Environment",
hookUrl: "https://staging.example.com/webhook/deploy",
requestOptions: {
method: "POST",
headers: {
"Authorization": "Bearer my-secret-token",
"Content-Type": "application/json"
},
body: {
branch: "staging",
clearCache: true
}
}
}
]
}hookUrl is correctly formatted and accessible.requestOptions.Contributions are welcome! Feel free to open issues or submit pull requests to improve this plugin.
This plugin is licensed under the MIT License.
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
