{
  "manifest_version": "1.0.0",
  "template": {
    "id": "dc56a4ce-04a4-4e28-af4f-56d3d1bcf187",
    "slug": "monoscope",
    "name": "Monoscope",
    "description": "API-first monitoring and observability platform for engineers.",
    "url": "https://railway.com/deploy/monoscope",
    "upstream": {
      "repo_url": "https://github.com/OpenSource-Templates/Monoscope"
    }
  },
  "services": [
    {
      "name": "monoscope",
      "source": {
        "repo": "https://github.com/OpenSource-Templates/Monoscope"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "timescaledb",
      "source": {
        "repo": "https://github.com/OpenSource-Templates/Monoscope"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "DOMAIN",
      "service": "monoscope",
      "description": "Public domain where Betterlytics is accessible. Railway automatically provides this domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_HOST",
      "service": "monoscope",
      "description": "Private DNS used by the IPv6 wait-for probe.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_PORT",
      "service": "monoscope",
      "description": "TimescaleDB port on the private network.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "HOST_URL",
      "service": "monoscope",
      "description": "Public HTTPS origin. Railway terminates TLS; the container speaks HTTP.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "GRPC_PORT",
      "service": "monoscope",
      "description": "In-container OTLP gRPC port. Not the public HTTP PORT.",
      "secret": false,
      "strategy": "default",
      "default": "4317"
    },
    {
      "key": "LOG_LEVEL",
      "service": "monoscope",
      "description": "Production log level. Trace is too noisy.",
      "secret": false,
      "strategy": "default",
      "default": "Info"
    },
    {
      "key": "ENVIRONMENT",
      "service": "monoscope",
      "description": "Deployment environment: DEV, STAGING, or PROD.",
      "secret": false,
      "strategy": "default",
      "default": "PROD"
    },
    {
      "key": "DATABASE_URL",
      "service": "monoscope",
      "description": "libpq keyword form — safe with IPv6 hostnames and unescaped passwords.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "AUTH0_CALLBACK",
      "service": "monoscope",
      "description": "Auth0 callback. Used only if Auth0 is configured.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "MIGRATIONS_DIR",
      "service": "monoscope",
      "description": "Migration path inside the image.",
      "secret": false,
      "strategy": "default",
      "default": "/opt/monoscope/static/migrations/"
    },
    {
      "key": "SHOW_DEMO_PROJECT",
      "service": "monoscope",
      "description": "Hide the bundled demo project.",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "TIMEFUSION_PG_URL",
      "service": "monoscope",
      "description": "Second pool; same TimescaleDB. The process always opens this pool.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "BASIC_AUTH_ENABLED",
      "service": "monoscope",
      "description": "Enable self-host username/password login.",
      "secret": false,
      "strategy": "default",
      "default": "True"
    },
    {
      "key": "SLACK_REDIRECT_URI",
      "service": "monoscope",
      "description": "Slack OAuth callback. Used only if Slack is configured.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BASIC_AUTH_PASSWORD",
      "service": "monoscope",
      "description": "Generated once on this service. Copy from Variables after deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "BASIC_AUTH_USERNAME",
      "service": "monoscope",
      "description": "First UI login username.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "LOGGING_DESTINATION",
      "service": "monoscope",
      "description": "Send application logs to container stdout.",
      "secret": false,
      "strategy": "default",
      "default": "StdOut"
    },
    {
      "key": "AUTH0_LOGOUT_REDIRECT",
      "service": "monoscope",
      "description": "Auth0 logout target. Used only if Auth0 is configured.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ENABLE_PUBSUB_SERVICE",
      "service": "monoscope",
      "description": "No Kafka or Pub/Sub in this kit.",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "ENABLE_BACKGROUND_JOBS",
      "service": "monoscope",
      "description": "Anomaly detection, reports, and maintenance jobs.",
      "secret": false,
      "strategy": "default",
      "default": "True"
    },
    {
      "key": "ENABLE_TIMEFUSION_READS",
      "service": "monoscope",
      "description": "Query TimescaleDB, not TimeFusion.",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "ENABLE_OTLP_GRPC_SERVICE",
      "service": "monoscope",
      "description": "Bind the OpenTelemetry gRPC listener on GRPC_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "True"
    },
    {
      "key": "ENABLE_TIMEFUSION_WRITES",
      "service": "monoscope",
      "description": "TimeFusion is not deployed in this kit.",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "ENABLE_BROWSER_MONITORING",
      "service": "monoscope",
      "description": "Show browser spans in the UI.",
      "secret": false,
      "strategy": "default",
      "default": "True"
    },
    {
      "key": "API_KEY_ENCRYPTION_SECRET_KEY",
      "service": "monoscope",
      "description": "Encrypts stored API keys. Min 32 chars. Do not rotate casually.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MIGRATE_AND_INITIALIZE_ON_START",
      "service": "monoscope",
      "description": "Run SQL migrations on boot before serving traffic.",
      "secret": false,
      "strategy": "default",
      "default": "True"
    },
    {
      "key": "ENABLE_POSTGRES_TELEMETRY_WRITES",
      "service": "monoscope",
      "description": "Write logs, traces, and metrics into TimescaleDB.",
      "secret": false,
      "strategy": "default",
      "default": "True"
    },
    {
      "key": "TZ",
      "service": "timescaledb",
      "description": "Database timezone.",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "PGDATA",
      "service": "timescaledb",
      "description": "Data directory. Must sit under the volume mount /var/lib/postgresql.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data"
    },
    {
      "key": "POSTGRES_DB",
      "service": "timescaledb",
      "description": "Database name. Keep in sync with DATABASE_URL on monoscope.",
      "secret": false,
      "strategy": "default",
      "default": "monoscope"
    },
    {
      "key": "POSTGRES_USER",
      "service": "timescaledb",
      "description": "Superuser. Keep in sync with DATABASE_URL on monoscope.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "timescaledb",
      "description": "Generated once on this service. Referenced by monoscope.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "monoscope"
      }
    },
    "cli": "railway deploy --template monoscope",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "dc56a4ce-04a4-4e28-af4f-56d3d1bcf187",
            "serializedConfig": {
              "services": {
                "3eeeaaf3-af8c-4dfa-afee-21d35db94a60": {
                  "icon": "https://monoscope.tech/static/apple-touch-icon.png",
                  "name": "monoscope",
                  "source": {
                    "repo": "OpenSource-Templates/Monoscope",
                    "rootDirectory": "/monoscope"
                  },
                  "variables": {
                    "DOMAIN": {
                      "description": "Public domain where Betterlytics is accessible. Railway automatically provides this domain.",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DB_HOST": {
                      "description": "Private DNS used by the IPv6 wait-for probe.",
                      "defaultValue": "${{timescaledb.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_PORT": {
                      "description": "TimescaleDB port on the private network.",
                      "defaultValue": "5432"
                    },
                    "HOST_URL": {
                      "description": "Public HTTPS origin. Railway terminates TLS; the container speaks HTTP.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "GRPC_PORT": {
                      "description": "In-container OTLP gRPC port. Not the public HTTP PORT.",
                      "defaultValue": "4317"
                    },
                    "LOG_LEVEL": {
                      "description": "Production log level. Trace is too noisy.",
                      "defaultValue": "Info"
                    },
                    "ENVIRONMENT": {
                      "description": "Deployment environment: DEV, STAGING, or PROD.",
                      "defaultValue": "PROD"
                    },
                    "DATABASE_URL": {
                      "description": "libpq keyword form — safe with IPv6 hostnames and unescaped passwords.",
                      "defaultValue": "host=${{timescaledb.RAILWAY_PRIVATE_DOMAIN}} user=postgres password=${{timescaledb.POSTGRES_PASSWORD}} dbname=monoscope port=5432 sslmode=disable"
                    },
                    "AUTH0_CALLBACK": {
                      "description": "Auth0 callback. Used only if Auth0 is configured.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}/auth_callback"
                    },
                    "MIGRATIONS_DIR": {
                      "description": "Migration path inside the image.",
                      "defaultValue": "/opt/monoscope/static/migrations/"
                    },
                    "SHOW_DEMO_PROJECT": {
                      "description": "Hide the bundled demo project.",
                      "defaultValue": "False"
                    },
                    "TIMEFUSION_PG_URL": {
                      "description": "Second pool; same TimescaleDB. The process always opens this pool.",
                      "defaultValue": "host=${{timescaledb.RAILWAY_PRIVATE_DOMAIN}} user=postgres password=${{timescaledb.POSTGRES_PASSWORD}} dbname=monoscope port=5432 sslmode=disable"
                    },
                    "BASIC_AUTH_ENABLED": {
                      "description": "Enable self-host username/password login.",
                      "defaultValue": "True"
                    },
                    "SLACK_REDIRECT_URI": {
                      "description": "Slack OAuth callback. Used only if Slack is configured.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}/slack/oauth/callback/"
                    },
                    "BASIC_AUTH_PASSWORD": {
                      "description": "Generated once on this service. Copy from Variables after deploy.",
                      "defaultValue": "{{BASIC_AUTH_PASSWORD}}"
                    },
                    "BASIC_AUTH_USERNAME": {
                      "description": "First UI login username.",
                      "defaultValue": "admin"
                    },
                    "LOGGING_DESTINATION": {
                      "description": "Send application logs to container stdout.",
                      "defaultValue": "StdOut"
                    },
                    "AUTH0_LOGOUT_REDIRECT": {
                      "description": "Auth0 logout target. Used only if Auth0 is configured.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "ENABLE_PUBSUB_SERVICE": {
                      "description": "No Kafka or Pub/Sub in this kit.",
                      "defaultValue": "False"
                    },
                    "ENABLE_BACKGROUND_JOBS": {
                      "description": "Anomaly detection, reports, and maintenance jobs.",
                      "defaultValue": "True"
                    },
                    "ENABLE_TIMEFUSION_READS": {
                      "description": "Query TimescaleDB, not TimeFusion.",
                      "defaultValue": "False"
                    },
                    "ENABLE_OTLP_GRPC_SERVICE": {
                      "description": "Bind the OpenTelemetry gRPC listener on GRPC_PORT.",
                      "defaultValue": "True"
                    },
                    "ENABLE_TIMEFUSION_WRITES": {
                      "description": "TimeFusion is not deployed in this kit.",
                      "defaultValue": "False"
                    },
                    "ENABLE_BROWSER_MONITORING": {
                      "description": "Show browser spans in the UI.",
                      "defaultValue": "True"
                    },
                    "API_KEY_ENCRYPTION_SECRET_KEY": {
                      "description": "Encrypts stored API keys. Min 32 chars. Do not rotate casually.",
                      "defaultValue": "{{API_KEY_ENCRYPTION_SECRET_KEY}}"
                    },
                    "MIGRATE_AND_INITIALIZE_ON_START": {
                      "description": "Run SQL migrations on boot before serving traffic.",
                      "defaultValue": "True"
                    },
                    "ENABLE_POSTGRES_TELEMETRY_WRITES": {
                      "description": "Write logs, traces, and metrics into TimescaleDB.",
                      "defaultValue": "True"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "949fa66f-0428-475a-aaf4-7e664c0959b0": {
                  "icon": "https://devicons.railway.com/i/timescale-light.svg",
                  "name": "timescaledb",
                  "source": {
                    "repo": "OpenSource-Templates/Monoscope",
                    "rootDirectory": "/timescaledb"
                  },
                  "variables": {
                    "TZ": {
                      "description": "Database timezone.",
                      "defaultValue": "UTC"
                    },
                    "PGDATA": {
                      "description": "Data directory. Must sit under the volume mount /var/lib/postgresql.",
                      "defaultValue": "/var/lib/postgresql/data"
                    },
                    "POSTGRES_DB": {
                      "description": "Database name. Keep in sync with DATABASE_URL on monoscope.",
                      "defaultValue": "monoscope"
                    },
                    "POSTGRES_USER": {
                      "description": "Superuser. Keep in sync with DATABASE_URL on monoscope.",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "description": "Generated once on this service. Referenced by monoscope.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "949fa66f-0428-475a-aaf4-7e664c0959b0": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T01:38:25.686Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_49223f9b536447bc9c16",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 325,
    "typical_build_seconds": 41,
    "typical_start_seconds": 10,
    "slowest_service": "monoscope"
  }
}
