diff --git a/.env.production b/.env.production index 958a3ea6..bbcb437f 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,2 @@ ENV_NAME=production -BASE_URL=https://api.syncrow.me +BASE_URL=https://api.syncos.syncrow.ae diff --git a/build.sh b/build.sh index d004fe24..90d174d5 100644 --- a/build.sh +++ b/build.sh @@ -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" diff --git a/cdk.context.json b/cdk.context.json index d7f0d5de..2d905675 100644 --- a/cdk.context.json +++ b/cdk.context.json @@ -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." } } diff --git a/infrastructure/web-stack.ts b/infrastructure/web-stack.ts index 25f98896..d43fa7e9 100644 --- a/infrastructure/web-stack.ts +++ b/infrastructure/web-stack.ts @@ -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", {