{ "module": "icecast", "version": "1", "requires": [ "route", "secret" ], "contributes": { "route": { "label": "icecast", "endpoint": "stream" } }, "binds": { "route": "${dir:state}/route.json" }, "secrets": { "secret": { "source": "${dir:state}/source.secret", "admin": "${dir:state}/admin.secret", "relay": "${dir:state}/relay.secret" } }, "capabilities": [ "container-runtime" ], "emits": [ "stream.started", "stream.stopped" ], "own-secrets": { "broker": "/var/lib/mesh/icecast/broker" }, "listens": [ { "name": "stream", "port": 8000, "protocol": "tcp", "from": "mesh", "why": "streams in from sources (HTTP PUT) and out to listeners, plus the status and admin pages; a public name is its route" } ], "resources": [ { "id": "mesh-state", "type": "directory", "path": "/var/lib/mesh/icecast", "mode": "0700" }, { "id": "state", "type": "directory", "mode": "0700", "place": "." }, { "id": "logs", "type": "directory", "mode": "0700", "owner": "100:101" }, { "id": "server-conf", "type": "file", "path": "${dir:state}/icecast.xml", "mode": "0600", "content": "\n \n Earth\n icemaster@localhost\n \n 100\n 2\n 524288\n 30\n 15\n 10\n 1\n 65535\n \n \n ${secret:source}\n ${secret:relay}\n admin\n ${secret:admin}\n \n \n localhost\n \n 8000\n \n \n
\n \n 1\n \n /usr/share/icecast\n /var/log/icecast\n /usr/share/icecast/web\n /usr/share/icecast/admin\n \n \n \n access.log\n error.log\n 3\n 10000\n \n \n 0\n \n \n icecast\n icecast\n \n \n\n" }, { "id": "net", "type": "network", "name": "icecast" }, { "id": "server", "type": "container", "name": "icecast", "image": "infiniteproject/icecast@sha256:cd506cf3dfe31ce05fd37d7e672dbd1213e7255cc93d28ecf5a3b547af4e162c", "network": "icecast", "ports": [ "8000" ], "volumes": [ "${dir:state}/icecast.xml:/etc/icecast.xml:ro", "${dir:logs}:/var/log/icecast" ], "restart-on": [ "server-conf" ] }, { "id": "runtime-config", "type": "file", "path": "/var/lib/mesh/icecast/config.json", "mode": "0600", "content": "{}\n", "merge": "json" }, { "id": "runtime", "type": "container", "name": "mesh-icecast", "network": "icecast", "volumes": [ "/var/lib/mesh/icecast/broker:/run/secrets/broker:ro", "/var/lib/mesh/icecast/config.json:/run/config/config.json:ro" ], "env": { "MESH_BROKER_FILE": "/run/secrets/broker", "MESH_ICECAST_URL": "http://icecast:8000", "MESH_ICECAST_CONFIG_FILE": "/run/config/config.json" }, "restart-on": [ "runtime-config" ], "artifact": "runtime" } ], "build": { "on": [ { "arg": "BUILD_BASE", "module": "mesh-tools", "artifact": "build" }, { "arg": "RUNTIME_BASE", "module": "mesh-tools", "artifact": "runtime" } ], "artifacts": [ { "name": "runtime", "kind": "image", "from": "Dockerfile" } ] } }