mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 14:47:23 +00:00
Adds CDK deployment instructions and updates region
Enhances the README with CDK deployment commands.
This commit is contained in:
@ -24,4 +24,13 @@ samples, guidance on mobile development, and a full API reference.
|
||||
|
||||
- run command: `flutter run -d chrome --target=lib/main_dev.dart`
|
||||
|
||||
## CDK Deployment
|
||||
|
||||
• Bootstrap CDK (first time only): npx cdk bootstrap aws://482311766496/me-central-1
|
||||
• List available stacks: npx cdk list
|
||||
• Deploy web: npx cdk deploy --require-approval never
|
||||
• View changes before deploy: npx cdk diff
|
||||
• Generate CloudFormation template: npx cdk synth
|
||||
• Destroy infrastructure: npx cdk destroy
|
||||
• Web infrastructure is configured in infrastructure/web-stack.ts
|
||||
• After code changes: build Flutter web app and deploy to hosting service
|
||||
|
@ -8,7 +8,7 @@ const app = new cdk.App();
|
||||
new WebStack(app, 'SyncrowWebStack', {
|
||||
env: {
|
||||
account: process.env.CDK_DEFAULT_ACCOUNT,
|
||||
region: process.env.CDK_DEFAULT_REGION || 'us-east-2',
|
||||
region: 'me-central-1',
|
||||
},
|
||||
certificateArn: app.node.tryGetContext('certificateArn'),
|
||||
});
|
||||
|
@ -2,5 +2,9 @@
|
||||
"hosted-zone:account=482311766496:domainName=syncrow.me:region=us-east-2": {
|
||||
"Id": "/hostedzone/Z02085662NLJECF4DGJV3",
|
||||
"Name": "syncrow.me."
|
||||
},
|
||||
"hosted-zone:account=482311766496:domainName=syncrow.me:region=me-central-1": {
|
||||
"Id": "/hostedzone/Z02085662NLJECF4DGJV3",
|
||||
"Name": "syncrow.me."
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ export class WebStack extends cdk.Stack {
|
||||
autoDeleteObjects: true,
|
||||
});
|
||||
|
||||
// Use existing wildcard certificate in us-east-1
|
||||
// Use existing wildcard certificate in us-east-1 (required for CloudFront)
|
||||
const webCertificate = props?.certificateArn
|
||||
? acm.Certificate.fromCertificateArn(this, 'WildcardCertificate', props.certificateArn)
|
||||
: acm.Certificate.fromCertificateArn(this, 'WildcardCertificate',
|
||||
|
Reference in New Issue
Block a user