0

Below is my app.json:

{
    "environments": {
      "review": {
        "addons": [
            "heroku-postgresql:in-dyno"
        ],
        "scripts": {
            "postdeploy": "php artisan migrate --seed"
        }
      }
    }
  }

In my understanding, a review app with such configuration should be starting with Postgres DB and run my script afterwards; the app starts, yet no Postgres is attached and I don't see any errors in Build log nor Application Logs.

How should my app.json be structured to do what I want?

eithed
  • 103
  • Does the app work? Your question is a bit unclear on that front. If it doesn't, it's possible that php artisan migrate --seed needs a --force parameter to bypass the "your app is in production, continue y/n?" prompt. – ceejayoz Jun 11 '19 at 12:49
  • The app does work. Added clarification on that part – eithed Jun 11 '19 at 13:51
  • OK, so your app.json is doing what you told it to do, and your app works. What's the issue? – ceejayoz Jun 11 '19 at 13:52
  • yet no Postgres is attached, In my understanding, a review app with such configuration should be starting with Postgres DB – eithed Jun 11 '19 at 13:53

1 Answers1

1

in-dyno means a Postgres instance won't be attached - it'll be directly within the dyno itself. Not seeing errors in the build log would, thus, be normal.

ceejayoz
  • 33,167
  • 1
    Ah, silly me - I've copied this from other configuration and was surprised it's not working, but reading it over at https://devcenter.heroku.com/articles/heroku-ci-in-dyno-databases I shouldn't be specifying in-dyno at all for review – eithed Jun 11 '19 at 13:55