Estou tentando realizar um deploy de uma aplicação apenas API utilizando heroku, porém eu realizo o deploy e quando tento realizar um get em alguma rota eu recebo:
Status: 503 Service Unvailable.
Meu ProcFile:
release: ENV_SILENT=true node ace migration:run --force web: ENV_SILENT=true npm start
Quando eu utilizo o comando: git push heroku master
eu recebo:
When i run git push heroku master i get:
Enumerating objects: 5, done. Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads Compressing objects: 100%
(3/3), done. Writing objects: 100% (3/3), 291 bytes | 145.00 KiB/s,
done. Total 3 (delta 2), reused 0 (delta 0) remote: Compressing source
files... done. remote: Building source: remote: remote: -----> Node.js
app detected remote: remote: -----> Creating runtime environment
remote: remote: NPM_CONFIG_LOGLEVEL=error remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true remote: NODE_VERBOSE=false remote:
remote: -----> Installing binaries remote: engines.node
(package.json): 10.16.3 remote: engines.npm (package.json):
unspecified (use default) remote: remote: Resolving node version
10.16.3... remote: Downloading and installing node 10.16.3... remote: Using default npm version: 6.9.0 remote: remote: -----> Restoring
cache remote: - node_modules remote: remote: -----> Installing
dependencies remote: Installing node modules (package.json +
package-lock) remote: added 137 packages from 91 contributors and
audited 5288 packages in 10.225s remote: found 2 high severity
vulnerabilities remote: run npm audit fix to fix them, or npm audit
for details remote: remote: -----> Build remote: remote: ----->
Pruning devDependencies remote: removed 137 packages and audited 4976
packages in 5.253s remote: found 2 high severity vulnerabilities
remote: run npm audit fix to fix them, or npm audit for details
remote: remote: -----> Caching build remote: - node_modules remote:
remote: -----> Build succeeded! remote: -----> Discovering process
types remote: Procfile declares types -> release, web remote: remote:
-----> Compressing... remote: Done: 26M remote: -----> Launching... remote: ! Release command declared: this new release will not be
available until the command succeeds. remote: Released v20 remote:
https://xxx.herokuapp.com/ deployed to Heroku remote: remote:
Verifying deploy... done. remote: Running release command... remote:
remote: Nothing to migrate remote: Waiting for release.... done. To
https://git.heroku.com/xxx.git xxx..62bc4e0 master -> master
Eu tentei diferentes rotas que funciona no localhost porém todas estão retornando status 503 no heroku, existindo ou não.
Meu log no heroku:
2019-11-28T12:49:46.000000+00:00 app[api]: Build started by user [email protected]
2019-11-28T12:50:15.502786+00:00 app[api]: Running release v21 commands by user [email protected]
2019-11-28T12:50:15.502786+00:00 app[api]: Deploy xxx by user [email protected]
2019-11-28T12:50:15.991700+00:00 app[api]: Starting process with command `/bin/sh -c 'if curl $HEROKU_RELEASE_LOG_STREAM --silent --connect-timeout 10 --retry 3 --retry-delay 1 >/tmp/log-stream; then
2019-11-28T12:50:15.991700+00:00 app[api]: chmod u+x /tmp/log-stream
2019-11-28T12:50:15.991700+00:00 app[api]: /tmp/log-stream /bin/sh -c '"'"'ENV_SILENT=true node ace migration:run --force'"'"'
2019-11-28T12:50:15.991700+00:00 app[api]: else
2019-11-28T12:50:15.991700+00:00 app[api]: ENV_SILENT=true node ace migration:run --force
2019-11-28T12:50:15.991700+00:00 app[api]: fi'` by user [email protected]
2019-11-28T12:50:17.000000+00:00 app[api]: Build succeeded
2019-11-28T12:50:19.984716+00:00 heroku[release.4574]: Starting process with command
/bin/sh -c 'if curl https://heroku-release-output.s3.amazonaws.com/log-stream?X-Amz-Algorithm=xxx --silent --connect-timeout 10 --retry 3 --retry-delay 1 >/tmp/log-stream; then chmod u+x /tmp/log-stream /tmp/log-stream /bin/sh -c '"'"'ENV_SILENT=true node ace migration:run --force'"'"' else ENV_SILENT=true node ace migration:run --force fi'
2019-11-28T12:50:20.562678+00:00 heroku[release.4574]: State changed from starting to up
2019-11-28T12:50:25.427722+00:00 heroku[release.4574]: State changed from up to complete
2019-11-28T12:50:25.404630+00:00 heroku[release.4574]: Process exited with status 0
2019-11-28T12:50:25.289830+00:00 app[release.4574]: [36mNothing to migrate[39m
2019-11-28T12:50:28.589813+00:00 heroku[web.1]: State changed from crashed to starting
2019-11-28T12:50:27.841393+00:00 app[api]: Release v21 created by user [email protected]
2019-11-28T12:50:31.893318+00:00 heroku[web.1]: Starting process with command
ENV_SILENT=true npm start
2019-11-28T12:50:34.382933+00:00 app[web.1]:
2019-11-28T12:50:34.382959+00:00 app[web.1]: > [email protected] start /app
2019-11-28T12:50:34.382961+00:00 app[web.1]: > cross-env NODE_ENV=production node server.js
2019-11-28T12:50:34.382963+00:00 app[web.1]:
2019-11-28T12:50:35.182502+00:00 app[web.1]: [32minfo[39m: serving app on http://localhost:35169
2019-11-28T12:52:38.217941+00:00 heroku[web.1]: State changed from starting to crashed
2019-11-28T12:52:38.088185+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2019-11-28T12:52:38.088273+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-11-28T12:52:38.194510+00:00 heroku[web.1]: Process exited with status 137