This document provides information about the StellarKraal staging environment.
Deployment how-to: Step-by-step staging deploy, secrets, rollback, and verification are documented in docs/deployment/staging-deployment.md.
The staging environment is a mirror of the production environment used for final testing and validation before deployment to production.
- Staging URL:
https://staging.stellarkraal.com(Example) - Backend API:
https://api-staging.stellarkraal.com(Example)
Access to the staging environment is restricted to the team via an IP Allowlist at the Load Balancer level.
The list of allowed IPs is managed via GitHub Actions variables (ALLOWED_IPS). To add your IP:
- Update the
ALLOWED_IPSvariable in GitHub Repository Settings. - The next deployment to staging will apply the new allowlist.
The staging environment is automatically updated whenever code is merged into the develop branch.
The pipeline follows these steps:
- Linting & Unit Tests: All tests must pass.
- Infrastructure Provisioning: Terraform applies changes to the
stagingworkspace. - Deployment: The latest application code is deployed to ECS Staging.
- Notification: A Slack notification is sent upon success/failure.
The staging database is synchronized with production every Sunday at midnight.
- PII Masking: During synchronization, all Personally Identifiable Information (PII) is anonymized.
- Masking Logic: Refer to
scripts/mask-pii.sqlfor the specific masking rules.
The staging infrastructure is managed using Terraform Workspaces. To manage staging infrastructure locally:
cd terraform
terraform init
terraform workspace select staging
terraform plan -var="environment=staging"