Closed emileten closed 1 year ago
The user needs to compile the website code first locally, and provide the path to the compiled code directory to the construct parameters.
Ah ðŸ˜, I was hopping there was a way to automate this
The user needs to compile the website code first locally, and provide the path to the compiled code directory to the construct parameters.
Ah ðŸ˜, I was hopping there was a way to automate this
@vincentsarago it's possible -- back when I wrote this I just didn't want to spend time to try and my idea would have lead to something that's not very clean. But here it is if you want to take a look -- my last commit. The idea is simply to run within the construct, the following commands required to build the app :
- npm install
- npm run build
These commands are executed as external processes. This commit allows clients to avoid having to do this. The clients need to provide the following parameters :
@jjfrench in case you didn't see (not sure how well that feature works), I re-requested a review (addressed your comments). We should be good to merge, however I wanted to ask, did you face any issue when trying to deploy this as part of maap-eoapi ?
Add a construct defining an S3 deployment with a Radiant Earth static STAC browser.
The user needs to compile the website code first locally, and provide the path to the compiled code directory to the construct parametersThe build process is automated, see comments below. By default the bucket is deployed with no endpoint or no particular permissions ; however :cloudFrontDistributionArn
option is provided in the construct props. If provided, this ARN is granted read access to the bucket. This is useful to enable HTTPS.websiteIndexDocument
option is provided, to enable static website hosting.Bucket
andBucketDeployment
objects are accessible as fields of the construct, in case clients need to modify them (e.g. change the permissions on the bucket).