{ "module": "route-adapter", "version": "1", "slug": "radapt", "capabilities": [ "container-runtime" ], "provides": [ { "name": "route", "scope": "mesh" } ], "serves": { "route": {} }, "receives": { "route": "${dir:routes-dir}/mesh.json" }, "accesses": [ { "id": "dynamic", "path": "/services/traefik/dynamic", "mode": "read-write" } ], "resources": [ { "id": "state", "type": "directory", "mode": "0700", "place": "." }, { "id": "routes-dir", "type": "directory", "path": "/var/lib/route-adapter/routes", "mode": "0700" }, { "id": "config", "type": "file", "path": "${dir:state}/config.json", "merge": "json", "mode": "0644", "content": "{\n \"dynamic\": \"/services/traefik/dynamic\",\n \"entrypoint\": \"websecure\",\n \"certificate-resolver\": \"le\",\n \"machine\": \"host.docker.internal\"\n}\n" }, { "id": "adapt", "type": "process", "name": "route-adapter", "artifact": "code", "run": [ "node", "index.js" ], "run-once": true, "env": { "MESH_RECEIVES": "${dir:routes-dir}/mesh.json", "MESH_ROUTE_ADAPTER_CONFIG": "${dir:state}/config.json" }, "restart-on": [ "received-route", "config" ] } ], "build": { "artifacts": [ { "name": "code", "kind": "bundle", "language": "typescript", "entrypoints": [ "index.js" ] } ] } }