{ "module": "photos", "version": "1", "capabilities": [ "container-runtime" ], "requires": [ "s3-bucket", "mongodb-database", "route" ], "contributes": { "mongodb-database": { "name": "photos" }, "route": { "api": { "label": "photos-api", "endpoint": "api" }, "admin": { "label": "photos", "endpoint": "admin" }, "eef": { "label": "eef", "endpoint": "eef" }, "filip": { "label": "filip", "endpoint": "filip" }, "flip": { "label": "flip", "endpoint": "filip" }, "filip-api": { "label": "filip-api", "endpoint": "api" } } }, "binds": { "s3-bucket": "${dir:state}/store.json", "mongodb-database": "${dir:state}/database.json", "route": "${dir:state}/route.json" }, "secrets": { "s3-bucket": "${dir:state}/store.secret", "mongodb-database": "${dir:state}/database.secret" }, "own-secrets": { "admin-key": "${dir:state}/admin-key.secret" }, "listens": [ { "name": "api", "port": 9102, "protocol": "tcp", "from": "mesh", "why": "the photos API over http, which every client site calls; reached by the proxy here under the api and filip-api routes. The machine side of the 9102:9000 mapping" }, { "name": "admin", "port": 8102, "protocol": "tcp", "from": "mesh", "why": "the admin client site over http; reached by the proxy here under the photos route" }, { "name": "filip", "port": 8103, "protocol": "tcp", "from": "mesh", "why": "the filip client site over http; reached by the proxy here under the filip and flip routes" }, { "name": "eef", "port": 8104, "protocol": "tcp", "from": "mesh", "why": "the eef client site over http; reached by the proxy here under the eef route" } ], "data": { "kept-by": { "s3-bucket": { "class": "irreplaceable", "why": "the photos themselves, uploaded by the people the sites serve: the operator's ranking (2026-10-06) — whatever their own backups, the mesh protects what it holds" }, "mongodb-database": { "class": "irreplaceable", "why": "the albums, captions and order the photos are shown in" } } }, "resources": [ { "id": "state", "type": "directory", "mode": "0700", "place": "." }, { "id": "server-env", "type": "file", "path": "${dir:state}/server.env", "mode": "0600", "content": "NODE_ENV=production\nPORT=9000\nMONGO_URL=mongodb://${bound:mongodb-database:as}:${secret:mongodb-database}@${bound:mongodb-database:at}:${bound:mongodb-database:port}/${bound:mongodb-database:as}?authSource=${bound:mongodb-database:as}\nMONGO_DB=${bound:mongodb-database:as}\nMINIO_ENDPOINT=${bound:s3-bucket:at}\nMINIO_PORT=${bound:s3-bucket:port}\nMINIO_BUCKET=${bound:s3-bucket:bucket}\nMINIO_ACCESSKEY=${bound:s3-bucket:as}\nMINIO_SECRET=${secret:s3-bucket}\nMINIO_USE_SSL=false\nSUPER_ADMIN_KEY=${secret:admin-key}\n" }, { "id": "client-env", "type": "file", "path": "${dir:state}/client.env", "mode": "0644", "content": "REACT_APP_API_URL=https://${bound:route:name-api}\n" }, { "id": "net", "type": "network", "name": "photos" }, { "id": "server", "type": "container", "name": "photos-server", "artifact": "server", "network": "photos", "env-file": [ "${dir:state}/server.env" ], "ports": [ "9102:9000" ], "secrets-in-environment": "the application's own code reads MONGO_URL, MINIO_SECRET and SUPER_ADMIN_KEY from the environment (server/src/config.js); converting is this repository's change, tracked but not blocking the mesh conversion" }, { "id": "admin", "type": "container", "name": "photos-admin", "artifact": "admin-client", "network": "photos", "env-file": [ "${dir:state}/client.env" ], "ports": [ "8102:80" ] }, { "id": "eef", "type": "container", "name": "photos-eef", "artifact": "client", "network": "photos", "env-file": [ "${dir:state}/client.env" ], "ports": [ "8104:80" ] }, { "id": "filip", "type": "container", "name": "photos-filip", "artifact": "client", "network": "photos", "env-file": [ "${dir:state}/client.env" ], "ports": [ "8103:80" ] } ], "build": { "on": [ { "arg": "NODE_BASE", "image": "node@sha256:48e4b67d85f87bd551df43704e24d252f56cc5f8e9718841aace50f19948f0f9" } ], "artifacts": [ { "name": "server", "kind": "image", "from": "server/Dockerfile" }, { "name": "client", "kind": "image", "from": "client/Dockerfile" }, { "name": "admin-client", "kind": "image", "from": "admin-client/Dockerfile" } ] } }