Update environment and infrastructure for syncos.syncrow.ae deployment

This commit is contained in:
faris Aljohari
2025-07-17 20:52:29 -06:00
parent 04af38e169
commit a2695e1d76
4 changed files with 13 additions and 9 deletions

View File

@ -1,2 +1,2 @@
ENV_NAME=production
BASE_URL=https://api.syncrow.me
BASE_URL=https://api.syncos.syncrow.ae

View File

@ -4,7 +4,7 @@ set -e
REGION=${AWS_DEFAULT_REGION:-me-central-1}
ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
STACK_NAME=SyncrowWebStack
CERTIFICATE_ARN="arn:aws:acm:us-east-1:$ACCOUNT_ID:certificate/b3ea57be-9bf0-4c66-8b01-9672ef1e8530"
CERTIFICATE_ARN="arn:aws:acm:us-east-1:$ACCOUNT_ID:certificate/3b8b7b12-ba85-4f18-8224-ed247fb9542f"
echo "🧱 Building Flutter Web for PRODUCTION..."
flutter build web --target=lib/main.dart --release
@ -14,4 +14,4 @@ npx cdk deploy $STACK_NAME \
--context certificateArn=$CERTIFICATE_ARN \
--require-approval never
echo "✅ Deployment complete. Access the app at: https://app.syncrow.me"
echo "✅ Deployment complete. Access the app at: https://syncos.syncrow.ae"

View File

@ -6,5 +6,9 @@
"hosted-zone:account=482311766496:domainName=syncrow.me:region=me-central-1": {
"Id": "/hostedzone/Z02085662NLJECF4DGJV3",
"Name": "syncrow.me."
},
"hosted-zone:account=482311766496:domainName=syncrow.ae:region=me-central-1": {
"Id": "/hostedzone/Z01153152LRHQTA1370P4",
"Name": "syncrow.ae."
}
}

View File

@ -41,12 +41,12 @@ export class WebStack extends cdk.Stack {
: acm.Certificate.fromCertificateArn(
this,
"WildcardCertificate",
"arn:aws:acm:us-east-1:482311766496:certificate/b3ea57be-9bf0-4c66-8b01-9672ef1e8530"
"arn:aws:acm:us-east-1:482311766496:certificate/3b8b7b12-ba85-4f18-8224-ed247fb9542f"
);
// Get the hosted zone
const hostedZone = route53.HostedZone.fromLookup(this, "SyncrowZone", {
domainName: "syncrow.me",
domainName: "syncrow.ae",
});
const distribution = new cloudfront.Distribution(
@ -59,7 +59,7 @@ export class WebStack extends cdk.Stack {
cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
cachePolicy: cloudfront.CachePolicy.CACHING_OPTIMIZED,
},
domainNames: ["app.syncrow.me"],
domainNames: ["syncos.syncrow.ae"],
certificate: webCertificate,
defaultRootObject: "index.html",
errorResponses: [
@ -77,10 +77,10 @@ export class WebStack extends cdk.Stack {
}
);
// Create Route 53 record for app.syncrow.me
// Create Route 53 record for syncos.syncrow.ae
new route53.ARecord(this, "WebAliasRecord", {
zone: hostedZone,
recordName: "app",
recordName: "syncos",
target: route53.RecordTarget.fromAlias(
new targets.CloudFrontTarget(distribution)
),
@ -93,7 +93,7 @@ export class WebStack extends cdk.Stack {
distributionPaths: ["/*"],
});
this.distributionUrl = "https://app.syncrow.me";
this.distributionUrl = "https://syncos.syncrow.ae";
this.bucketName = bucketName;
new cdk.CfnOutput(this, "WebsiteUrl", {