WIP to fit floci into local dev build - #105
Open
teddmason wants to merge 1 commit into
Open
Conversation
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Warning
- Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
Pull request overview
This PR updates the local development Docker setup to replace the LocalStack container with a Floci container and adjusts the supporting scripts accordingly (API Gateway base URL format, hot-reload bucket creation), while also adding a couple of ad-hoc API Gateway/Lambda test scripts.
Changes:
- Switch
docker/infrastructure.ymlfromlocalstackto aflociservice/container. - Update docker helper scripts to use the
/restapis/{id}/{stage}/_user_request_base URL pattern and add creation of ahot-reloadS3 bucket. - Add
docker/scripts/test.shanddocker/scripts/test-teardown.shfor manual LocalStack/Floci API Gateway + Lambda setup/teardown; bump package version in lockfile.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| package-lock.json | Bumps the package version recorded in the lockfile. |
| docker/scripts/test.sh | Adds a manual script to create a sample Lambda and REST API in LocalStack/Floci. |
| docker/scripts/test-teardown.sh | Adds a manual teardown script for the sample Lambda and REST API. |
| docker/scripts/register-lambda-functions.sh | Updates API Gateway base URL handling and creates the hot-reload bucket for Floci. |
| docker/scripts/register-api-gateway.sh | Renames the REST API and changes deployment/stage creation flow. |
| docker/scripts/load-dummy-data.sh | Updates the API Gateway URL used for posting dummy messages. |
| docker/infrastructure.yml | Replaces the LocalStack service definition with a Floci service definition. |
Files excluded by content exclusion policy (1)
- docker/.env
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+6
| # docker compose -f ../../docker/infrastructure.yml -f ../../docker/networks.yml up floci -d | ||
|
|
||
|
|
||
| export AWS_ENDPOINT_URL=http://localhost:4566 | ||
| export AWS_PAGER="" | ||
|
|
Comment on lines
+1
to
+4
|
|
||
| export AWS_ENDPOINT_URL=http://localhost:4566 | ||
| export AWS_PAGER="" | ||
|
|
Comment on lines
+12
to
+14
| API_ID=$(awslocal apigateway get-rest-apis \ | ||
| --query 'items[?name==`My API`].id' --output text \ | ||
| --endpoint-url $AWS_ENDPOINT_URL) |
Comment on lines
6
to
8
| lambda_functions_dir="lib/functions" | ||
| deployed_cpx_agw_url=http://$(awslocal apigateway get-rest-apis | jq -r ".items[0].id").execute-api.localhost.localstack.cloud:4566/local | ||
| deployed_cpx_agw_url=http://localhost:4566/restapis/$(awslocal apigateway get-rest-apis | jq -r ".items[0].id")/local/_user_request_ | ||
|
|
|
|
||
| echo Function URL for archiveMessages is $(awslocal lambda get-function-url-config --function-name archiveMessages | jq -r .FunctionUrl) | ||
| echo API Gateway root URL is http://$(awslocal apigateway get-rest-apis | jq -r ".items[0].id").execute-api.localhost.localstack.cloud:4566/local | ||
| echo API Gateway base URL is http://localhost:4566/restapis/$(awslocal apigateway get-rest-apis | jq -r ".items[0].id")/local/_user_request_ |
Comment on lines
10
to
12
| DATA_FILE="test/lib/functions/data/nws-alert.xml" | ||
| LAMBDA_URL=http://$(awslocal apigateway get-rest-apis | jq -r ".items[0].id").execute-api.localhost.localstack.cloud:4566/local/message | ||
| LAMBDA_URL=http://localhost:4566/restapis/$(awslocal apigateway get-rest-apis | jq -r ".items[0].id")/local/_user_request_/message | ||
|
|
Comment on lines
+41
to
+42
| deployment_id=$(awslocal apigateway create-deployment \ | ||
| --rest-api-id $cap_xml_rest_api_id | jq -r '.id') |
Comment on lines
+2
to
6
| floci: | ||
| container_name: "floci-main" | ||
| image: floci-floci:latest | ||
| ports: | ||
| - "127.0.0.1:4566:4566" # LocalStack Gateway |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




No description provided.