{ "module": "baserow", "version": "1", "capabilities": [ "container-runtime" ], "requires": [ "postgres-database", "route" ], "contributes": { "postgres-database": { "name": "baserow" }, "route": { "label": "baserow", "endpoint": "web" } }, "binds": { "postgres-database": "${dir:state}/database.json", "route": "${dir:state}/route.json" }, "secrets": { "postgres-database": "${dir:state}/database.secret" }, "own-secrets": { "admin": "${dir:state}/admin.secret", "broker": "${dir:mesh-state}/broker" }, "listens": [ { "name": "web", "port": 80, "protocol": "tcp", "from": "mesh", "why": "the Baserow web UI and REST API, served by the image's own Caddy; a public name is the route's" } ], "resources": [ { "id": "mesh-state", "type": "directory", "mode": "0700", "place": "mesh" }, { "id": "state", "type": "directory", "mode": "0700", "place": "." }, { "id": "data", "type": "directory", "mode": "0755", "owner": "9999:9999" }, { "id": "server-env", "type": "file", "path": "${dir:state}/server.env", "mode": "0600", "content": "DATABASE_HOST=${bound:postgres-database:at}\nDATABASE_PORT=${bound:postgres-database:port}\nDATABASE_NAME=${bound:postgres-database:as}\nDATABASE_USER=${bound:postgres-database:as}\nDATABASE_PASSWORD_FILE=/run/secrets/database\nDISABLE_EMBEDDED_PSQL=true\nBASEROW_PUBLIC_URL=https://${bound:route:name}\n" }, { "id": "net", "type": "network", "name": "baserow" }, { "id": "server", "type": "container", "name": "baserow", "image": "baserow/baserow@sha256:263ea6c4b72c9eccabcd975ffe9fdebf23913a293a514bec6a3897a5e0a5a080", "network": "baserow", "env-file": [ "${dir:state}/server.env" ], "ports": [ "80" ], "volumes": [ "${dir:data}:/baserow/data", "${dir:state}/database.secret:/run/secrets/database:ro" ] }, { "id": "runtime-config", "type": "file", "path": "${dir:mesh-state}/config.json", "mode": "0600", "content": "{\n \"password\": \"${secret:admin}\",\n \"host\": \"${bound:route:name}\"\n}\n", "merge": "json" }, { "id": "runtime", "type": "container", "name": "mesh-baserow", "network": "baserow", "volumes": [ "${dir:mesh-state}/broker:/run/secrets/broker:ro", "${dir:mesh-state}/config.json:/run/config/config.json:ro" ], "env": { "MESH_BROKER_FILE": "/run/secrets/broker", "MESH_BASEROW_URL": "http://baserow:80", "MESH_BASEROW_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" } ] } }