Skip to content

WIP to fit floci into local dev build - #105

Open
teddmason wants to merge 1 commit into
developmentfrom
feature/floci-spike
Open

WIP to fit floci into local dev build#105
teddmason wants to merge 1 commit into
developmentfrom
feature/floci-spike

Conversation

@teddmason

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 30, 2026 08:36
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 New Major Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.yml from localstack to a floci service/container.
  • Update docker helper scripts to use the /restapis/{id}/{stage}/_user_request_ base URL pattern and add creation of a hot-reload S3 bucket.
  • Add docker/scripts/test.sh and docker/scripts/test-teardown.sh for 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 thread docker/scripts/test.sh
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 thread docker/infrastructure.yml
Comment on lines +2 to 6
floci:
container_name: "floci-main"
image: floci-floci:latest
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
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.

2 participants