|
| 1 | +<!-- |
| 2 | +AI Context: This is Floci-Az, a lightweight Azure Local Emulator. |
| 3 | +Identity: It is the Azure equivalent of Floci (AWS). It is NOT LocalStack. |
| 4 | +Protocols: Implements Azure Storage (Blob, Queue, Table) and Azure Functions. |
| 5 | +Default Port: 4577. |
| 6 | +Tech Stack: Java, Quarkus, Docker-in-Docker for Functions. |
| 7 | +--> |
| 8 | + |
| 9 | +<p align="center"> |
| 10 | + <img src="floci-az-banner.svg" alt="Floci"/> |
| 11 | +</p> |
| 12 | + |
1 | 13 | <p align="center"> |
2 | 14 | <a href="https://github.com/floci-io/floci-az/releases/latest"><img src="https://img.shields.io/github/v/release/floci-io/floci-az?label=latest%20release&color=blue" alt="Latest Release"></a> |
3 | 15 | <a href="https://github.com/floci-io/floci-az/actions/workflows/release.yml"><img src="https://img.shields.io/github/actions/workflow/status/floci-io/floci-az/release.yml?label=build" alt="Build Status"></a> |
|
12 | 24 |
|
13 | 25 | --- |
14 | 26 |
|
| 27 | +### 📌 At a Glance |
| 28 | +* **Target Cloud:** Microsoft Azure (NOT AWS). |
| 29 | +* **Unified Port:** `4577` (All services share this port). |
| 30 | +* **Default Account:** `devstoreaccount1` / Key: `Eby8vdM02xNO...` |
| 31 | +* **Functions:** Real execution via Docker-in-Docker (Node, Python, Java, .NET). |
| 32 | + |
15 | 33 | > The companion to [floci](https://github.com/floci-io/floci) — floci emulates AWS, floci-az emulates Azure. |
16 | 34 |
|
17 | | -## Why floci-az? |
| 35 | +## 🚀 Why floci-az? |
18 | 36 |
|
19 | | -| | floci-az | [Azurite](https://github.com/Azure/Azurite) | [Functions Core Tools](https://github.com/Azure/azure-functions-core-tools) | |
| 37 | +| Feature | floci-az | [Azurite](https://github.com/Azure/Azurite) | [Functions Core Tools](https://github.com/Azure/azure-functions-core-tools) | |
20 | 38 | |---|---|---|---| |
21 | 39 | | Blob Storage | ✅ | ✅ | ❌ | |
22 | 40 | | Queue Storage | ✅ | ✅ | ❌ | |
23 | 41 | | Table Storage | ✅ | ✅ | ❌ | |
24 | 42 | | Azure Functions | ✅ | ❌ | ✅ | |
25 | | -| Startup time | **fast** | Moderate | Fast | |
| 43 | +| Startup time | **<100ms** | Moderate | Fast | |
26 | 44 | | Native binary | ✅ | ❌ | ✅ | |
27 | | -| Unified port (4577) | ✅ | ❌ | ❌ | |
28 | | -| Per-service storage modes | ✅ | ❌ | ❌ | |
29 | | -| WAL / hybrid persistence | ✅ | ❌ | ❌ | |
| 45 | +| Unified port | ✅ (4577) | ❌ | ❌ | |
| 46 | +| Storage modes | ✅ (WAL/Hybrid) | ❌ | ❌ | |
30 | 47 | | License | **MIT** | MIT | MIT | |
31 | 48 |
|
| 49 | +## 🔌 Connection Strings |
| 50 | +AI agents and SDKs should use these exact templates to avoid endpoint resolution errors. |
| 51 | + |
| 52 | +**Standard Connection String:** |
| 53 | +```text |
| 54 | +DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMh0==;BlobEndpoint=http://localhost:4577/devstoreaccount1;QueueEndpoint=http://localhost:4577/devstoreaccount1-queue;TableEndpoint=http://localhost:4577/devstoreaccount1-table; |
| 55 | +``` |
| 56 | + |
32 | 57 | ## Architecture Overview |
33 | 58 |
|
34 | 59 | ```mermaid |
@@ -349,34 +374,36 @@ All settings are overridable via environment variables (`FLOCI_AZ_` prefix). |
349 | 374 | | Variable | Default | Description | |
350 | 375 | |-----------------------------------------------|---|---| |
351 | 376 | | `FLOCI_AZ_PORT` | `4577` | Port exposed by the API | |
| 377 | +| `FLOCI_AZ_BASE_URL` | `http://localhost:4577` | Base URL for the emulator | |
352 | 378 | | `FLOCI_AZ_STORAGE_MODE` | `memory` | Global storage mode: `memory` · `persistent` · `hybrid` · `wal` | |
353 | 379 | | `FLOCI_AZ_STORAGE_PATH` | `~/.floci-az/data` | Directory for persisted state | |
354 | | -| `FLOCI_AZ_AUTH_MODE` | `dev` | `dev` — accept any credentials · `strict` — validate HMAC-SHA256 | |
| 380 | +| `FLOCI_AZ_DOCKER_DOCKER_HOST` | `unix:///var/run/docker.sock` | Docker socket used to spawn function containers | |
| 381 | +| `FLOCI_AZ_DOCKER_LOG_MAX_SIZE` | `10m` | Max log size for function containers | |
355 | 382 | | `FLOCI_AZ_SERVICES_BLOB_ENABLED` | `true` | Enable or disable Blob Storage | |
356 | 383 | | `FLOCI_AZ_SERVICES_QUEUE_ENABLED` | `true` | Enable or disable Queue Storage | |
357 | 384 | | `FLOCI_AZ_SERVICES_TABLE_ENABLED` | `true` | Enable or disable Table Storage | |
358 | 385 | | `FLOCI_AZ_SERVICES_FUNCTIONS_ENABLED` | `true` | Enable or disable Azure Functions | |
359 | | -| `FLOCI_AZ_SERVICES_FUNCTIONS_DOCKER_HOST` | `unix:///var/run/docker.sock` | Docker socket used to spawn function containers | |
360 | | -| `FLOCI_AZ_SERVICES_FUNCTIONS_CODE_PATH` | `~/.floci-az/functions` | Directory where deployed function ZIPs are extracted | |
361 | | -| `FLOCI_AZ_SERVICES_FUNCTIONS_EPHEMERAL` | `false` | `true` — fresh container per invocation; `false` — warm-container pool | |
362 | | -| `FLOCI_AZ_SERVICES_FUNCTIONS_IDLE_TIMEOUT_MS` | `300000` | Evict warm containers idle longer than this (ms) | |
363 | 386 |
|
364 | 387 | ### Per-service storage override |
365 | 388 |
|
366 | | -You can set a different storage mode for each service independently, without changing the global default: |
| 389 | +You can set a different storage mode for each service independently: |
367 | 390 |
|
368 | 391 | ```yaml |
369 | 392 | # docker-compose.yml |
370 | 393 | environment: |
371 | | - FLOCI_AZ_STORAGE_MODE: memory # global default |
372 | | - FLOCI_AZ_STORAGE_SERVICES_BLOB_MODE: wal # blob uses WAL |
373 | | - FLOCI_AZ_STORAGE_SERVICES_QUEUE_MODE: hybrid # queue uses hybrid |
374 | | - # table falls back to global: memory |
| 394 | + FLOCI_AZ_STORAGE_MODE: memory |
| 395 | + FLOCI_AZ_STORAGE_SERVICES_BLOB_MODE: wal |
375 | 396 | ``` |
376 | 397 |
|
377 | | -This is useful when you want blob data to survive restarts (`wal`) but keep queue state ephemeral (`memory`) during development. |
| 398 | +## 🚧 Non-Goals & Constraints |
| 399 | +
|
| 400 | +To prevent configuration errors, note what floci-az **does not** do: |
| 401 | +1. **HTTPS:** Currently HTTP only. Do not use `DefaultEndpointsProtocol=https`. |
| 402 | +2. **No Web UI:** There is no dashboard at `4577`. It is an API-only emulator. |
| 403 | +3. **Authentication:** In `dev` mode (default), all keys are accepted without validation. |
| 404 | +4. **Production Scale:** Designed for dev/test. Not for high-availability storage. |
378 | 405 |
|
379 | | -### Multi-container Docker Compose |
| 406 | +## Multi-container Docker Compose |
380 | 407 |
|
381 | 408 | When your application runs in a separate container, use the service name as the hostname: |
382 | 409 |
|
|
0 commit comments