{
  "manifest_version": "1.0.0",
  "template": {
    "id": "952b6802-e507-42e4-8599-a072a1f422f4",
    "slug": "apache-answer-1",
    "name": "Apache Answer",
    "description": "Question-and-answer site for building a community knowledge base",
    "url": "https://railway.com/deploy/apache-answer-1",
    "upstream": {
      "image": "axllent/mailpit:latest"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "mailpit",
      "source": {
        "image": "axllent/mailpit:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "answer",
      "source": {
        "repo": "https://github.com/gridalpha/apache-answer-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "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": "SSL certificate expiry in days",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password, read by the server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "TZ",
      "service": "mailpit",
      "description": "Container timezone",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "PORT",
      "service": "mailpit",
      "description": "Web inbox port",
      "secret": false,
      "strategy": "default",
      "default": "8025"
    },
    {
      "key": "MP_UI_AUTH",
      "service": "mailpit",
      "description": "Web inbox basic auth credentials",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MP_DATABASE",
      "service": "mailpit",
      "description": "Message store on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/data/mailpit.db"
    },
    {
      "key": "MP_MAX_MESSAGES",
      "service": "mailpit",
      "description": "Messages retained before rotation",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "MP_UI_BIND_ADDR",
      "service": "mailpit",
      "description": "Web inbox listen address",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0:8025"
    },
    {
      "key": "MP_SMTP_BIND_ADDR",
      "service": "mailpit",
      "description": "SMTP listen address, private network",
      "secret": false,
      "strategy": "default",
      "default": "[::]:1025"
    },
    {
      "key": "TZ",
      "service": "answer",
      "description": "Container timezone",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "PORT",
      "service": "answer",
      "description": "HTTP port; also sets the listen address",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "DB_HOST",
      "service": "answer",
      "description": "Database host and port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_NAME",
      "service": "answer",
      "description": "Database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_TYPE",
      "service": "answer",
      "description": "Database driver",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "LANGUAGE",
      "service": "answer",
      "description": "Interface language code",
      "secret": false,
      "strategy": "default",
      "default": "en_US"
    },
    {
      "key": "SITE_URL",
      "service": "answer",
      "description": "Public base URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LOG_LEVEL",
      "service": "answer",
      "description": "Application log verbosity",
      "secret": false,
      "strategy": "default",
      "default": "INFO"
    },
    {
      "key": "SITE_NAME",
      "service": "answer",
      "description": "Community name in header and mail",
      "secret": false,
      "strategy": "default",
      "default": "Apache Answer"
    },
    {
      "key": "SMTP_HOST",
      "service": "answer",
      "description": "SMTP server hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SMTP_PORT",
      "service": "answer",
      "description": "SMTP server port",
      "secret": false,
      "strategy": "default",
      "default": "1025"
    },
    {
      "key": "ADMIN_NAME",
      "service": "answer",
      "description": "First administrator display name",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "ADMIN_EMAIL",
      "service": "answer",
      "description": "First administrator login address",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "DB_PASSWORD",
      "service": "answer",
      "description": "Database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_USERNAME",
      "service": "answer",
      "description": "Database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AUTO_INSTALL",
      "service": "answer",
      "description": "Run the headless installer on first boot",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "CONTACT_EMAIL",
      "service": "answer",
      "description": "Published contact address",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "answer",
      "description": "First administrator password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SMTP_FROM_NAME",
      "service": "answer",
      "description": "Sender display name",
      "secret": false,
      "strategy": "default",
      "default": "Apache Answer"
    },
    {
      "key": "SMTP_FROM_EMAIL",
      "service": "answer",
      "description": "Envelope sender address",
      "secret": false,
      "strategy": "default",
      "default": "answer@example.com"
    },
    {
      "key": "EXTERNAL_CONTENT_DISPLAY",
      "service": "answer",
      "description": "Embedded media display policy",
      "secret": false,
      "strategy": "default",
      "default": "always_display"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "answer",
      "description": "First-boot health check window",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "answer",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "15"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "apache-answer-1"
      }
    },
    "cli": "railway deploy --template apache-answer-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "952b6802-e507-42e4-8599-a072a1f422f4",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "71a243ec-e713-45fe-a135-b50079fde6c0": {
                  "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": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "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": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password, read by the server",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "71a243ec-e713-45fe-a135-b50079fde6c0": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "8e0a77b3-897f-472c-aeb2-7b5107234296": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mailpit.svg",
                  "name": "mailpit",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/livez",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "axllent/mailpit:latest"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Container timezone",
                      "defaultValue": "UTC"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Web inbox port",
                      "defaultValue": "8025"
                    },
                    "MP_UI_AUTH": {
                      "isOptional": false,
                      "description": "Web inbox basic auth credentials",
                      "defaultValue": "{{MP_UI_AUTH}}"
                    },
                    "MP_DATABASE": {
                      "isOptional": false,
                      "description": "Message store on the volume",
                      "defaultValue": "/data/mailpit.db"
                    },
                    "MP_MAX_MESSAGES": {
                      "isOptional": false,
                      "description": "Messages retained before rotation",
                      "defaultValue": "5000"
                    },
                    "MP_UI_BIND_ADDR": {
                      "isOptional": false,
                      "description": "Web inbox listen address",
                      "defaultValue": "0.0.0.0:8025"
                    },
                    "MP_SMTP_BIND_ADDR": {
                      "isOptional": false,
                      "description": "SMTP listen address, private network",
                      "defaultValue": "[::]:1025"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8025": {
                        "port": 8025
                      }
                    }
                  },
                  "volumeMounts": {
                    "8e0a77b3-897f-472c-aeb2-7b5107234296": {
                      "mountPath": "/data"
                    }
                  }
                },
                "e53a2248-eb8e-407a-a064-dfca37b2fe2f": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/apache-answer.svg",
                  "name": "answer",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/apache-answer-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Container timezone",
                      "defaultValue": "UTC"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port; also sets the listen address",
                      "defaultValue": "8080"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "Database host and port",
                      "defaultValue": "${{Postgres.PGHOST}}:${{Postgres.PGPORT}}"
                    },
                    "DB_NAME": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "DB_TYPE": {
                      "isOptional": false,
                      "description": "Database driver",
                      "defaultValue": "postgres"
                    },
                    "LANGUAGE": {
                      "isOptional": false,
                      "description": "Interface language code",
                      "defaultValue": "en_US"
                    },
                    "SITE_URL": {
                      "isOptional": false,
                      "description": "Public base URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Application log verbosity",
                      "defaultValue": "INFO"
                    },
                    "SITE_NAME": {
                      "isOptional": false,
                      "description": "Community name in header and mail",
                      "defaultValue": "Apache Answer"
                    },
                    "SMTP_HOST": {
                      "isOptional": false,
                      "description": "SMTP server hostname",
                      "defaultValue": "${{mailpit.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "SMTP_PORT": {
                      "isOptional": false,
                      "description": "SMTP server port",
                      "defaultValue": "1025"
                    },
                    "ADMIN_NAME": {
                      "isOptional": false,
                      "description": "First administrator display name",
                      "defaultValue": "admin"
                    },
                    "ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "First administrator login address",
                      "defaultValue": "admin@example.com"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "DB_USERNAME": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "AUTO_INSTALL": {
                      "isOptional": false,
                      "description": "Run the headless installer on first boot",
                      "defaultValue": "true"
                    },
                    "CONTACT_EMAIL": {
                      "isOptional": false,
                      "description": "Published contact address",
                      "defaultValue": "admin@example.com"
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First administrator password",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "SMTP_FROM_NAME": {
                      "isOptional": false,
                      "description": "Sender display name",
                      "defaultValue": "Apache Answer"
                    },
                    "SMTP_FROM_EMAIL": {
                      "isOptional": false,
                      "description": "Envelope sender address",
                      "defaultValue": "answer@example.com"
                    },
                    "EXTERNAL_CONTENT_DISPLAY": {
                      "isOptional": false,
                      "description": "Embedded media display policy",
                      "defaultValue": "always_display"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First-boot health check window",
                      "defaultValue": "600"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "15"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "e53a2248-eb8e-407a-a064-dfca37b2fe2f": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "mailpit",
      "method": "GET",
      "path": "/livez",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-22T22:14:50.114Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-21T19:43:29.308Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_1b50ac1635554416812b",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 103,
    "typical_build_seconds": 20,
    "typical_start_seconds": 10,
    "slowest_service": "answer"
  }
}
