'going to handle buckets manually'
1 file changed, +1 -13
+1-13buildspec.yml
| @@ -4,9 +4,6 @@ env: | ||
| 4 | 4 | variables: |
| 5 | 5 | REACT_APP_BASE_URL: "http://localhost:5001/" |
| 6 | 6 | CLOUDFRONT_ID: "E1VDTBR7TV8GO0" |
| 7 | - FRONTEND_BUCKET: "hygo.real-e-state.frontend" | |
| 8 | - CACHE_BUCKET: "hygo.real-e-state.cache" | |
| 9 | - ARTIFACT_BUCKET: "hygo.real-e-state.artifacts" | |
| 10 | 7 | |
| 11 | 8 | phases: |
| 12 | 9 | install: |
| @@ -14,15 +11,6 @@ phases: | ||
| 14 | 11 | - echo Installing dependencies... |
| 15 | 12 | - cd Client && npm i |
| 16 | 13 | - cd ../server && npm i |
| 17 | - - echo Ensuring artifact bucket | |
| 18 | - - aws s3api create-bucket --bucket $ARTIFACT_BUCKET --create-bucket-configuration LocationConstraint=us-west-1 | |
| 19 | - - echo Ensuring cache bucket | |
| 20 | - - aws s3api create-bucket --bucket $CACHE_BUCKET --create-bucket-configuration LocationConstraint=us-west-1 | |
| 21 | - - echo Ensuring frontend bucket | |
| 22 | - - aws s3api create-bucket --bucket $FRONTEND_BUCKET --create-bucket-configuration LocationConstraint=us-west-1 | |
| 23 | - - aws s3api delete-public-access-block --bucket $FRONTEND_BUCKET | |
| 24 | - - aws s3api put-bucket-policy --bucket $FRONTEND_BUCKET --policy file://Client/bucket-policy.json | |
| 25 | - - aws s3 website --bucket $FRONTEND_BUCKET --index index.html --error index.html | |
| 26 | 14 | |
| 27 | 15 | build: |
| 28 | 16 | commands: |
| @@ -35,7 +23,7 @@ phases: | ||
| 35 | 23 | # Copy the build output to your S3 bucket |
| 36 | 24 | - echo Copying build files to S3 bucket... |
| 37 | 25 | - aws s3 website |
| 38 | - - aws s3 sync ./Client/build/ "s3://$FRONTEND_BUCKET/" --delete | |
| 26 | + - aws s3 sync ./Client/build/ "s3://hygo.real.e-state/" --delete | |
| 39 | 27 | cache: |
| 40 | 28 | paths: |
| 41 | 29 | - Client/node_modules |