{
  "manifest_version": "1.0.0",
  "template": {
    "id": "fa228ec0-20f6-4cac-87e7-b5b408e5ad09",
    "slug": "devjournal",
    "name": "devjournal",
    "description": "Deploy and Host devjournal with Railway",
    "url": "https://railway.com/deploy/devjournal",
    "upstream": {
      "repo_url": "https://github.com/sefatanam/devjournal"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "angular",
      "source": {
        "repo": "https://github.com/sefatanam/devjournal"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "go",
      "source": {
        "repo": "https://github.com/sefatanam/devjournal"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "MongoDB",
      "source": {
        "image": "mongo:8.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/data/db",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Provide a value for PGHOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Provide a value for PGUSER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Provide a value for PGDATABASE.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Provide a value for PGPASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Provide a value for DATABASE_PUBLIC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_URL",
      "service": "go",
      "description": "Provide a value for DB_URL.",
      "secret": false,
      "strategy": "default",
      "default": "Postgess DB rul"
    },
    {
      "key": "API_URL",
      "service": "go",
      "description": "Provide a value for API_URL.",
      "secret": false,
      "strategy": "default",
      "default": "deployed api url"
    },
    {
      "key": "MONGO_DB",
      "service": "go",
      "description": "Provide a value for MONGO_DB.",
      "secret": false,
      "strategy": "default",
      "default": "database name"
    },
    {
      "key": "GRPC_PORT",
      "service": "go",
      "description": "Provide a value for GRPC_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "only GRPC port"
    },
    {
      "key": "MONGO_URL",
      "service": "go",
      "description": "Provide a value for MONGO_URL.",
      "secret": false,
      "strategy": "default",
      "default": "Mongo DB url"
    },
    {
      "key": "JWT_SECRET",
      "service": "go",
      "description": "Provide a value for JWT_SECRET.",
      "secret": true,
      "strategy": "default",
      "default": "any random text"
    },
    {
      "key": "MONGOHOST",
      "service": "MongoDB",
      "description": "Provide a value for MONGOHOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MONGOUSER",
      "service": "MongoDB",
      "description": "Provide a value for MONGOUSER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MONGO_URL",
      "service": "MongoDB",
      "description": "Provide a value for MONGO_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MONGOPASSWORD",
      "service": "MongoDB",
      "description": "Provide a value for MONGOPASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MONGO_PUBLIC_URL",
      "service": "MongoDB",
      "description": "Provide a value for MONGO_PUBLIC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MONGO_INITDB_ROOT_PASSWORD",
      "service": "MongoDB",
      "description": "Provide a value for MONGO_INITDB_ROOT_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "devjournal"
      }
    },
    "cli": "railway deploy --template devjournal",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "fa228ec0-20f6-4cac-87e7-b5b408e5ad09",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "2df45680-e16f-4979-a2c2-e47ae6b77f57": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "PGHOST": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "PGUSER": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "DATABASE_URL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    }
                  },
                  "volumeMounts": {
                    "2df45680-e16f-4979-a2c2-e47ae6b77f57": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "931c476f-d87d-46e2-b114-f31fa22f79af": {
                  "icon": null,
                  "name": "angular",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/sefatanam/devjournal",
                    "rootDirectory": null
                  },
                  "variables": {
                    "API_URL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "MONGO_DB": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "GRPC_PORT": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "HTTP_PORT": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "MONGO_URL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "JWT_SECRET": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "POSTGRES_URL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "b7f232db-a2ba-4711-b1c6-04858031008f": {
                  "icon": null,
                  "name": "go",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/sefatanam/devjournal",
                    "rootDirectory": null
                  },
                  "variables": {
                    "DB_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "Postgess DB rul"
                    },
                    "API_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "deployed api url"
                    },
                    "MONGO_DB": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "database name"
                    },
                    "GRPC_PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "only GRPC port"
                    },
                    "MONGO_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "Mongo DB url"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "any random text"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "c57cbcb5-8123-41ec-b182-2e27a8fb08fe": {
                  "icon": "https://devicons.railway.app/i/mongodb.svg",
                  "name": "MongoDB",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mongod --ipv6 --bind_ip ::,0.0.0.0 --setParameter diagnosticDataCollectionEnabled=false",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mongo:8.0"
                  },
                  "variables": {
                    "MONGOHOST": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MONGOPORT": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "MONGOUSER": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{MONGO_INITDB_ROOT_USERNAME}}"
                    },
                    "MONGO_URL": {
                      "isOptional": false,
                      "defaultValue": "mongodb://${{MONGO_INITDB_ROOT_USERNAME}}:${{MONGO_INITDB_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:27017"
                    },
                    "MONGOPASSWORD": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{MONGO_INITDB_ROOT_PASSWORD}}"
                    },
                    "MONGO_PUBLIC_URL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "mongodb://${{MONGO_INITDB_ROOT_USERNAME}}:${{MONGO_INITDB_ROOT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    },
                    "MONGO_INITDB_ROOT_PASSWORD": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "{{MONGO_INITDB_ROOT_PASSWORD}}"
                    },
                    "MONGO_INITDB_ROOT_USERNAME": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    }
                  },
                  "volumeMounts": {
                    "c57cbcb5-8123-41ec-b182-2e27a8fb08fe": {
                      "mountPath": "/data/db"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-18T14:48:08.729Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_f5777a31c92c45338a82",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "BUILDING,BUILDING,CRASHED,CRASHED"
      }
    ]
  }
}
