{
  "manifest_version": "1.0.0",
  "template": {
    "id": "0666be73-a96e-4e34-a977-024f7c8af695",
    "slug": "invoice-ninja-or-just-updated-freshbooks",
    "name": "Invoice Ninja | (Just Updated) FreshBooks Alternative That Finishes Setting Itself Up",
    "description": "Self-configuring: admin seeded, queue workers running, uploads persist",
    "url": "https://railway.com/deploy/invoice-ninja-or-just-updated-freshbooks",
    "upstream": {
      "image": "ghcr.io/bon5co/invoice-ninja-railway:5.13.37"
    }
  },
  "services": [
    {
      "name": "invoice-ninja",
      "source": {
        "image": "ghcr.io/bon5co/invoice-ninja-railway:5.13.37"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/www/app/storage",
      "http": true
    },
    {
      "name": "mysql",
      "source": {
        "image": "mysql:9.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "DB_HOST",
      "service": "invoice-ninja",
      "description": "Provide a value for DB_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_PASSWORD",
      "service": "invoice-ninja",
      "description": "Provide a value for DB_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "IN_PASSWORD",
      "service": "invoice-ninja",
      "description": "Provide a value for IN_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "IN_USER_EMAIL",
      "service": "invoice-ninja",
      "description": "Provide a value for IN_USER_EMAIL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "mysql",
      "description": "Provide a value for MYSQL_ROOT_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "invoice-ninja-or-just-updated-freshbooks"
      }
    },
    "cli": "railway deploy --template invoice-ninja-or-just-updated-freshbooks",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "0666be73-a96e-4e34-a977-024f7c8af695",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "39d84478-3901-4b42-b3f2-48629d7e0d50": {
                  "icon": null,
                  "name": "invoice-ninja",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/login",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/bon5co/invoice-ninja-railway:5.13.37"
                  },
                  "variables": {
                    "DB_HOST": {
                      "isOptional": false,
                      "defaultValue": "${{mysql.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{mysql.MYSQL_ROOT_PASSWORD}}"
                    },
                    "IN_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{IN_PASSWORD}}"
                    },
                    "IN_USER_EMAIL": {
                      "isOptional": false,
                      "defaultValue": "admin@${{RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "39d84478-3901-4b42-b3f2-48629d7e0d50": {
                      "mountPath": "/var/www/app/storage"
                    }
                  }
                },
                "9628fc7f-7aac-4b41-b344-17683e5568d8": {
                  "icon": null,
                  "name": "mysql",
                  "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; BP=$((MEM / 1024 / 1024 * 50 / 100)); [ \"$BP\" -lt 128 ] && BP=128; echo \"[railway] innodb_buffer_pool_size=${BP}M\"; exec docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=${BP}M'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mysql:9.4"
                  },
                  "variables": {
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "9628fc7f-7aac-4b41-b344-17683e5568d8": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "invoice-ninja",
      "method": "GET",
      "path": "/login",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-04T17:54:19.363Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-04T17:56:34.768Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_db4361d64c6940f89b12",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 70,
    "typical_build_seconds": 0,
    "typical_start_seconds": 53,
    "slowest_service": "invoice-ninja"
  }
}
