feat: CommunityToolkit.Aspire.Hosting.Floci — Floci cloud emulator hosing integration#1479
Open
edmondshtogu wants to merge 4 commits into
Open
feat: CommunityToolkit.Aspire.Hosting.Floci — Floci cloud emulator hosing integration#1479edmondshtogu wants to merge 4 commits into
CommunityToolkit.Aspire.Hosting.Floci — Floci cloud emulator hosing integration#1479edmondshtogu wants to merge 4 commits into
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1479Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1479" |
edmondshtogu
marked this pull request as ready for review
July 23, 2026 12:07
Contributor
Author
|
@aaronpowell in addition to this feature I had to fix the restore issue for the security vulnerabilities caused by The PR is ready for your review, so please take a look and let me know if you have any concern. |
10 tasks
edmondshtogu
force-pushed
the
floci
branch
2 times, most recently
from
July 24, 2026 09:24
35c05a2 to
0a4e4b8
Compare
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.
Closes floci-io/floci#1242
Adds
CommunityToolkit.Aspire.Hosting.Floci— a hosting integration for Floci, a family of high-performance local cloud emulators (floci/flocifor AWS,floci/floci-azfor Azure,floci/floci-gcpfor GCP) that run as containers inside the Aspire AppHost.What's included
Core integration (
src/CommunityToolkit.Aspire.Hosting.Floci/)AddFlociAws(name, port?, defaultRegion?, defaultAccountId?)— adds the Floci AWS container with an HTTP health check at/_floci/infoAddFlociAzure(name, port?)— adds the Floci Azure container (floci/floci-az), health check at/_floci/healthAddFlociGcp(name, port?, defaultProjectId?)— adds the Floci GCP container (floci/floci-gcp), health check at/_floci-gcp/healthFlociContainerResource) that holds endpoint/connection-string plumbing, soHost,Port,PrimaryEndpoint, andConnectionStringExpressionare implemented once and inherited — not duplicated per cloudWithReferenceautomatically injects the standardConnectionStrings__<name>plus provider-specific env vars via aBeforeStartEventsubscriber; host processes receivelocalhost:{port}, containers receivehost.docker.internal:{port}:AWS_ENDPOINT_URL,AWS_DEFAULT_REGION,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEYAZURE_STORAGE_CONNECTION_STRING(well-knowndevstoreaccount1dev credentials)PUBSUB_EMULATOR_HOST,FIRESTORE_EMULATOR_HOST,DATASTORE_EMULATOR_HOST,STORAGE_EMULATOR_HOST,SECRET_MANAGER_EMULATOR_HOST,GOOGLE_CLOUD_PROJECT,CLOUDSDK_CORE_PROJECTWithDataVolume/WithDataBindMount— switches Floci from in-memory to persistent storage mode; implemented once and shared across all three cloudsWithDockerSocket— mounts the Docker socket so Lambda / Azure Functions / Cloud Run and other container-backed services can launch sibling containers; adds--add-host=host.docker.internal:host-gatewayto container dependents; shared across all three cloudsWithConfigFile(hostPath)— bind-mounts a Quarkusapplication.ymloverride at/deployments/config/application.ymlfor advanced configuration (AWS only — Azure/GCP images don't expose this)Floci UI web console (
WithFlociUI/WithPluggedCloud)WithFlociUI(configureContainer?, containerName?)— available on all three cloud resource types, adds a single sharedFlociUIContainerResourcerunningdocker.io/floci/floci-ui:0.2.0:FLOCI_ENDPOINTfor AWS,FLOCI_AZURE_ENDPOINTfor Azure,FLOCI_GCP_ENDPOINTfor GCP)/; excluded from manifest (ExcludeFromManifest())WithFlociUItwice re-configures the existing UI container instead of adding a duplicateWithPluggedCloud(cloud)— attaches an additional cloud resource to an already-created UI console, so one console can browse AWS + Azure + GCP at once instead of spinning up three separate UI containers. In C# this is a single overloaded method name; the generated TypeScript bindings expose it aswithPluggedCloudAws/withPluggedCloudAzure/withPluggedCloudGcpsince the polyglot export generator needs distinct names when all three overloads share the same target typeWithHostPort(int?)on the UI resource builder to pin the host portExamples and tests
aws.WithFlociUI(configureContainer: ui => { ui.WithPluggedCloud(azure); ui.WithPluggedCloud(gcp); }))ApiServiceexercises all three clouds end-to-end: S3 (AWS SDK), Blob Storage (Azure SDK), and Cloud Storage (GCP SDK), each with its own health check (floci-s3,floci-azure-blob,floci-gcp-storage) and a hosted service that creates a demo bucket/container on startupWithPluggedCloudattaches correctly, single UI container, correct env vars per attached cloud), the TypeScript AppHost, and Docker-gated AppHost integration tests asserting all three cloud resources and the UI resource become healthyConnectionStrings__<name>behavior alongside each cloud's provider-specific env varsPR Checklist
Other information
floci/floci,floci/floci-az,floci/floci-gcp) expose certificate-based configuration the way the earlier AWS-only prototype assumed, so that support was removed rather than shipped half-workingAWS_ENDPOINT_URLis the standard SDK v4 env var; noAmazonS3Config.RegionEndpointshould be set alongsideServiceURL(triggers aNullReferenceExceptionin the v4 endpoint rule engine — documented in the example)StorageClientis built withEmulatorDetection.EmulatorOnlyso it readsSTORAGE_EMULATOR_HOSTand skips real GCP credential resolution entirelyASPIREATS001experimental diagnostic (polyglot export attributes) is suppressed at file level in the hosting extension files