I'm trying to configure a review app on Heroku. For every PR, I'd like to deploy and build the Dockerfile, then run my migrations command.
With the below configs, the Dockerfile deploys fine, and the app appears to work as intended.
Dockerfile:
FROM hasura/graphql-engine:v1.0.0-beta.4
ENV HASURA_GRAPHQL_ENABLE_CONSOLE=true
CMD graphql-engine \
--database-url $DATABASE_URL \
serve \
--server-port $PORT
heroku.yml
build:
docker:
web: Dockerfile
app.json
{
"name": "my_project",
"formation": {
"web": {
"quantity": 1,
"size": "free"
}
},
"addons": [
{
"plan": "heroku-postgresql:hobby-dev",
"options": { "version": "9.6" }
}
],
"scripts": {},
"buildpacks": [],
"stack": "container"
}
But, when I add (what I think is) the release script for migrations, the build fails.
heroku.yml with release script:
release:
image: Dockerfile
command:
- cd ./migrations && ./hasura migrate apply --endpoint $(heroku info -s | grep web_url | cut -d= -f2)
This results in the build error:
=== Fetching app code...
=!= Couldn't find the release image configured for this app. Is there a matching run process?
I've also tried to add a release
key to the scripts
key in app.json
, but this doesn't appear to do anything.