This document covers the full production deployment process for Stellar-IndigoPay using Kubernetes and Helm.
Before deploying to production, ensure you have the following installed and configured:
kubectl: The Kubernetes command-line tool.helm: The Helm package manager (v3+).- A Kubernetes Cluster: Running on a cloud provider like GCP (GKE), AWS (EKS), or a managed cluster.
- Cloud Provider CLI: (e.g.,
gcloudfor GCP,awsfor AWS) configured with appropriate access rights.
The application requires various environment variables (e.g., database credentials, API keys) to function securely. These must be stored as Kubernetes Secrets rather than in the Helm chart directly.
Create a Kubernetes Secret from your .env file:
kubectl create secret generic stellar-indigopay-secrets --from-env-file=.envNote: Ensure your .env file is properly configured for the production environment and NEVER committed to version control.
Once your secrets are in place, you can deploy the application using the provided Helm chart.
Run the following command from the root of the repository:
helm install stellar-indigopay helm/indigopay/This will deploy the required deployments, services, and other resources as defined in the Helm chart.
To expose the application securely over HTTPS, configure an Ingress resource with TLS.
- Ingress Controller: Ensure an Ingress controller (e.g., NGINX) is running in your cluster.
- Cert-Manager: Install
cert-managerto automatically provision and manage TLS certificates (e.g., via Let's Encrypt). - Update
values.yaml: Update thehelm/indigopay/values.yaml(or pass a customvalues-prod.yaml) to enable the Ingress and configure TLS hosts.
Example configuration snippet:
ingress:
enabled: true
className: nginx
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
hosts:
- host: api.stellarindigopay.example.com
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: stellar-indigopay-tls
hosts:
- api.indigopay.example.comApply the updated configuration:
helm upgrade stellar-indigopay helm/indigopay/ -f values-prod.yamlAfter the application is deployed, you must run the database migrations to set up the production schema.
Connect to a running backend pod or execute a one-off job to run the migration script:
kubectl exec -it deployment/stellar-indigopay-backend -- npm run migrate(Adjust the command if you use a dedicated migration job or a different package manager command.)
After deploying the infrastructure, you must deploy and register the Soroban smart contract on the Stellar mainnet.
- Compile the Contract: Ensure your contract is compiled to a WebAssembly (.wasm) file and optimized for deployment.
- Deploy to Mainnet: Use the Stellar CLI to deploy the contract.
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/indigopay_contract.wasm \
--source admin \
--network mainnetOnce deployed, update your application configuration (via Secrets or ConfigMaps) with the new mainnet Contract ID.