I am trying to push a small practice app called "flask" from git to heroku, yet, no matter what I do, I encounter the same issue when I use any of these commands in the terminal:
heroku logs --app flask
heroku access --app flask
heroku git:remote -a flask
results always in the same output:
You do not have access to the app flask.
The code of the app.py file:
from flask import Flask
from flask import render_template
app = Flask(__name__)
#app.route('/')
def hello_world():
return 'What a beautiful, rainy day!'
#app.route('/templates')
def index():
return render_template('hello.html')
if __name__ == "__main__":
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port)
I hope that is sufficient information for you guys anyways let me know! Thank you!
fixed the issues with:
heroku create
heroku git:remote [appname]
can't access something which is not existing...
Related
I can check logs by heroku logs --app=my_app_name . I want to access app's console as shown in the picture. How can I access by heroku cli?
To access Heroku app bash by CLI:-
heroku login
heroku ps:exec --app=scoreboard-backend-dev
scoreboard-backend-dev is the app name
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.
I have a shiny app and want to deploy it to Heroku. I tried to follow the steps as mentioned in:
https://github.com/btubbs/heroku-buildpack-shiny
I created a git Git repository and put the R files into it. Then, I created an app in heroku and tell Heroku to use a custom buildpack for my app. But, I was not be able to enable Heroku websockets support.
Error is:
Couldn't find that feature.
I can't figure out how to deal with this problem. Is there any other way to deploy the shiny app to Heroku?
Have you seen https://github.com/virtualstaticvoid/heroku-docker-r?
Check out the example shiny app too. To specify additional dependencies, you can still use init.R.
To deploy using Docker, you might have to move your current Heroku app to a container stack. This can be done with the heroku stack:set CLI command:
$ heroku stack:set container
Here's a minimal example. Basically:
Create run.R file with the following
library(shiny)
port <- Sys.getenv('PORT')
shiny::runApp(
appDir = getwd(),
host = '0.0.0.0',
port = as.numeric(port)
)
Commit to git
Create a new heroku app with
heroku create --buildpack https://github.com/virtualstaticvoid/heroku-buildpack-r.git
git push heroku master
That's all there is to it.
Another way would be to deploy using Docker. I am not an expert, but it took me a couple of days to deploy an app using this soluation. Many tutorials exist and could bring you to achieving this.
How can I access memcache on Heroku via command, I just want to look up some key and delete it.
Thanks
heroku run console --app your-app-name
for Cedar, or
heroku console --app your-app-name
for Bamboo and Aspen. Then
m = Memcached.new
On heroku, how to get the whole value of DATABASE_URL ?
When I issue a
heroku config --app APP_NAME
I get several config parameters but the DATABASE_URL is not entirely visible
DATABASE_URL => postgres://ruhej...s.com/oeuhenchej
Any idea ?
$ heroku config --app APP_NAME
(The Heroku toolbelt has been updated since the question was asked; the command now shows the entire DATABASE_URL.)
$ heroku pg:credentials:url YOUR_DATABASE_NAME
Gives you all the informations needed (url, port, dbname, user, password):
Connection information for default credential.
Connection info string:
"dbname=xxxxxxxxxxxxxx host=yyyyyyyyyyyyyyyyyyyyyyyyyyy.amazonaws.com port=5432 user=zzzzzzzzzzzzzz password=************* sslmode=require"
Connection URL:
postgres://zzzzzzzzzzzzzz:*************#yyyyyyyyyyyyyyyyyyyyyyyyyyy.amazonaws.com:5432/xxxxxxxxxxxxxx
This may seem really basic but your heroku APP_NAME is app_name.heroku.com. You can find that by logging into heroku.com and looking in your account. In order to get your app config variables you simply type into the console:
heroku config --app APP_NAME
To get the full database URL, use config:get from the Heroku CLI;
heroku config:get DATABASE_URL -a my-app-name
To get PostgreSQL dump file from heroku :-
heroku pg:backups:capture
heroku pg:backups
it shows all the backups
heroku pg:backups:url BackupID