Skip to content

Commit

Permalink
add envs info
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Dec 18, 2024
1 parent e4a3f5e commit 7d84b5b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ AWS_DEFAULT_REGION=us-east-1 AWS_REGION=us-east-1 AWS_PROFILE=myprofile npm --pr

Set environment variable or hard code in `infrastructure/aws/.env` file (e.g `STACK_STAGE=testing`).

NOTE: At the time of writing this readme, 2 environment variables are mandatory in order to use the API:
- TITILER_OPENEO_STAC_API_URL ("https://stac.eoapi.dev" or "https://stac.dataspace.copernicus.eu/v1")
- TITILER_OPENEO_SERVICE_STORE_URL ("/var/task/services/eoapi.json" or "/var/task/services/copernicus.json")

3. Pre-Generate CFN template

```bash
Expand All @@ -40,8 +44,8 @@ npm --prefix infrastructure/aws run cdk -- synth # Synthesizes and prints the C
4. Deploy

```bash
STACK_STAGE=staging npm --prefix infrastructure/aws run cdk -- deploy titiler-multidim-staging
STACK_STAGE=staging npm --prefix infrastructure/aws run cdk -- deploy titiler-openeo-staging

# Deploy in specific region
AWS_DEFAULT_REGION=us-west-2 AWS_REGION=us-west-2 AWS_PROFILE=prof npm --prefix infrastructure/aws run cdk -- deploy titiler-multidim-production
AWS_DEFAULT_REGION=us-west-2 AWS_REGION=us-west-2 AWS_PROFILE=prof npm --prefix infrastructure/aws run cdk -- deploy titiler-openeo-production
```
6 changes: 6 additions & 0 deletions infrastructure/aws/lambda/lambda.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ COPY services/eoapi.json /asset/eoapi.json

WORKDIR /asset

# Set the ENV to test the handler
ENV TITILER_OPENEO_STAC_API_URL="https://stac.eoapi.dev"
ENV TITILER_OPENEO_SERVICE_STORE_URL="services/eoapi.json"

RUN python -c "from handler import handler; print('All Good')"

CMD ["echo", "hello world"]

0 comments on commit 7d84b5b

Please sign in to comment.