我有以下 app.json 设置来在 Heroku 中创建评论应用程序。
{
"name": "Small Sharp Tool",
"description": "This app does one little thing, and does it well.",
"keywords": [
"rails",
"ruby",
"angular"
],
"scripts": {
"postdeploy": "bash script/bootstrap.sh"
},
"env": {
"SECRET_TOKEN": {
"description": "A secret key for verifying the integrity of signed cookies.",
"generator": "secret"
},
"WEB_CONCURRENCY": {
"description": "The number of processes to run.",
"value": "5"
},
"LANG": {
"value": "en_US.UTF-8"
},
"RAILS_LOG_TO_STDOUT": {
"value": "enabled"
},
"S3_KEY": {
"required": true
},
"S3_SECRET": {
"required": true
},
"RAILS_SERVE_STATIC_FILES": {
"value": "true"
}
},
"formation": {
"web": {
"quantity": 1
},
"sidekiq": {
"quantity": 1
}
},
"addons": [
{
"plan": "heroku-redis:hobby-dev",
"as": "Redis"
},
{
"plan": "heroku-postgresql:hobby-dev",
"as": "postgresql",
"options": {
"version": "12"
}
}
],
"buildpacks": [
{
"url": "heroku/ruby"
},
{
"url": "heroku/nodejs"
},
{
"url": "https://github.com/simplefractal/heroku-buildpack-wkhtmltopdf.git"
}
],
"environments": {
"test": {
"scripts": {
"test": "bundle exec rake test"
}
}
},
"stack": "heroku-16"
}
并且bootstrap.sh
文件目前只有pg_restore
命令,并且根据日志似乎恢复正常。
shell脚本文件有:
#!/bin/bash
echo $HEROKU_APP_NAME
curl https://s3-bucket-url | pg_restore --verbose --clean --no-acl --no-owner --dbname $POSTGRESQL_URL
但我收到错误为Could not create review app. Postdeploy exit code was not 0.
. 我在这里想念什么?