Dokku cannot see log, "Application's container not found" - ruby

I am deploying my app on dokku. I have not yet deploy successfully because error in deployment step. I want to see log but Dokku said that "Application's container not found"
root#dokku-s-1vcpu-3gb-sgp1-01:~# dokku apps:list
=====> My Apps
world_cup_json
root#dokku-s-1vcpu-3gb-sgp1-01:~# dokku logs world_cup_json
Application's container not found

Solved
We can see logs once the apps is deployed (deployed successfully). My apps is not deploy yet so I cannot see log.

Related

No images to push error when container:push web in docker laravel heroku

I just learned about this problem so there is a bug that has not been fixed yet. For example "No images to push" when running the "heroku container:push web" command. Please help me, thanks you so much!!!
my err:
heroku.yml:
web.dockerfile:
Heroku provides two different methods for deploying with Docker that you're mixing up:
The container registry uses the heroku container:push command, but not heroku.yml.
If you wish to use this option, you need to rename your web.dockerfile to Dockerfile.web (or simply Dockerfile if it is your only image). You should also delete heroku.yml since it doesn't do anything.
Once your Dockerfile has been renamed, heroku container:push should be able to build and push your container.
Building with heroku.yml doesn't use heroku container:push.
If you wish to use this version, you'll need to follow a different set of instructions:
Make sure your heroku.yml file is committed
Tell Heroku to use the container stack:
heroku stack:set container
Deploy your code, e.g. by running git push heroku main
With this flow, Heroku will build your image from your heroku.yml file server-side.

How to view heroku logs when running an app locally?

I'm running my heroku app locally using heroku local web with this being the only line in my Procfile:
web:node index.js
How can I get it to print live logs while running locally?
I found this answer, but there are some things missing from that explanation, and I'm struggling with it, since I'm new to heroku. Any help is appreciated.

Inspect Heroku local logs

I have an app that's deployed to production, but I'm also testing it locally.
When I run heroku logs --tail, I get the production logs. I can see when I make a request to the webapp and it shows up instantly in the logs.
However, my app on heroku local returns me a "500 Server Error." I want to inspect these logs to understand why. However, I can't find these logs. Is there a command like heroku local logs --tail?
In order to see logs in IDE or Console use below command
Local:
I'm using Python script and the same deployed in heroku. I want to run locally by using heroku local command and would like to see logs in console but it is not showing logs in IDE Console. So for workaround i tried below command and it works well. Now I can see logs in the IDE itself.
E.g. for Python Script:
heroku local:run python test.py
E.g. for Rails:
heroku local:run rails console
Production:
heroku logs --tail --app <app-name>

How to debug an Heroku app, since logs don't help att all?

I'm trying to deploy a nodejs app on heroku for the first time, but I'm stuck at the command "heroku open" since it gives me an application error and no information as to where it crashed. The app runs locally without problem.
How would you proceed to debug this?
Thanks for your advice and time.
If running heroku local does not help, run a remote shell:
heroku run -a <your app name> /bin/bash, and there run npm start to see the logs and debug the issue on the Heroku server.
When running your app "locally", have you tried running heroku local? This runs the app through Heroku, but on local server.

Deploy playframework application on heroku

I am trying to deploy a playframework application to Heroku. After deploying, I trying to access the URL Heroku gave me, it only show a welcome page as below :
Heroku | Welcome to your new app!
Refer to the documentation if you need help deploying.
Is any wrong ??
Your app is not recognized by Heroku (Heroku does not know how to start your app).
You need to create a file called Procfile in the top directory of your Play! application:
web: play run --http.port=$PORT $PLAY_OPTS
You will more details in this documentation.

Resources