From 56c7a54f79b8ec8edfc4f9de6f26521577356afb Mon Sep 17 00:00:00 2001 From: janb87 <12234016+janb87@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:49:47 +0200 Subject: [PATCH 1/3] feat: custom deployment docs --- docs/about-settlemint/4_components.mdx | 5 ++ docs/developer-guides/connect-frontend.md | 7 ++ docs/using-platform/24_custom-deployment.md | 75 +++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 docs/using-platform/24_custom-deployment.md diff --git a/docs/about-settlemint/4_components.mdx b/docs/about-settlemint/4_components.mdx index cae16320..54bbf40b 100644 --- a/docs/about-settlemint/4_components.mdx +++ b/docs/about-settlemint/4_components.mdx @@ -101,6 +101,11 @@ which allows you connect your blockchain application to other technologies such databases, APIs, and more. This tool is a low-code to which also offers a visualization of any business logic included in your integration. +## Add a Custom Deployment + + +Your blockchain application may require custom components or frontend applications that are not provided by the standard SettleMint platform offerings. The [Custom Deployment](../../using-platform/custom-deployment/) feature allows you to deploy your own Docker images on the SettleMint platform. This provides the flexibility to integrate custom solutions, such as frontend applications, within your blockchain-based projects, enhancing the overall functionality and user experience of your application. + ## Getting Started Now that you have a better idea of each of the components that make up SettleMint, try deploying diff --git a/docs/developer-guides/connect-frontend.md b/docs/developer-guides/connect-frontend.md index 4e6e49c9..a10cfb4c 100644 --- a/docs/developer-guides/connect-frontend.md +++ b/docs/developer-guides/connect-frontend.md @@ -260,6 +260,13 @@ After clicking `Confirm`, you will see a `Tokens Sent` confirmation on your fron Congrats! You will now see the transaction confirmed in your Metamask activity. + ## Next Steps Now that you have built your custom frontend, you can now explore more [smart contract use cases](../guide-library) you can build on SettleMint! + +## Deploy Your Frontend as a Custom Deployment + +After building your custom frontend, you can deploy it directly on the SettleMint platform using the Custom Deployment feature. This allows you to host your frontend application alongside your blockchain components, providing a seamless integration within the SettleMint ecosystem. + +For more detailed information on Custom Deployments, refer to the [Custom Deployment documentation](../../using-platform/custom-deployment). diff --git a/docs/using-platform/24_custom-deployment.md b/docs/using-platform/24_custom-deployment.md new file mode 100644 index 00000000..7b9ed64d --- /dev/null +++ b/docs/using-platform/24_custom-deployment.md @@ -0,0 +1,75 @@ +# Custom Deployment + +Custom Deployment allows you to deploy your own Docker images, such as frontend applications, on the SettleMint platform. This feature provides flexibility for integrating custom solutions within your blockchain-based applications. + +## Create a Custom Deployment + +To create a Custom Deployment on the SettleMint platform, follow these steps: + +1. Prepare your container image and push it to a container registry (public or private). +2. In the SettleMint platform, navigate to the Custom Deployments section. +3. Click on the "Add Custom Deployment" button to create a new deployment. +4. Provide the necessary details: + - Container image path (e.g., registry.example.com/my-app:latest) + - Container registry credentials (if using a private registry) + - Environment variables (if required) + - Custom domain information (if applicable) +5. Configure any additional settings as needed. +6. Click on Confirm and wait for the Custom Deployment to be in the Running status. [View the list of statuses](../reference/14_statuses.md). + +## DNS Configuration for Custom Domains + +When using custom domains with your Custom Deployment, you'll need to configure your DNS settings correctly. Here's how to set it up: + +1. **Add Custom Domain to the SettleMint Platform**: + - Navigate to your Custom Deployment in the SettleMint platform. + - In the manager custom deployment menu, click on the edit custom deployment action + - Locate the custom domains configuration section + - Enter your desired custom domain (e.g., example.com or app.example.com). + - Save the changes to update your Custom Deployment settings. + +2. **Obtain Your Application's Hostname**: After adding your custom domain, the SettleMint platform will provide you with a CNAME record. This can be found in the "Connect" tab of your Custom Deployment. + +3. **Access Your Domain's DNS Settings**: Log in to your domain registrar or DNS provider's control panel. + +4. **Create DNS Records**: + - Create a CNAME record pointing your custom domain to the provided hostname. + - Example: `CNAME example.com your-app.settlemint-platform.com` + +5. **Configure Subdomains (Optional)**: + - If you want to use subdomains, create additional CNAME records as needed. + - Example: `CNAME app.example.com your-app.settlemint-platform.com` + +6. **Set TTL (Time to Live)**: + - Set a lower TTL (e.g., 300 seconds) initially to allow for quicker propagation. + - You can increase it later for better caching (e.g., 3600 seconds). + +7. **Verify DNS Propagation**: + - Use online DNS lookup tools to check if your DNS changes have propagated. + - Note that DNS propagation can take up to 48 hours, although it's often much quicker. + +8. **SSL/TLS Configuration**: + - The SettleMint platform typically handles SSL/TLS certificates automatically. + - If you need to use your own certificates, please contact us for assistance and further instructions. + +## Limitations and Considerations + +When using Custom Deployment, keep the following limitations in mind: + +1. **No Root User Privileges**: Your application will run without root user privileges for security reasons. + +2. **Read-Only Filesystem**: The filesystem is read-only. For data persistence, consider using: + - Hasura: A GraphQL engine that provides a scalable database solution. See [Backend-as-a-service + documentation](../backend-as-a-service/). + - Other External Services: Depending on your specific needs, you may use other cloud-based storage or database services. + +3. **Stateless Applications**: Your applications should be designed to be stateless. This ensures better scalability and reliability in a cloud environment. + +## Best Practices + +- Design your applications to be stateless and horizontally scalable. +- Use environment variables for configuration to make your deployments more flexible. +- Implement proper logging to facilitate debugging and monitoring. +- Regularly update your container images to include the latest security patches. + +Custom Deployment offers a powerful way to extend the capabilities of your blockchain solutions on the SettleMint platform. By following these guidelines and best practices, you can seamlessly integrate your custom applications into your blockchain ecosystem. From 1f9cc58e48e7a6a101a60c6821cf4bb9ccfeeaae Mon Sep 17 00:00:00 2001 From: janb87 <12234016+janb87@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:59:04 +0200 Subject: [PATCH 2/3] improvements --- docs/developer-guides/connect-frontend.md | 2 +- docs/using-platform/24_custom-deployment.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/developer-guides/connect-frontend.md b/docs/developer-guides/connect-frontend.md index a10cfb4c..008c7889 100644 --- a/docs/developer-guides/connect-frontend.md +++ b/docs/developer-guides/connect-frontend.md @@ -267,6 +267,6 @@ Now that you have built your custom frontend, you can now explore more [smart co ## Deploy Your Frontend as a Custom Deployment -After building your custom frontend, you can deploy it directly on the SettleMint platform using the Custom Deployment feature. This allows you to host your frontend application alongside your blockchain components, providing a seamless integration within the SettleMint ecosystem. +After building your custom frontend, you can deploy it on the SettleMint platform using the Custom Deployment feature. This allows you to host your frontend application alongside your blockchain components, providing a seamless integration within the SettleMint ecosystem. For more detailed information on Custom Deployments, refer to the [Custom Deployment documentation](../../using-platform/custom-deployment). diff --git a/docs/using-platform/24_custom-deployment.md b/docs/using-platform/24_custom-deployment.md index 7b9ed64d..57add427 100644 --- a/docs/using-platform/24_custom-deployment.md +++ b/docs/using-platform/24_custom-deployment.md @@ -60,7 +60,7 @@ When using Custom Deployment, keep the following limitations in mind: 2. **Read-Only Filesystem**: The filesystem is read-only. For data persistence, consider using: - Hasura: A GraphQL engine that provides a scalable database solution. See [Backend-as-a-service - documentation](../backend-as-a-service/). + documentation](../backend-as-a-service). - Other External Services: Depending on your specific needs, you may use other cloud-based storage or database services. 3. **Stateless Applications**: Your applications should be designed to be stateless. This ensures better scalability and reliability in a cloud environment. From 19bac90fc1a3e624c0f9cb288c0b046d146af42e Mon Sep 17 00:00:00 2001 From: janb87 <12234016+janb87@users.noreply.github.com> Date: Mon, 7 Oct 2024 14:01:08 +0200 Subject: [PATCH 3/3] grammar --- docs/using-platform/24_custom-deployment.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/using-platform/24_custom-deployment.md b/docs/using-platform/24_custom-deployment.md index 57add427..0a5c0535 100644 --- a/docs/using-platform/24_custom-deployment.md +++ b/docs/using-platform/24_custom-deployment.md @@ -1,6 +1,6 @@ # Custom Deployment -Custom Deployment allows you to deploy your own Docker images, such as frontend applications, on the SettleMint platform. This feature provides flexibility for integrating custom solutions within your blockchain-based applications. +A Custom Deployment allows you to deploy your own Docker images, such as frontend applications, on the SettleMint platform. This feature provides flexibility for integrating custom solutions within your blockchain-based applications. ## Create a Custom Deployment @@ -15,7 +15,7 @@ To create a Custom Deployment on the SettleMint platform, follow these steps: - Environment variables (if required) - Custom domain information (if applicable) 5. Configure any additional settings as needed. -6. Click on Confirm and wait for the Custom Deployment to be in the Running status. [View the list of statuses](../reference/14_statuses.md). +6. Click on 'Confirm' and wait for the Custom Deployment to be in the Running status. [View the list of statuses](../reference/14_statuses.md). ## DNS Configuration for Custom Domains