I am trying to use heroku builds:create -a app-name to deploy my app to Heroku but that command triggers the creation of a tarball with the --exclude-vcs-ignores flag which is probably not supported by Travis.
Is there any way around that? Thanks
Related
I am trying to find a way to set the stack to 'container' so I can deploy my app in a docker image rather than heroku-18. Reasons for this are complicated, but necessary.
The Heroku Docker image setup docs say I can do this in my app.json file, like so:
"stack": "container"
but doing this causes an error when deploying through the online interface:
! No default language could be detected for this app.
HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
See https://devcenter.heroku.com/articles/buildpacks
! Push failed
Are there other ways to set the stack to container? For e.g., according to these docs it may also be possible to set this using the Dockerfile, but it's not clear exactly how to do this.
I know I can use the heroku CLI, but I'd prefer to set this up in my git repo as this app will be deployed to other users also.
Thanks in advance for any advice!
Just need to run this command
$ heroku stack:set heroku-18 --app HEROKU_APP_NAME
To set the stack to container using the command line (as an alternative to editing app.json), I believe
heroku stack:set container
will do the trick. You can read more about deploying containers on Heroku here (see Step 3 of Getting Started for the syntax above):
https://devcenter.heroku.com/articles/build-docker-images-heroku-yml
I also faced the same issue.
The app.json specification of "stack: container" method works, when you create a "deploy to Heroku" button. (a gui way) docs
https://heroku.com/deploy?template=https://github.com/user/repo clicking this link will work. the building will be sucessful.
But it does not work if you follow the below approach:
create a new app from heroku dashboard
go to the deploy tab
connect to the github repository
and click deploy
A little while ago the files on my Macbook Pro were deleted by Apple, including a directory from which I used to access Heroku and be able to do command line operations in the Ruby/Rails console. Now that the directory is gone, I'm not sure if it's possible to access this repository from the command line, which I need to do to reduce the size of my database to stay within Heroku limits.
Update
before the directory was deleted on my mac, I used to simply cd into that directory and then run something like bundle exec heroku run console or heroku run bundle exec console, anyways if I did it from that directory heroku knew which application i was trying to access and it would take me into the rails console for it (where I could manipulate data)
Install the Heroku toolbelt (it's unclear whether you still have that)
From the terminal, perform a heroku login to authenticate
From a directory where you want the new app to live, run heroku git:clone APP-NAME
You'll now have a directory, which will have the latest files you pushed to Heroku - which will allow you to do things like git push heroku master, or heroku run rails console.
You probably want to then also attach your git repo where you are storing your source code with something like git remote add origin git#github.com:whoyouare/app-name.git
From the Heroku docs:
You can also take an existing Git repo and add a remote using the git URL provided when you created your app. You may need to do this to associate a Git repo with an existing application. The heroku git:remote command will add this remote for you based on your applications git url.
$ heroku git:remote -a falling-wind-1624
This will add your Heroku repo with the remote name of heroku to your working directory.
please help me,
when I want to upload an rails app to heroku I do this sequence and works creating a new project on heroku
git init
git add .
git commit -m "init"
heroku create
git push heroku master
and then I get a new url like http://-somethingdiferent-.herokuapp.com each time that I need to deploy an project
I dont know how to use that project later without creating other new heroku project
I was thinking to use something like pull of git, but I dont know how is the pull on heroku, maybe -git pull heroku master? but in that case, how can I pull the same project?
please I will like if you know the sequence or any tutorial?
thanks
Try to create an app first
# run this command from the app folder to create a new app
$ heroku open --app the-app-name
# Add it to the remote
$ heroku git:remote -a the-app-name
# push app to heroku
$ git push heroku master
the-app-name shall be replaced by the application name.
one can find more useful stuff here.
This should probably be a super easy question but I can't figure out what I have not done properly.
I run 5 apps on Heroku, on my first three ones I can use commands as:
git push heroku
whereas the new ones I have to explicitly declare
git push git#heroku.com:myappname.git
For the old ones, if I am in the correct folder on my local app I can use commands such as:
heroku logs
to see the logs of that app on Heroku, whereas with the new ones I have to specify
heroku logs -a myapp
It seems like I have missed something with my git "connection" with Heroku.
What have I missed?
The heroku git repo is not associated with your application, use:
git remote add heroku <repo_name>
I cloned a project from github over to my desktop. I used to work on it form my laptop.
However, on laptop heroku does not seem to work for this app eventhough i have it installed.
First problem:
heroku open
>No app specified.
>Run this command from app folder or set it adding --app <app name>
I did not have to specify the --app on my laptop. Because I guess I did command heroku create initially on the lapop.
Second Probelm:
git push heroku master
gives errors
fatal: 'heroku' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
and heroku list
says
! This version of the heroku gem has been deprecated.
! Please update it by running: gem update heroku
First do:
git remote add heroku git#heroku.com:{my-project-name}.git
Where you replace {my-project-name} with the name of the Heroku application as it appears in your Heroku account. For example, if your Heroku account says you have an application named flowing-water-397, then the line would be:
git remote add heroku git#heroku.com:flowing-water-397.git
Then Git and the Heroku gem will know that this Git repo is connected to a Heroku.com application. Then you can do things such as:
git push heroku master
heroku open
Finally, learn a little bit more about Git Remotes.
In addition to the git remote add ... that #Justice mentioned, I also needed to run
git config heroku.remote heroku
(solution found here)
I believe I get the error No app specified. Run this command from an app folder or specify which app to use with --app when I run any ambiguous heroku commands. Example:
heroku logs
It's ambiguous because I have multiple remote repositories specified in my project's .git/config file. The solution for me is simply to specify the remote repository. Example:
heroku logs --remote staging
In the above line --remote staging corresponds to the following in my project's .git/config file:
[remote "staging"]
url = git#heroku.accountname:foo-bar-1234.git
fetch = +refs/heads/*:refs/remotes/staging/*
I hope this helps you.. if not, then perhaps it may help someone else!
When I had this issue it was because I created more than one remote app on heroku.
To remove an existing remote app from heroku use:
git remote rm heroku
then go back and use heroku create to start the process over using the correct app name heroku gives you.
Solution found here:
solution