{
  "manifest_version": "1.0.0",
  "template": {
    "id": "fe50447c-59b2-498e-a527-142335e450fa",
    "slug": "opensourcepos",
    "name": "Open Source Point of Sale",
    "description": "Point of sale and inventory system for small retail shops",
    "url": "https://railway.com/deploy/opensourcepos",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/opensourcepos-railway"
    }
  },
  "services": [
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:9.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "opensourcepos",
      "source": {
        "repo": "https://github.com/gridalpha/opensourcepos-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/public/uploads",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MYSQLHOST",
      "service": "MySQL",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MySQL",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MySQL",
      "description": "Data panel alias for the superuser",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MySQL",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MySQL",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Superuser password, read by the server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "opensourcepos",
      "description": "Apache listening port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "PHP_TIMEZONE",
      "service": "opensourcepos",
      "description": "Timezone for receipts and reports",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "MYSQL_DB_NAME",
      "service": "opensourcepos",
      "description": "Database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CI_ENVIRONMENT",
      "service": "opensourcepos",
      "description": "CodeIgniter environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "ENCRYPTION_KEY",
      "service": "opensourcepos",
      "description": "At-rest encryption key, must stay stable",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MYSQL_PASSWORD",
      "service": "opensourcepos",
      "description": "Database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_USERNAME",
      "service": "opensourcepos",
      "description": "Database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_HOST_NAME",
      "service": "opensourcepos",
      "description": "Database host, private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "OSPOS_LOG_THRESHOLD",
      "service": "opensourcepos",
      "description": "CodeIgniter log level, 9 logs everything",
      "secret": false,
      "strategy": "default",
      "default": "4"
    },
    {
      "key": "OSPOS_ADMIN_PASSWORD",
      "service": "opensourcepos",
      "description": "Password for the admin account",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "OSPOS_ADMIN_USERNAME",
      "service": "opensourcepos",
      "description": "Account the entrypoint re-passwords",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "opensourcepos",
      "description": "First boot runs ~90 migrations",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "opensourcepos",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "20"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "opensourcepos"
      }
    },
    "cli": "railway deploy --template opensourcepos",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "fe50447c-59b2-498e-a527-142335e450fa",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "0728ffca-0f70-4894-a0c9-595deea5ea9c": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mysql.svg",
                  "name": "MySQL",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mysql:9.4"
                  },
                  "variables": {
                    "MYSQLHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "Data panel alias for the superuser",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "mysql://${{ MYSQLUSER }}:${{ MYSQL_ROOT_PASSWORD }}@${{ RAILWAY_PRIVATE_DOMAIN }}:3306/${{ MYSQL_DATABASE }}"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{ MYSQL_DATABASE }}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{ MYSQL_ROOT_PASSWORD }}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password, read by the server",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "0728ffca-0f70-4894-a0c9-595deea5ea9c": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "ce02504d-54de-46af-bfb6-d6a64ef57bac": {
                  "icon": "https://cdn.jsdelivr.net/gh/opensourcepos/opensourcepos@master/branding/emblem-white.svg",
                  "name": "opensourcepos",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/opensourcepos-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Apache listening port",
                      "defaultValue": "8080"
                    },
                    "PHP_TIMEZONE": {
                      "isOptional": true,
                      "description": "Timezone for receipts and reports",
                      "defaultValue": "UTC"
                    },
                    "MYSQL_DB_NAME": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "${{MySQL.MYSQLDATABASE}}"
                    },
                    "CI_ENVIRONMENT": {
                      "isOptional": false,
                      "description": "CodeIgniter environment",
                      "defaultValue": "production"
                    },
                    "ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "At-rest encryption key, must stay stable",
                      "defaultValue": "{{ENCRYPTION_KEY}}"
                    },
                    "MYSQL_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "${{MySQL.MYSQLPASSWORD}}"
                    },
                    "MYSQL_USERNAME": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "${{MySQL.MYSQLUSER}}"
                    },
                    "MYSQL_HOST_NAME": {
                      "isOptional": false,
                      "description": "Database host, private network",
                      "defaultValue": "${{MySQL.MYSQLHOST}}"
                    },
                    "OSPOS_LOG_THRESHOLD": {
                      "isOptional": true,
                      "description": "CodeIgniter log level, 9 logs everything",
                      "defaultValue": "4"
                    },
                    "OSPOS_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the admin account",
                      "defaultValue": "{{OSPOS_ADMIN_PASSWORD}}"
                    },
                    "OSPOS_ADMIN_USERNAME": {
                      "isOptional": true,
                      "description": "Account the entrypoint re-passwords",
                      "defaultValue": "admin"
                    },
                    "ALLOWED_HOSTNAMES_EXTRA": {
                      "isOptional": true,
                      "description": "Extra hostnames for a custom domain",
                      "defaultValue": ""
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First boot runs ~90 migrations",
                      "defaultValue": "600"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "20"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "ce02504d-54de-46af-bfb6-d6a64ef57bac": {
                      "mountPath": "/app/public/uploads"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "opensourcepos",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-06T04:14:42.626Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-10-05T09:20:06.251Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_850a6b3f39e5457d89b7",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "DEPLOYING,SUCCESS"
      }
    ]
  }
}
