This directory contains MarchProxy-compatible configuration files for importing this application's services into MarchProxy API Gateway.
| File | Purpose |
|---|---|
services.json |
Service definitions (backends) |
mappings.json |
Route mappings (frontend routing rules) |
import-config.json |
Combined import file for bulk import |
- MarchProxy API server running and accessible
- Valid cluster API key from MarchProxy
# Set environment variables
export MARCHPROXY_API="http://localhost:8000"
export CLUSTER_API_KEY="your-cluster-api-key"
# Import using the provided script
./scripts/marchproxy-import.sh
# Or manually with curl
curl -X POST "$MARCHPROXY_API/api/v1/services/import" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $CLUSTER_API_KEY" \
-d @config/marchproxy/import-config.jsonBefore importing, update the following in all JSON files:
- Service names: Replace
projectnamewith your actual application name - IP/FQDN: Update
ip_fqdnvalues to match your Docker network service names - Ports: Adjust ports if your services use different ports
- Auth type: Configure
auth_typebased on your security requirements
| Service | Protocol | Port | Auth | Description |
|---|---|---|---|---|
| flask-api | HTTP | 8080 | JWT | External REST API |
| go-backend | gRPC | 50051 | None | Internal high-performance backend |
| webui | HTTP | 80 | None | Frontend web interface |
| Mapping | Path | Backend | Description |
|---|---|---|---|
| external-api | /api/v1/* | flask-api | REST API routing |
| webui-access | /* | webui | Frontend routing |
Use the Python configuration generator:
python scripts/generate_marchproxy_config.pyOr regenerate from your application's settings by modifying the generator script.
For full MarchProxy documentation, see: ~/code/MarchProxy/api-server/README.md