Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

[DO NOT MERGE - PROTOTYPE] [Issue #22] Prototype download endpoint #68

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ coverage.*

#e2e
/test-results/

/volume
4 changes: 4 additions & 0 deletions api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ start-db:
## Destroy current DB, setup new one
db-recreate: clean-volumes init-db

# TODO
start-localstack:
docker-compose up --detach localstack

Copy link
Collaborator

@rylew1 rylew1 Jun 3, 2024

Choose a reason for hiding this comment

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

Maybe add a brief comment on the command here on what we use localstack for

Copy link
Collaborator

@rylew1 rylew1 Jun 3, 2024

Choose a reason for hiding this comment

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

Also something in the docs that explains how to spin this up and test grabbing a file locally?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was just a prototype - would add docs/connect properly in the makefile if I was going to merge this.

#########################
# DB Migrations
#########################
Expand Down
19 changes: 19 additions & 0 deletions api/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@ services:
- 'OPENSEARCH_HOSTS=["http://opensearch-node:9200"]'
- DISABLE_SECURITY_DASHBOARDS_PLUGIN=true # disables security dashboards plugin in OpenSearch Dashboards

localstack:
container_name: "${LOCALSTACK_DOCKER_NAME:-localstack-main}"
image: localstack/localstack
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
# LocalStack configuration: https://docs.localstack.cloud/references/configuration/
- DEBUG=${DEBUG:-0}
# To improve startup time, only add services we use
- SERVICES=s3
- EAGER_SERVICES_LOADING=1
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! Maybe make sure to document specific LocalStack config or requirements in the project? Though it looks all baked into the image here

We won't need a license then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Localstack has a community version that is free. Seems the main difference is which features are supported. S3 seems like its fully supported in community, so would work.


grants-api:
build:
context: .
Expand All @@ -64,6 +80,9 @@ services:
depends_on:
- grants-db
- opensearch-node
- localstack



volumes:
grantsdbdata:
Expand Down
1 change: 1 addition & 0 deletions api/myfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
i am a file
Loading