{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c57825e4-1913-439a-a6ab-14c109bfcec1",
    "slug": "lago-billing-platform",
    "name": "Lago",
    "description": "Usage-based billing software that meters usage and sends invoices",
    "url": "https://railway.com/deploy/lago-billing-platform",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/lago-railway"
    }
  },
  "services": [
    {
      "name": "lago-events-worker",
      "source": {
        "repo": "https://github.com/gridalpha/lago-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "lago-api",
      "source": {
        "repo": "https://github.com/gridalpha/lago-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "lago-worker",
      "source": {
        "repo": "https://github.com/gridalpha/lago-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "lago-front",
      "source": {
        "image": "getlago/front:v1.51.0"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "lago-clock",
      "source": {
        "repo": "https://github.com/gridalpha/lago-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "lago-pdf",
      "source": {
        "image": "getlago/lago-gotenberg:8.15"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "lago-postgres",
      "source": {
        "repo": "https://github.com/gridalpha/lago-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "lago-events-worker",
      "description": "Sidekiq liveness endpoint port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "LAGO_ROLE",
      "service": "lago-events-worker",
      "description": "Runs Sidekiq on the events queue only",
      "secret": false,
      "strategy": "default",
      "default": "events-worker"
    },
    {
      "key": "RAILS_ENV",
      "service": "lago-events-worker",
      "description": "Rails environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "lago-events-worker",
      "description": "Sidekiq queue Redis",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "lago-events-worker",
      "description": "PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_API_URL",
      "service": "lago-events-worker",
      "description": "Public API base URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LAGO_PDF_URL",
      "service": "lago-events-worker",
      "description": "Private PDF renderer endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DATABASE_POOL",
      "service": "lago-events-worker",
      "description": "ActiveRecord connections per process",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "LAGO_FRONT_URL",
      "service": "lago-events-worker",
      "description": "Dashboard URL used in links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SIDEKIQ_EVENTS",
      "service": "lago-events-worker",
      "description": "This worker consumes the events queue",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_USE_AWS_S3",
      "service": "lago-events-worker",
      "description": "Store PDFs in object storage",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "lago-events-worker",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_SIDEKIQ_WEB",
      "service": "lago-events-worker",
      "description": "No Sidekiq admin UI",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "LAGO_AWS_S3_BUCKET",
      "service": "lago-events-worker",
      "description": "Bucket holding invoice PDFs",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_AWS_S3_REGION",
      "service": "lago-events-worker",
      "description": "Bucket region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_DISABLE_SIGNUP",
      "service": "lago-events-worker",
      "description": "Close public registration",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RAILS_LOG_TO_STDOUT",
      "service": "lago-events-worker",
      "description": "Send logs to the deploy log",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SIDEKIQ_CONCURRENCY",
      "service": "lago-events-worker",
      "description": "Sidekiq threads",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "LAGO_AWS_S3_ENDPOINT",
      "service": "lago-events-worker",
      "description": "Object storage endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_DISABLE_SEGMENT",
      "service": "lago-events-worker",
      "description": "Disable anonymous product analytics",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_REDIS_CACHE_URL",
      "service": "lago-events-worker",
      "description": "Cache on a separate Redis database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_AWS_S3_PATH_STYLE",
      "service": "lago-events-worker",
      "description": "Use path-style bucket addressing",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_AWS_S3_ACCESS_KEY_ID",
      "service": "lago-events-worker",
      "description": "Object storage access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_ENCRYPTION_PRIMARY_KEY",
      "service": "lago-events-worker",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_AWS_S3_SECRET_ACCESS_KEY",
      "service": "lago-events-worker",
      "description": "Object storage secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_ENCRYPTION_DETERMINISTIC_KEY",
      "service": "lago-events-worker",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_ENCRYPTION_KEY_DERIVATION_SALT",
      "service": "lago-events-worker",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "lago-events-worker",
      "description": "Graceful shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "PORT",
      "service": "lago-api",
      "description": "HTTP port the API listens on",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "LAGO_ROLE",
      "service": "lago-api",
      "description": "Runs the Rails API and migrations",
      "secret": false,
      "strategy": "default",
      "default": "api"
    },
    {
      "key": "RAILS_ENV",
      "service": "lago-api",
      "description": "Rails environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "lago-api",
      "description": "Sidekiq and ActionCable Redis",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "lago-api",
      "description": "PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_API_URL",
      "service": "lago-api",
      "description": "Public API base URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LAGO_PDF_URL",
      "service": "lago-api",
      "description": "Private PDF renderer endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DATABASE_POOL",
      "service": "lago-api",
      "description": "ActiveRecord connections per process",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "LAGO_ORG_NAME",
      "service": "lago-api",
      "description": "Organization name",
      "secret": false,
      "strategy": "default",
      "default": "My Company"
    },
    {
      "key": "LAGO_FRONT_URL",
      "service": "lago-api",
      "description": "Dashboard origin allowed by CORS",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SIDEKIQ_EVENTS",
      "service": "lago-api",
      "description": "Route ingestion to the event worker",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_CREATE_ORG",
      "service": "lago-api",
      "description": "Seed the organization on first boot",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_USE_AWS_S3",
      "service": "lago-api",
      "description": "Store PDFs in object storage",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "lago-api",
      "description": "Rails session and cookie signing key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WEB_CONCURRENCY",
      "service": "lago-api",
      "description": "Puma worker processes",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "LAGO_SIDEKIQ_WEB",
      "service": "lago-api",
      "description": "Keep the Sidekiq admin UI off the public API",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "RAILS_MAX_THREADS",
      "service": "lago-api",
      "description": "Puma threads per worker process",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "LAGO_AWS_S3_BUCKET",
      "service": "lago-api",
      "description": "Bucket holding invoice PDFs",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_AWS_S3_REGION",
      "service": "lago-api",
      "description": "Bucket region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_DISABLE_SIGNUP",
      "service": "lago-api",
      "description": "Close public registration",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_ORG_USER_EMAIL",
      "service": "lago-api",
      "description": "First admin email",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.dev"
    },
    {
      "key": "RAILS_LOG_TO_STDOUT",
      "service": "lago-api",
      "description": "Send logs to the deploy log",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_AWS_S3_ENDPOINT",
      "service": "lago-api",
      "description": "Object storage endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_DISABLE_SEGMENT",
      "service": "lago-api",
      "description": "Disable anonymous product analytics",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_REDIS_CACHE_URL",
      "service": "lago-api",
      "description": "Cache on a separate Redis database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_AWS_S3_PATH_STYLE",
      "service": "lago-api",
      "description": "Use path-style bucket addressing",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_ORG_USER_PASSWORD",
      "service": "lago-api",
      "description": "First admin password, change after login",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "LAGO_AWS_S3_ACCESS_KEY_ID",
      "service": "lago-api",
      "description": "Object storage access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_ENCRYPTION_PRIMARY_KEY",
      "service": "lago-api",
      "description": "At-rest encryption key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LAGO_AWS_S3_SECRET_ACCESS_KEY",
      "service": "lago-api",
      "description": "Object storage secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_ENCRYPTION_DETERMINISTIC_KEY",
      "service": "lago-api",
      "description": "Deterministic encryption key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LAGO_ENCRYPTION_KEY_DERIVATION_SALT",
      "service": "lago-api",
      "description": "Encryption key derivation salt",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "lago-api",
      "description": "Graceful shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Auth password, read by the server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory, a subdirectory of the volume mount",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private hostname, reachable only inside the project",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Standard PostgreSQL port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "libpq alias of the superuser name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "libpq alias of the default database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "libpq alias of the superuser password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string, use this from other services",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity window of the generated self-signed TLS certificate",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public connection string over the TCP proxy, for external tools",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Grace period for in-flight connections on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "lago-worker",
      "description": "Sidekiq liveness endpoint port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "LAGO_ROLE",
      "service": "lago-worker",
      "description": "Runs Sidekiq on the default queues",
      "secret": false,
      "strategy": "default",
      "default": "worker"
    },
    {
      "key": "RAILS_ENV",
      "service": "lago-worker",
      "description": "Rails environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "lago-worker",
      "description": "Sidekiq queue Redis",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "lago-worker",
      "description": "PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_API_URL",
      "service": "lago-worker",
      "description": "Public API base URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LAGO_PDF_URL",
      "service": "lago-worker",
      "description": "Private PDF renderer endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DATABASE_POOL",
      "service": "lago-worker",
      "description": "ActiveRecord connections per process",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "LAGO_FRONT_URL",
      "service": "lago-worker",
      "description": "Dashboard URL used in links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SIDEKIQ_EVENTS",
      "service": "lago-worker",
      "description": "Route ingestion to the event worker",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_USE_AWS_S3",
      "service": "lago-worker",
      "description": "Store PDFs in object storage",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "lago-worker",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_SIDEKIQ_WEB",
      "service": "lago-worker",
      "description": "No Sidekiq admin UI",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "LAGO_AWS_S3_BUCKET",
      "service": "lago-worker",
      "description": "Bucket holding invoice PDFs",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_AWS_S3_REGION",
      "service": "lago-worker",
      "description": "Bucket region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_DISABLE_SIGNUP",
      "service": "lago-worker",
      "description": "Close public registration",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RAILS_LOG_TO_STDOUT",
      "service": "lago-worker",
      "description": "Send logs to the deploy log",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SIDEKIQ_CONCURRENCY",
      "service": "lago-worker",
      "description": "Sidekiq threads",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "LAGO_AWS_S3_ENDPOINT",
      "service": "lago-worker",
      "description": "Object storage endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_DISABLE_SEGMENT",
      "service": "lago-worker",
      "description": "Disable anonymous product analytics",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_REDIS_CACHE_URL",
      "service": "lago-worker",
      "description": "Cache on a separate Redis database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_AWS_S3_PATH_STYLE",
      "service": "lago-worker",
      "description": "Use path-style bucket addressing",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_AWS_S3_ACCESS_KEY_ID",
      "service": "lago-worker",
      "description": "Object storage access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_ENCRYPTION_PRIMARY_KEY",
      "service": "lago-worker",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_AWS_S3_SECRET_ACCESS_KEY",
      "service": "lago-worker",
      "description": "Object storage secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_ENCRYPTION_DETERMINISTIC_KEY",
      "service": "lago-worker",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_ENCRYPTION_KEY_DERIVATION_SALT",
      "service": "lago-worker",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "lago-worker",
      "description": "Graceful shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "PORT",
      "service": "lago-front",
      "description": "nginx listening port",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "API_URL",
      "service": "lago-front",
      "description": "API the dashboard calls",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "APP_ENV",
      "service": "lago-front",
      "description": "Front-end build environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "LAGO_DOMAIN",
      "service": "lago-front",
      "description": "Public dashboard URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LAGO_DISABLE_SIGNUP",
      "service": "lago-front",
      "description": "Hide the sign-up form",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_OAUTH_PROXY_URL",
      "service": "lago-front",
      "description": "Google and Okta login proxy",
      "secret": false,
      "strategy": "default",
      "default": "https://proxy.getlago.com"
    },
    {
      "key": "LAGO_DISABLE_PDF_GENERATION",
      "service": "lago-front",
      "description": "Keep invoice PDF downloads enabled",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "lago-front",
      "description": "Graceful shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "15"
    },
    {
      "key": "LAGO_ROLE",
      "service": "lago-clock",
      "description": "Runs the Clockwork scheduler",
      "secret": false,
      "strategy": "default",
      "default": "clock"
    },
    {
      "key": "RAILS_ENV",
      "service": "lago-clock",
      "description": "Rails environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "lago-clock",
      "description": "Redis used to enqueue jobs",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "lago-clock",
      "description": "PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_API_URL",
      "service": "lago-clock",
      "description": "Public API base URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LAGO_PDF_URL",
      "service": "lago-clock",
      "description": "Private PDF renderer endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DATABASE_POOL",
      "service": "lago-clock",
      "description": "ActiveRecord connections per process",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "LAGO_FRONT_URL",
      "service": "lago-clock",
      "description": "Dashboard URL used in links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SIDEKIQ_EVENTS",
      "service": "lago-clock",
      "description": "Match the routing used by the workers",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_USE_AWS_S3",
      "service": "lago-clock",
      "description": "Store PDFs in object storage",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "lago-clock",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_SIDEKIQ_WEB",
      "service": "lago-clock",
      "description": "No Sidekiq admin UI",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "LAGO_AWS_S3_BUCKET",
      "service": "lago-clock",
      "description": "Bucket holding invoice PDFs",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_AWS_S3_REGION",
      "service": "lago-clock",
      "description": "Bucket region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_DISABLE_SIGNUP",
      "service": "lago-clock",
      "description": "Close public registration",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RAILS_LOG_TO_STDOUT",
      "service": "lago-clock",
      "description": "Send logs to the deploy log",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_AWS_S3_ENDPOINT",
      "service": "lago-clock",
      "description": "Object storage endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_DISABLE_SEGMENT",
      "service": "lago-clock",
      "description": "Disable anonymous product analytics",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_REDIS_CACHE_URL",
      "service": "lago-clock",
      "description": "Cache on a separate Redis database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_AWS_S3_PATH_STYLE",
      "service": "lago-clock",
      "description": "Use path-style bucket addressing",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_AWS_S3_ACCESS_KEY_ID",
      "service": "lago-clock",
      "description": "Object storage access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_ENCRYPTION_PRIMARY_KEY",
      "service": "lago-clock",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_AWS_S3_SECRET_ACCESS_KEY",
      "service": "lago-clock",
      "description": "Object storage secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_ENCRYPTION_DETERMINISTIC_KEY",
      "service": "lago-clock",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_ENCRYPTION_KEY_DERIVATION_SALT",
      "service": "lago-clock",
      "description": "Must match the API",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "lago-clock",
      "description": "Graceful shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "PORT",
      "service": "lago-pdf",
      "description": "Gotenberg HTTP port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "TINI_KILL_PROCESS_GROUP",
      "service": "lago-pdf",
      "description": "Forward SIGTERM to Chromium children",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "lago-pdf",
      "description": "Graceful shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "PGDATA",
      "service": "lago-postgres",
      "description": "Cluster location one level below the mount",
      "secret": false,
      "strategy": "default",
      "default": "/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "lago-postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "lago"
    },
    {
      "key": "DATABASE_URL",
      "service": "lago-postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "lago-postgres",
      "description": "Role created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "lago"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "lago-postgres",
      "description": "Role password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "lago-postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "lago-billing-platform"
      }
    },
    "cli": "railway deploy --template lago-billing-platform",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c57825e4-1913-439a-a6ab-14c109bfcec1",
            "serializedConfig": {
              "buckets": {
                "32d4e131-5471-4c3a-a069-9b23bad2c658": {
                  "name": "lago-storage"
                }
              },
              "services": {
                "0f81ed6a-4948-4c8b-a815-5b0406ce25fa": {
                  "icon": "https://raw.githubusercontent.com/getlago/lago-front/main/public/favicon-prod.svg",
                  "name": "lago-events-worker",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/lago-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Sidekiq liveness endpoint port",
                      "defaultValue": "8080"
                    },
                    "LAGO_ROLE": {
                      "isOptional": false,
                      "description": "Runs Sidekiq on the events queue only",
                      "defaultValue": "events-worker"
                    },
                    "RAILS_ENV": {
                      "isOptional": false,
                      "description": "Rails environment",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Sidekiq queue Redis",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string",
                      "defaultValue": "${{lago-postgres.DATABASE_URL}}"
                    },
                    "LAGO_API_URL": {
                      "isOptional": false,
                      "description": "Public API base URL",
                      "defaultValue": "https://${{lago-api.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LAGO_PDF_URL": {
                      "isOptional": false,
                      "description": "Private PDF renderer endpoint",
                      "defaultValue": "http://${{lago-pdf.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "DATABASE_POOL": {
                      "isOptional": false,
                      "description": "ActiveRecord connections per process",
                      "defaultValue": "10"
                    },
                    "LAGO_FRONT_URL": {
                      "isOptional": false,
                      "description": "Dashboard URL used in links",
                      "defaultValue": "https://${{lago-front.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SIDEKIQ_EVENTS": {
                      "isOptional": false,
                      "description": "This worker consumes the events queue",
                      "defaultValue": "true"
                    },
                    "LAGO_USE_AWS_S3": {
                      "isOptional": false,
                      "description": "Store PDFs in object storage",
                      "defaultValue": "true"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.SECRET_KEY_BASE}}"
                    },
                    "LAGO_SIDEKIQ_WEB": {
                      "isOptional": false,
                      "description": "No Sidekiq admin UI",
                      "defaultValue": "false"
                    },
                    "LAGO_AWS_S3_BUCKET": {
                      "isOptional": false,
                      "description": "Bucket holding invoice PDFs",
                      "defaultValue": "${{lago-storage.BUCKET}}"
                    },
                    "LAGO_AWS_S3_REGION": {
                      "isOptional": false,
                      "description": "Bucket region",
                      "defaultValue": "${{lago-storage.REGION}}"
                    },
                    "LAGO_DISABLE_SIGNUP": {
                      "isOptional": false,
                      "description": "Close public registration",
                      "defaultValue": "true"
                    },
                    "RAILS_LOG_TO_STDOUT": {
                      "isOptional": false,
                      "description": "Send logs to the deploy log",
                      "defaultValue": "true"
                    },
                    "SIDEKIQ_CONCURRENCY": {
                      "isOptional": false,
                      "description": "Sidekiq threads",
                      "defaultValue": "10"
                    },
                    "LAGO_AWS_S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Object storage endpoint",
                      "defaultValue": "${{lago-storage.ENDPOINT}}"
                    },
                    "LAGO_DISABLE_SEGMENT": {
                      "isOptional": false,
                      "description": "Disable anonymous product analytics",
                      "defaultValue": "true"
                    },
                    "LAGO_REDIS_CACHE_URL": {
                      "isOptional": false,
                      "description": "Cache on a separate Redis database",
                      "defaultValue": "${{Redis.REDIS_URL}}/1"
                    },
                    "LAGO_AWS_S3_PATH_STYLE": {
                      "isOptional": false,
                      "description": "Use path-style bucket addressing",
                      "defaultValue": "true"
                    },
                    "LAGO_AWS_S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Object storage access key",
                      "defaultValue": "${{lago-storage.ACCESS_KEY_ID}}"
                    },
                    "LAGO_ENCRYPTION_PRIMARY_KEY": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.LAGO_ENCRYPTION_PRIMARY_KEY}}"
                    },
                    "LAGO_AWS_S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Object storage secret key",
                      "defaultValue": "${{lago-storage.SECRET_ACCESS_KEY}}"
                    },
                    "LAGO_ENCRYPTION_DETERMINISTIC_KEY": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.LAGO_ENCRYPTION_DETERMINISTIC_KEY}}"
                    },
                    "LAGO_ENCRYPTION_KEY_DERIVATION_SALT": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.LAGO_ENCRYPTION_KEY_DERIVATION_SALT}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Graceful shutdown window",
                      "defaultValue": "30"
                    }
                  }
                },
                "184823b9-3323-41c5-998c-c9d50aa0a9e7": {
                  "icon": "https://raw.githubusercontent.com/getlago/lago-front/main/public/favicon-prod.svg",
                  "name": "lago-api",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/lago-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port the API listens on",
                      "defaultValue": "3000"
                    },
                    "LAGO_ROLE": {
                      "isOptional": false,
                      "description": "Runs the Rails API and migrations",
                      "defaultValue": "api"
                    },
                    "RAILS_ENV": {
                      "isOptional": false,
                      "description": "Rails environment",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Sidekiq and ActionCable Redis",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string",
                      "defaultValue": "${{lago-postgres.DATABASE_URL}}"
                    },
                    "LAGO_API_URL": {
                      "isOptional": false,
                      "description": "Public API base URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LAGO_PDF_URL": {
                      "isOptional": false,
                      "description": "Private PDF renderer endpoint",
                      "defaultValue": "http://${{lago-pdf.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "DATABASE_POOL": {
                      "isOptional": false,
                      "description": "ActiveRecord connections per process",
                      "defaultValue": "10"
                    },
                    "LAGO_ORG_NAME": {
                      "isOptional": false,
                      "description": "Organization name",
                      "defaultValue": "My Company"
                    },
                    "LAGO_FRONT_URL": {
                      "isOptional": false,
                      "description": "Dashboard origin allowed by CORS",
                      "defaultValue": "https://${{lago-front.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SIDEKIQ_EVENTS": {
                      "isOptional": false,
                      "description": "Route ingestion to the event worker",
                      "defaultValue": "true"
                    },
                    "LAGO_CREATE_ORG": {
                      "isOptional": false,
                      "description": "Seed the organization on first boot",
                      "defaultValue": "true"
                    },
                    "LAGO_USE_AWS_S3": {
                      "isOptional": false,
                      "description": "Store PDFs in object storage",
                      "defaultValue": "true"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Rails session and cookie signing key",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    },
                    "WEB_CONCURRENCY": {
                      "isOptional": false,
                      "description": "Puma worker processes",
                      "defaultValue": "2"
                    },
                    "LAGO_SIDEKIQ_WEB": {
                      "isOptional": false,
                      "description": "Keep the Sidekiq admin UI off the public API",
                      "defaultValue": "false"
                    },
                    "RAILS_MAX_THREADS": {
                      "isOptional": false,
                      "description": "Puma threads per worker process",
                      "defaultValue": "5"
                    },
                    "LAGO_AWS_S3_BUCKET": {
                      "isOptional": false,
                      "description": "Bucket holding invoice PDFs",
                      "defaultValue": "${{lago-storage.BUCKET}}"
                    },
                    "LAGO_AWS_S3_REGION": {
                      "isOptional": false,
                      "description": "Bucket region",
                      "defaultValue": "${{lago-storage.REGION}}"
                    },
                    "LAGO_DISABLE_SIGNUP": {
                      "isOptional": false,
                      "description": "Close public registration",
                      "defaultValue": "true"
                    },
                    "LAGO_ORG_USER_EMAIL": {
                      "isOptional": false,
                      "description": "First admin email",
                      "defaultValue": "admin@example.dev"
                    },
                    "RAILS_LOG_TO_STDOUT": {
                      "isOptional": false,
                      "description": "Send logs to the deploy log",
                      "defaultValue": "true"
                    },
                    "LAGO_AWS_S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Object storage endpoint",
                      "defaultValue": "${{lago-storage.ENDPOINT}}"
                    },
                    "LAGO_DISABLE_SEGMENT": {
                      "isOptional": false,
                      "description": "Disable anonymous product analytics",
                      "defaultValue": "true"
                    },
                    "LAGO_REDIS_CACHE_URL": {
                      "isOptional": false,
                      "description": "Cache on a separate Redis database",
                      "defaultValue": "${{Redis.REDIS_URL}}/1"
                    },
                    "LAGO_AWS_S3_PATH_STYLE": {
                      "isOptional": false,
                      "description": "Use path-style bucket addressing",
                      "defaultValue": "true"
                    },
                    "LAGO_ORG_USER_PASSWORD": {
                      "isOptional": false,
                      "description": "First admin password, change after login",
                      "defaultValue": "{{LAGO_ORG_USER_PASSWORD}}"
                    },
                    "LAGO_AWS_S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Object storage access key",
                      "defaultValue": "${{lago-storage.ACCESS_KEY_ID}}"
                    },
                    "LAGO_ENCRYPTION_PRIMARY_KEY": {
                      "isOptional": false,
                      "description": "At-rest encryption key",
                      "defaultValue": "{{LAGO_ENCRYPTION_PRIMARY_KEY}}"
                    },
                    "LAGO_AWS_S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Object storage secret key",
                      "defaultValue": "${{lago-storage.SECRET_ACCESS_KEY}}"
                    },
                    "LAGO_ENCRYPTION_DETERMINISTIC_KEY": {
                      "isOptional": false,
                      "description": "Deterministic encryption key",
                      "defaultValue": "{{LAGO_ENCRYPTION_DETERMINISTIC_KEY}}"
                    },
                    "LAGO_ENCRYPTION_KEY_DERIVATION_SALT": {
                      "isOptional": false,
                      "description": "Encryption key derivation salt",
                      "defaultValue": "{{LAGO_ENCRYPTION_KEY_DERIVATION_SALT}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Graceful shutdown window",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                },
                "253c4211-cbf4-4eff-b58c-587ecadd84f5": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/redis.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auth password, read by the server",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "253c4211-cbf4-4eff-b58c-587ecadd84f5": {
                      "mountPath": "/data"
                    }
                  }
                },
                "92b28ec9-5997-41ae-93a1-a316ca5aeb99": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data directory, a subdirectory of the volume mount",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname, reachable only inside the project",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Standard PostgreSQL port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "libpq alias of the superuser name",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "libpq alias of the default database",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "libpq alias of the superuser password",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string, use this from other services",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity window of the generated self-signed TLS certificate",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public connection string over the TCP proxy, for external tools",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Grace period for in-flight connections on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "92b28ec9-5997-41ae-93a1-a316ca5aeb99": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "983dec19-98eb-46e8-95fc-3a997f7233ce": {
                  "icon": "https://raw.githubusercontent.com/getlago/lago-front/main/public/favicon-prod.svg",
                  "name": "lago-worker",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/lago-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Sidekiq liveness endpoint port",
                      "defaultValue": "8080"
                    },
                    "LAGO_ROLE": {
                      "isOptional": false,
                      "description": "Runs Sidekiq on the default queues",
                      "defaultValue": "worker"
                    },
                    "RAILS_ENV": {
                      "isOptional": false,
                      "description": "Rails environment",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Sidekiq queue Redis",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string",
                      "defaultValue": "${{lago-postgres.DATABASE_URL}}"
                    },
                    "LAGO_API_URL": {
                      "isOptional": false,
                      "description": "Public API base URL",
                      "defaultValue": "https://${{lago-api.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LAGO_PDF_URL": {
                      "isOptional": false,
                      "description": "Private PDF renderer endpoint",
                      "defaultValue": "http://${{lago-pdf.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "DATABASE_POOL": {
                      "isOptional": false,
                      "description": "ActiveRecord connections per process",
                      "defaultValue": "10"
                    },
                    "LAGO_FRONT_URL": {
                      "isOptional": false,
                      "description": "Dashboard URL used in links",
                      "defaultValue": "https://${{lago-front.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SIDEKIQ_EVENTS": {
                      "isOptional": false,
                      "description": "Route ingestion to the event worker",
                      "defaultValue": "true"
                    },
                    "LAGO_USE_AWS_S3": {
                      "isOptional": false,
                      "description": "Store PDFs in object storage",
                      "defaultValue": "true"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.SECRET_KEY_BASE}}"
                    },
                    "LAGO_SIDEKIQ_WEB": {
                      "isOptional": false,
                      "description": "No Sidekiq admin UI",
                      "defaultValue": "false"
                    },
                    "LAGO_AWS_S3_BUCKET": {
                      "isOptional": false,
                      "description": "Bucket holding invoice PDFs",
                      "defaultValue": "${{lago-storage.BUCKET}}"
                    },
                    "LAGO_AWS_S3_REGION": {
                      "isOptional": false,
                      "description": "Bucket region",
                      "defaultValue": "${{lago-storage.REGION}}"
                    },
                    "LAGO_DISABLE_SIGNUP": {
                      "isOptional": false,
                      "description": "Close public registration",
                      "defaultValue": "true"
                    },
                    "RAILS_LOG_TO_STDOUT": {
                      "isOptional": false,
                      "description": "Send logs to the deploy log",
                      "defaultValue": "true"
                    },
                    "SIDEKIQ_CONCURRENCY": {
                      "isOptional": false,
                      "description": "Sidekiq threads",
                      "defaultValue": "10"
                    },
                    "LAGO_AWS_S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Object storage endpoint",
                      "defaultValue": "${{lago-storage.ENDPOINT}}"
                    },
                    "LAGO_DISABLE_SEGMENT": {
                      "isOptional": false,
                      "description": "Disable anonymous product analytics",
                      "defaultValue": "true"
                    },
                    "LAGO_REDIS_CACHE_URL": {
                      "isOptional": false,
                      "description": "Cache on a separate Redis database",
                      "defaultValue": "${{Redis.REDIS_URL}}/1"
                    },
                    "LAGO_AWS_S3_PATH_STYLE": {
                      "isOptional": false,
                      "description": "Use path-style bucket addressing",
                      "defaultValue": "true"
                    },
                    "LAGO_AWS_S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Object storage access key",
                      "defaultValue": "${{lago-storage.ACCESS_KEY_ID}}"
                    },
                    "LAGO_ENCRYPTION_PRIMARY_KEY": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.LAGO_ENCRYPTION_PRIMARY_KEY}}"
                    },
                    "LAGO_AWS_S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Object storage secret key",
                      "defaultValue": "${{lago-storage.SECRET_ACCESS_KEY}}"
                    },
                    "LAGO_ENCRYPTION_DETERMINISTIC_KEY": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.LAGO_ENCRYPTION_DETERMINISTIC_KEY}}"
                    },
                    "LAGO_ENCRYPTION_KEY_DERIVATION_SALT": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.LAGO_ENCRYPTION_KEY_DERIVATION_SALT}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Graceful shutdown window",
                      "defaultValue": "30"
                    }
                  }
                },
                "c7deb46e-d16f-4f4c-a468-0ab1e34a01d5": {
                  "icon": "https://raw.githubusercontent.com/getlago/lago-front/main/public/favicon-prod.svg",
                  "name": "lago-front",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "getlago/front:v1.51.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "nginx listening port",
                      "defaultValue": "80"
                    },
                    "API_URL": {
                      "isOptional": false,
                      "description": "API the dashboard calls",
                      "defaultValue": "https://${{lago-api.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "APP_ENV": {
                      "isOptional": false,
                      "description": "Front-end build environment",
                      "defaultValue": "production"
                    },
                    "LAGO_DOMAIN": {
                      "isOptional": false,
                      "description": "Public dashboard URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LAGO_DISABLE_SIGNUP": {
                      "isOptional": false,
                      "description": "Hide the sign-up form",
                      "defaultValue": "true"
                    },
                    "LAGO_OAUTH_PROXY_URL": {
                      "isOptional": false,
                      "description": "Google and Okta login proxy",
                      "defaultValue": "https://proxy.getlago.com"
                    },
                    "LAGO_DISABLE_PDF_GENERATION": {
                      "isOptional": false,
                      "description": "Keep invoice PDF downloads enabled",
                      "defaultValue": "false"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Graceful shutdown window",
                      "defaultValue": "15"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  }
                },
                "cfd008ac-65d7-469e-aea7-97e78af68550": {
                  "icon": "https://raw.githubusercontent.com/getlago/lago-front/main/public/favicon-prod.svg",
                  "name": "lago-clock",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/lago-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "LAGO_ROLE": {
                      "isOptional": false,
                      "description": "Runs the Clockwork scheduler",
                      "defaultValue": "clock"
                    },
                    "RAILS_ENV": {
                      "isOptional": false,
                      "description": "Rails environment",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis used to enqueue jobs",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string",
                      "defaultValue": "${{lago-postgres.DATABASE_URL}}"
                    },
                    "LAGO_API_URL": {
                      "isOptional": false,
                      "description": "Public API base URL",
                      "defaultValue": "https://${{lago-api.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LAGO_PDF_URL": {
                      "isOptional": false,
                      "description": "Private PDF renderer endpoint",
                      "defaultValue": "http://${{lago-pdf.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "DATABASE_POOL": {
                      "isOptional": false,
                      "description": "ActiveRecord connections per process",
                      "defaultValue": "5"
                    },
                    "LAGO_FRONT_URL": {
                      "isOptional": false,
                      "description": "Dashboard URL used in links",
                      "defaultValue": "https://${{lago-front.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SIDEKIQ_EVENTS": {
                      "isOptional": false,
                      "description": "Match the routing used by the workers",
                      "defaultValue": "true"
                    },
                    "LAGO_USE_AWS_S3": {
                      "isOptional": false,
                      "description": "Store PDFs in object storage",
                      "defaultValue": "true"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.SECRET_KEY_BASE}}"
                    },
                    "LAGO_SIDEKIQ_WEB": {
                      "isOptional": false,
                      "description": "No Sidekiq admin UI",
                      "defaultValue": "false"
                    },
                    "LAGO_AWS_S3_BUCKET": {
                      "isOptional": false,
                      "description": "Bucket holding invoice PDFs",
                      "defaultValue": "${{lago-storage.BUCKET}}"
                    },
                    "LAGO_AWS_S3_REGION": {
                      "isOptional": false,
                      "description": "Bucket region",
                      "defaultValue": "${{lago-storage.REGION}}"
                    },
                    "LAGO_DISABLE_SIGNUP": {
                      "isOptional": false,
                      "description": "Close public registration",
                      "defaultValue": "true"
                    },
                    "RAILS_LOG_TO_STDOUT": {
                      "isOptional": false,
                      "description": "Send logs to the deploy log",
                      "defaultValue": "true"
                    },
                    "LAGO_AWS_S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Object storage endpoint",
                      "defaultValue": "${{lago-storage.ENDPOINT}}"
                    },
                    "LAGO_DISABLE_SEGMENT": {
                      "isOptional": false,
                      "description": "Disable anonymous product analytics",
                      "defaultValue": "true"
                    },
                    "LAGO_REDIS_CACHE_URL": {
                      "isOptional": false,
                      "description": "Cache on a separate Redis database",
                      "defaultValue": "${{Redis.REDIS_URL}}/1"
                    },
                    "LAGO_AWS_S3_PATH_STYLE": {
                      "isOptional": false,
                      "description": "Use path-style bucket addressing",
                      "defaultValue": "true"
                    },
                    "LAGO_AWS_S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Object storage access key",
                      "defaultValue": "${{lago-storage.ACCESS_KEY_ID}}"
                    },
                    "LAGO_ENCRYPTION_PRIMARY_KEY": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.LAGO_ENCRYPTION_PRIMARY_KEY}}"
                    },
                    "LAGO_AWS_S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Object storage secret key",
                      "defaultValue": "${{lago-storage.SECRET_ACCESS_KEY}}"
                    },
                    "LAGO_ENCRYPTION_DETERMINISTIC_KEY": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.LAGO_ENCRYPTION_DETERMINISTIC_KEY}}"
                    },
                    "LAGO_ENCRYPTION_KEY_DERIVATION_SALT": {
                      "isOptional": false,
                      "description": "Must match the API",
                      "defaultValue": "${{lago-api.LAGO_ENCRYPTION_KEY_DERIVATION_SALT}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Graceful shutdown window",
                      "defaultValue": "30"
                    }
                  }
                },
                "e16c7c4b-1720-4b4c-95ec-5b9d65414dfb": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/gotenberg.png",
                  "name": "lago-pdf",
                  "deploy": {
                    "startCommand": "/usr/bin/tini -s -- gotenberg --api-port-from-env=PORT --api-timeout=180s --chromium-auto-start=true",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "getlago/lago-gotenberg:8.15"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Gotenberg HTTP port",
                      "defaultValue": "3000"
                    },
                    "TINI_KILL_PROCESS_GROUP": {
                      "isOptional": false,
                      "description": "Forward SIGTERM to Chromium children",
                      "defaultValue": "1"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Graceful shutdown window",
                      "defaultValue": "30"
                    }
                  }
                },
                "efe79ebf-1a86-4d23-ab87-22d3d64b0db8": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "lago-postgres",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'MEM=$(cat /sys/fs/cgroup/memory.max 2>/dev/null || echo max); case \"$MEM\" in \"\"|max|*[!0-9]*) MEM=2147483648;; esac; SB=$((MEM/4/1048576)); EC=$((MEM*3/4/1048576)); echo \"sizing shared_buffers=${SB}MB effective_cache_size=${EC}MB from cgroup\"; exec docker-entrypoint.sh postgres -c data_directory=/data/pgdata -c shared_buffers=${SB}MB -c effective_cache_size=${EC}MB -c maintenance_work_mem=256MB -c work_mem=16MB -c max_connections=200 -c shared_preload_libraries=pg_partman_bgw -c pg_partman_bgw.interval=3600 -c pg_partman_bgw.role=lago -c pg_partman_bgw.dbname=lago'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/lago-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Cluster location one level below the mount",
                      "defaultValue": "/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "lago"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{POSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Role created on first boot",
                      "defaultValue": "lago"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Role password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "efe79ebf-1a86-4d23-ab87-22d3d64b0db8": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "lago-api",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 9,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-19T14:33:06.530Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_9a5a8f9c2e9546a0b1d9",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ]
  }
}
