Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add STAC browser option #64

Merged
merged 4 commits into from
Sep 1, 2023
Merged

feat: add STAC browser option #64

merged 4 commits into from
Sep 1, 2023

Conversation

emileten
Copy link
Contributor

@emileten emileten commented Aug 22, 2023

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 parameters The build process is automated, see comments below. By default the bucket is deployed with no endpoint or no particular permissions ; however :

  • a 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.
  • a websiteIndexDocument option is provided, to enable static website hosting.
  • the Bucket and BucketDeployment objects are accessible as fields of the construct, in case clients need to modify them (e.g. change the permissions on the bucket).

@emileten emileten force-pushed the feature/stac-browser branch 3 times, most recently from e90dc28 to 9fa3442 Compare August 22, 2023 15:08
@emileten emileten self-assigned this Aug 22, 2023
@vincentsarago
Copy link
Member

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

@emileten
Copy link
Contributor Author

emileten commented Aug 23, 2023

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 :

  • the stac catalog url
  • the desired version of the radiant earth browser

Copy link
Member

@vincentsarago vincentsarago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things look great as far as I can understand 😅

lib/stac-browser/index.ts Outdated Show resolved Hide resolved
…d deleting anything and raise an error if using an existing directory does not work
@emileten emileten requested a review from jjfrench August 29, 2023 08:07
@emileten
Copy link
Contributor Author

@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 ?

@emileten emileten changed the title feat: add STAC browser option feat!: add STAC browser option Sep 1, 2023
@emileten emileten changed the title feat!: add STAC browser option feat: add STAC browser option Sep 1, 2023
@emileten emileten merged commit 36499d2 into main Sep 1, 2023
4 checks passed
@emileten emileten deleted the feature/stac-browser branch September 1, 2023 05:08
github-actions bot pushed a commit that referenced this pull request Sep 1, 2023
# [5.3.0](v5.2.0...v5.3.0) (2023-09-01)

### Features

* add STAC browser option ([#64](#64)) ([36499d2](36499d2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration of Radiant Earth's STAC-Browser with eoAPI
3 participants