dpetrick / prisma-heroku Goto Github PK
View Code? Open in Web Editor NEWExample repository to show how to deploy Prisma to Heroku.
Example repository to show how to deploy Prisma to Heroku.
Hi, thank you for writing this up!
I've been following this in order to deploy to Heroku and found some issues when connecting to the database. These are the issues I'm seeing.
When the server starts I get:
SEVERE: Connection error:
org.postgresql.util.PSQLException: FATAL: permission denied for database "postgres"
Detail: User does not have CONNECT privilege.
This is very weird, because I passing a database name which is not postgres
. And then later I start getting the error:
SEVERE: Connection error:
org.postgresql.util.PSQLException: FATAL: too many connections for role "nfcsdwxwnplgnf"
This second error makes more sense, because it informs the correct user I am using to connect. But since Heroku Postgres database has a connection cap for 20, there is not much I can do to solve this. Is there a way to set Prisma connection pool max connections?
With my deployment I am able to run prisma deploy
and see that my tables were created. But I can't query the Graphql API because of the connection errors.
Hi there, first off, thanks so much for this little guide!
However, I keep getting this error whenever the app starts on Heroku:
2019-04-24T15:24:04.658285+00:00 heroku[web.1]: Starting process with command `/bin/sh -c /app/start.sh`
2019-04-24T15:24:09.517957+00:00 heroku[web.1]: State changed from starting to crashed
2019-04-24T15:24:09.490802+00:00 heroku[web.1]: Process exited with status 1
2019-04-24T15:24:09.228159+00:00 app[web.1]: Exception in thread "main" java.lang.RuntimeException: Unable to load Prisma config: com.prisma.config.InvalidConfiguration: Expected Int for field port, got <unset>
2019-04-24T15:24:09.228523+00:00 app[web.1]: at scala.sys.package$.error(package.scala:26)
2019-04-24T15:24:09.228609+00:00 app[web.1]: at com.prisma.config.ConfigLoader$.load(ConfigLoader.scala:40)
2019-04-24T15:24:09.228744+00:00 app[web.1]: at com.prisma.local.PrismaLocalDependencies.<init>(PrismaLocalDependencies.scala:48)
2019-04-24T15:24:09.228833+00:00 app[web.1]: at com.prisma.local.PrismaLocalMain$.delayedEndpoint$com$prisma$local$PrismaLocalMain$1(PrismaLocalMain.scala:13)
2019-04-24T15:24:09.228971+00:00 app[web.1]: at com.prisma.local.PrismaLocalMain$delayedInit$body.apply(PrismaLocalMain.scala:8)
2019-04-24T15:24:09.229064+00:00 app[web.1]: at scala.Function0.apply$mcV$sp(Function0.scala:34)
2019-04-24T15:24:09.229157+00:00 app[web.1]: at scala.Function0.apply$mcV$sp$(Function0.scala:34)
2019-04-24T15:24:09.229304+00:00 app[web.1]: at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
2019-04-24T15:24:09.229405+00:00 app[web.1]: at scala.App.$anonfun$main$1$adapted(App.scala:76)
2019-04-24T15:24:09.229485+00:00 app[web.1]: at scala.collection.immutable.List.foreach(List.scala:388)
2019-04-24T15:24:09.229729+00:00 app[web.1]: at scala.App.main(App.scala:76)
2019-04-24T15:24:09.229822+00:00 app[web.1]: at scala.App.main$(App.scala:74)
It seems the ${PORT}
referenced in prerun_hook.sh
is not being set somehow. Any ideas what might resolve this? I've tried setting it manually but that doesn't do anything
First of all, thank you very much for this repo! Saved my day.
I did, however, have to change the Dockerfile to
ARG tag
FROM prismagraphql/prisma:$tag
COPY ./prerun_hook.sh /app/prerun_hook.sh
RUN chmod a+x /app/start.sh
RUN chmod a+x /app/prerun_hook.sh
CMD bash /app/start.sh
as I was getting Permission denied
errors when it tried to run the shell scripts.
Can you explain what start.sh is in your dockerfile?
https://github.com/dpetrick/prisma-heroku/blob/master/Dockerfile#L4
I am also struggling to follow in your repo is where you actually run prisma deploy
command to deploy your data model?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.