heroku の buildpackをつくる

イシュー

  • PostGraphile の buildpackがなかったから、、

参考

heroku button でつくったアプリのソースをいじる場合

Build succeeded からの reject

remote: -----> Build succeeded!
remote: -----> Node.js app detected
remote: /app/tmp/buildpacks/caf39e5e83660fe2a5970d2bddd762df2161638e0e5b68d9c8b0
db88c753791f397606869920f2f11f8493d5a278c0c4cec684e717b18497ffacbb6bcc29dacf/bin
/compile: line 19: /app/tmp/buildpacks/caf39e5e83660fe2a5970d2bddd762df2161638e0
e5b68d9c8b0db88c753791f397606869920f2f11f8493d5a278c0c4cec684e717b18497ffacbb6bc
c29dacf/vendor/jq: Permission denied
remote:  !     Push rejected, failed to compile Node.js app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to postgraphile-sb1.
remote:

jq

heroku 公式のbuildpack 作成ページ

PostGraphile の起動パラメータ

2018-06-28T08:33:38.661204+00:00 app[web.1]:   ‣ Connected to Postgres instance
postgres://ec2-50-19-251-65.compute-1.amazonaws.com:5432/da2g3j9k4o63m9
2018-06-28T08:33:38.661313+00:00 app[web.1]:   ‣ Introspected Postgres schema(s)
 salesforce
2018-06-28T08:33:38.661358+00:00 app[web.1]:   ‣ GraphQL endpoint served at http
://localhost:54454/graphql
2018-06-28T08:33:38.661413+00:00 app[web.1]:   ‣ GraphiQL endpoint served at htt
p://localhost:54454/graphiql
2018-06-28T08:33:38.661463+00:00 app[web.1]:
2018-06-28T08:33:38.661519+00:00 app[web.1]: * * *
2018-06-28T08:33:38.661553+00:00 app[web.1]:
2018-06-28T08:34:36.639767+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web
process failed to bind to $PORT within 60 seconds of launch
2018-06-28T08:34:36.639864+00:00 heroku[web.1]: Stopping process with SIGKILL
2018-06-28T08:34:36.713474+00:00 heroku[web.1]: Process exited with status 137
2018-06-28T08:34:36.960687+00:00 heroku[web.1]: State changed from starting to c
rashed
Error: connect ETIMEDOUT 50.19.251.65:5432
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)

$
2018-06-28T09:47:03.665129+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web
process failed to bind to $PORT within 60 seconds of launch
2018-06-28T09:47:03.665252+00:00 heroku[web.1]: Stopping process with SIGKILL
2018-06-28T09:47:03.802917+00:00 heroku[web.1]: State changed from starting to c
rashed
2018-06-28T09:47:03.770557+00:00 heroku[web.1]: Process exited with status 137
2018-06-28T09:47:11+00:00 app[postgres.10]: [PURPLE] [18-1]  sql_error_code = 00
000 LOG:  checkpoint starting: time
2018-06-28T09:47:20+00:00 app[postgres.10]: [PURPLE] [19-1]  sql_error_code = 00
000 LOG:  checkpoint complete: wrote 90 buffers (0.1%); 0 WAL file(s) added, 0 r
emoved, 0 recycled; write=9.028 s, sync=0.001 s, total=9.089 s; sync files=43, l
ongest=0.001 s, average=0.000 s; distance=49016 kB, estimate=78751 kB
2018-06-28T09:46:42+00:00 app[heroku-postgres]: source=HEROKU_POSTGRESQL_PURPLE
sample#current_transaction=675 sample#db_size=8787431bytes sample#tables=6 sampl
e#active-connections=9 sample#waiting-connections=0 sample#index-cache-hit-rate=
0.89818 sample#table-cache-hit-rate=0.95833 sample#load-avg-1m=0 sample#load-avg
-5m=0 sample#load-avg-15m=0 sample#read-iops=0 sample#write-iops=0.0083333 sampl
e#memory-total=4044868kB sample#memory-free=3346000kB sample#memory-cached=53630
8kB sample#memory-postgres=22256kB