{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1c933261-1217-40f0-b302-d1aad494f121",
    "slug": "discord-tickets",
    "name": "Discord Tickets",
    "description": "Discord Bot for Creating and Managing Support Ticket Channels.",
    "url": "https://railway.com/deploy/discord-tickets",
    "upstream": {
      "image": "eartharoid/discord-tickets:4.0.21"
    }
  },
  "services": [
    {
      "name": "tickets-mysql",
      "source": {
        "image": "mysql:8"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "tcp_ports": [
        3306
      ],
      "http": false
    },
    {
      "name": "tickets-app",
      "source": {
        "image": "eartharoid/discord-tickets:4.0.21"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/container/user",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MYSQL_HOST",
      "service": "tickets-mysql",
      "description": "Private hostname used to connect to MySQL over Railway's private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQL_PORT",
      "service": "tickets-mysql",
      "description": "Default port MySQL listens on.",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQL_USER",
      "service": "tickets-mysql",
      "description": "MySQL user account used by the application to access the database.",
      "secret": false,
      "strategy": "default",
      "default": "tickets"
    },
    {
      "key": "DATABASE_URL",
      "service": "tickets-mysql",
      "description": "Internal MySQL connection URL for services within Railway.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "tickets-mysql",
      "description": "Name of the MySQL database used by the application.",
      "secret": false,
      "strategy": "default",
      "default": "tickets"
    },
    {
      "key": "MYSQL_PASSWORD",
      "service": "tickets-mysql",
      "description": "Randomly generated 32-character password used to secure the MySQL application user.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "tickets-mysql",
      "description": "Public MySQL connection URL using Railway's TCP proxy.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "tickets-mysql",
      "description": "Randomly generated 32-character password used to secure the MySQL root administrator account.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "tickets-app",
      "description": "Port the application server listens on.",
      "secret": false,
      "strategy": "default",
      "default": "8169"
    },
    {
      "key": "SUPER",
      "service": "tickets-app",
      "description": "Discord user ID granted super-administrator privileges. Replace with your Discord user ID.",
      "secret": false,
      "strategy": "default",
      "default": "YOUR_DISCORD_USER_ID"
    },
    {
      "key": "HTTP_HOST",
      "service": "tickets-app",
      "description": "Binds the HTTP server to all network interfaces so it can accept incoming connections.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "HTTP_PORT",
      "service": "tickets-app",
      "description": "Port the application's HTTP server listens on.",
      "secret": false,
      "strategy": "default",
      "default": "8169"
    },
    {
      "key": "PUBLIC_BOT",
      "service": "tickets-app",
      "description": "Controls whether the Discord bot is publicly accessible. Set to true to allow public access.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DB_PROVIDER",
      "service": "tickets-app",
      "description": "Specifies MySQL as the database provider.",
      "secret": false,
      "strategy": "default",
      "default": "mysql"
    },
    {
      "key": "DISCORD_TOKEN",
      "service": "tickets-app",
      "description": "Discord bot token used to authenticate and connect the application to Discord.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "HTTP_EXTERNAL",
      "service": "tickets-app",
      "description": "Public HTTPS URL used to access the application.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DISCORD_SECRET",
      "service": "tickets-app",
      "description": "Secret used by the application for Discord authentication or integration.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENCRYPTION_KEY",
      "service": "tickets-app",
      "description": "Randomly generated 48-character key used to encrypt sensitive application data.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "HTTP_TRUST_PROXY",
      "service": "tickets-app",
      "description": "Enables trust for requests forwarded through a reverse proxy such as Railway.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PUBLISH_COMMANDS",
      "service": "tickets-app",
      "description": "Enables publishing or registering the bot's Discord commands.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DB_CONNECTION_URL",
      "service": "tickets-app",
      "description": "MySQL connection URL used by the application to connect to the tickets-mysql service over Railway's private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "discord-tickets"
      }
    },
    "cli": "railway deploy --template discord-tickets",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1c933261-1217-40f0-b302-d1aad494f121",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "532d0c14-6601-4769-b005-02520519a91e": {
                  "icon": "https://devicons.railway.app/i/mysql.svg",
                  "name": "tickets-mysql",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mysql:8"
                  },
                  "variables": {
                    "MYSQL_HOST": {
                      "isOptional": false,
                      "description": "Private hostname used to connect to MySQL over Railway's private network.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQL_PORT": {
                      "isOptional": false,
                      "description": "Default port MySQL listens on.",
                      "defaultValue": "3306"
                    },
                    "MYSQL_USER": {
                      "isOptional": false,
                      "description": "MySQL user account used by the application to access the database.",
                      "defaultValue": "tickets"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Internal MySQL connection URL for services within Railway.",
                      "defaultValue": "mysql://${{MYSQL_USER}}:${{MYSQL_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Name of the MySQL database used by the application.",
                      "defaultValue": "tickets"
                    },
                    "MYSQL_PASSWORD": {
                      "isOptional": false,
                      "description": "Randomly generated 32-character password used to secure the MySQL application user.",
                      "defaultValue": "{{MYSQL_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public MySQL connection URL using Railway's TCP proxy.",
                      "defaultValue": "mysql://${{MYSQL_USER}}:${{MYSQL_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Randomly generated 32-character password used to secure the MySQL root administrator account.",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "3306": {}
                    }
                  },
                  "volumeMounts": {
                    "532d0c14-6601-4769-b005-02520519a91e": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "b79023a4-564c-4566-8901-7c374f101bc6": {
                  "icon": "https://discordtickets.app/favicon.ico",
                  "name": "tickets-app",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "eartharoid/discord-tickets:4.0.21"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the application server listens on.",
                      "defaultValue": "8169"
                    },
                    "SUPER": {
                      "isOptional": false,
                      "description": "Discord user ID granted super-administrator privileges. Replace with your Discord user ID.",
                      "defaultValue": "YOUR_DISCORD_USER_ID"
                    },
                    "HTTP_HOST": {
                      "isOptional": false,
                      "description": "Binds the HTTP server to all network interfaces so it can accept incoming connections.",
                      "defaultValue": "0.0.0.0"
                    },
                    "HTTP_PORT": {
                      "isOptional": false,
                      "description": "Port the application's HTTP server listens on.",
                      "defaultValue": "8169"
                    },
                    "PUBLIC_BOT": {
                      "isOptional": false,
                      "description": "Controls whether the Discord bot is publicly accessible. Set to true to allow public access.",
                      "defaultValue": "false"
                    },
                    "DB_PROVIDER": {
                      "isOptional": false,
                      "description": "Specifies MySQL as the database provider.",
                      "defaultValue": "mysql"
                    },
                    "DISCORD_TOKEN": {
                      "isOptional": false,
                      "description": "Discord bot token used to authenticate and connect the application to Discord.",
                      "defaultValue": "{{DISCORD_TOKEN}}"
                    },
                    "HTTP_EXTERNAL": {
                      "isOptional": false,
                      "description": "Public HTTPS URL used to access the application.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DISCORD_SECRET": {
                      "isOptional": false,
                      "description": "Secret used by the application for Discord authentication or integration.",
                      "defaultValue": "{{DISCORD_SECRET}}"
                    },
                    "ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Randomly generated 48-character key used to encrypt sensitive application data.",
                      "defaultValue": "{{ENCRYPTION_KEY}}"
                    },
                    "HTTP_TRUST_PROXY": {
                      "isOptional": false,
                      "description": "Enables trust for requests forwarded through a reverse proxy such as Railway.",
                      "defaultValue": "true"
                    },
                    "PUBLISH_COMMANDS": {
                      "isOptional": false,
                      "description": "Enables publishing or registering the bot's Discord commands.",
                      "defaultValue": "true"
                    },
                    "DB_CONNECTION_URL": {
                      "isOptional": false,
                      "description": "MySQL connection URL used by the application to connect to the tickets-mysql service over Railway's private network.",
                      "defaultValue": "mysql://${{tickets-mysql.MYSQL_USER}}:${{tickets-mysql.MYSQL_PASSWORD}}@${{tickets-mysql.RAILWAY_PRIVATE_DOMAIN}}:3306/${{tickets-mysql.MYSQL_DATABASE}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "b79023a4-564c-4566-8901-7c374f101bc6": {
                      "mountPath": "/home/container/user"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-30T04:14:48.142Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-30T02:16:56.517Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_8fc71806d4804221ab95",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 60,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "tickets-mysql"
  }
}
