- novox.be: owned www:latest container, public route novox.be (host 4000 -> app 8080). No DB, no secrets. Analog: de-spiegel/hello-web. - photos: the existing module.json was a wrong immich stub (alpine image, port 2283). Replace it with the user's real photo app: photos-server backend consuming the mesh s3-bucket (bucket photos) + mongodb-database (db photos) providers, env templated from the provisions (analog: invoicing), plus the three static client containers (admin + two family sites). Only photos.novox.be is routed: contributes.route is single-valued across the catalog, so eef/filip need their own modules (flagged).
111 lines
2.8 KiB
JSON
111 lines
2.8 KiB
JSON
{
|
|
"module": "photos",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"requires": [
|
|
"s3-bucket",
|
|
"mongodb-database",
|
|
"route"
|
|
],
|
|
"contributes": {
|
|
"s3-bucket": {
|
|
"bucket": "photos"
|
|
},
|
|
"mongodb-database": {
|
|
"name": "photos"
|
|
},
|
|
"route": {
|
|
"name": "photos.novox.be",
|
|
"port": 4001
|
|
}
|
|
},
|
|
"binds": {
|
|
"s3-bucket": "/var/lib/photos/store.json",
|
|
"mongodb-database": "/var/lib/photos/database.json",
|
|
"route": "/var/lib/photos/route.json"
|
|
},
|
|
"secrets": {
|
|
"s3-bucket": "/var/lib/photos/store.secret",
|
|
"mongodb-database": "/var/lib/photos/database.secret"
|
|
},
|
|
"listens": [
|
|
{
|
|
"port": 9000,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "the photos backend API; the client sites on the module network call it"
|
|
},
|
|
{
|
|
"port": 4001,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "the admin client site over http; the public name photos.novox.be is a route grant, and route-proxy reaches it on this published port"
|
|
}
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"path": "/var/lib/photos",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "server-env",
|
|
"type": "file",
|
|
"path": "/var/lib/photos/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=admin\nMONGO_DB=${bound:mongodb-database:as}\nMINIO_ENDPOINT=${bound:s3-bucket:at}\nMINIO_PORT=${bound:s3-bucket:port}\nMINIO_BUCKET=photos\nMINIO_ACCESSKEY=${bound:s3-bucket:as}\nMINIO_SECRET=${secret:s3-bucket}\nMINIO_USE_SSL=false\n"
|
|
},
|
|
{
|
|
"id": "net",
|
|
"type": "network",
|
|
"name": "photos"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "photos-server",
|
|
"image": "registry-api.novox.be/novox/photos-server:latest",
|
|
"network": "photos",
|
|
"env-file": [
|
|
"/var/lib/photos/server.env"
|
|
],
|
|
"ports": [
|
|
"9000"
|
|
]
|
|
},
|
|
{
|
|
"id": "admin-client",
|
|
"type": "container",
|
|
"name": "photos-admin-client",
|
|
"image": "registry-api.novox.be/novox/photos-admin-client:latest",
|
|
"network": "photos",
|
|
"ports": [
|
|
"4001:80"
|
|
]
|
|
},
|
|
{
|
|
"id": "eef-client",
|
|
"type": "container",
|
|
"name": "photos-client-eef",
|
|
"image": "registry-api.novox.be/novox/photos-client:latest",
|
|
"network": "photos",
|
|
"ports": [
|
|
"4002:80"
|
|
]
|
|
},
|
|
{
|
|
"id": "filip-client",
|
|
"type": "container",
|
|
"name": "photos-client-filip",
|
|
"image": "registry-api.novox.be/novox/photos-client:latest",
|
|
"network": "photos",
|
|
"ports": [
|
|
"4003:80"
|
|
]
|
|
}
|
|
]
|
|
}
|