Deployment
Deployment guide for the RawStack Admin component.
The Admin is built as a static single-page application and deployed to S3 behind CloudFront. There is no long-running application server or container to manage.
Build
Build the Admin from the project directory:
cd apps/admin
npm run buildThe production build output is written to apps/admin/dist/.
Deploy via CDK
The CDK Admin stack reads the build output and syncs it to S3:
cd infrastructure/aws
npm run cdk deploy admin-hostingIf the build output path differs from the default, set ADMIN_BUILD_PATH in infrastructure/aws/.env.
CloudFront configuration
CloudFront is configured to return index.html for unknown paths so client-side routing continues to work for deep links.
Static assets are cached aggressively. After a new build is deployed, the CDK stack creates a CloudFront invalidation so the latest version is served.
Custom domain
Custom domain support is configured through environment variables such as:
ADMIN_DOMAIN_ENABLED=true
ADMIN_DOMAIN_NAME=admin.example.com
DOMAIN_HOSTED_ZONE_NAME=example.comThe CDK stack provisions an ACM certificate and associates it with the CloudFront distribution.