mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-24 14:32:27 +00:00
Update environment and infrastructure for syncos.syncrow.ae deployment
This commit is contained in:
@ -1,2 +1,2 @@
|
||||
ENV_NAME=production
|
||||
BASE_URL=https://api.syncrow.me
|
||||
BASE_URL=https://api.syncos.syncrow.ae
|
||||
|
4
build.sh
4
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"
|
||||
|
@ -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."
|
||||
}
|
||||
}
|
||||
|
@ -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", {
|
||||
|
Reference in New Issue
Block a user