airbrake:heroku:add_deploy_notification with multiple apps - deployment

Attempting to set up deploy notifications to Airbrake on Heroku deploy with rake airbrake:heroku:add_deploy_notification when you have multiple Heroku apps (i.e. git remotes) will yield:
! Multiple apps in folder and no app specified.
! Specify app with --app APP.
It appears Airbrake are aware of this but no real solution is offered.
Is there a work around?

Prior to running rake airbrake:heroku:add_deploy_notification you can set a default Heroku remote by setting a git config heroku.remote to the desired branch.
So for example, to set up apps whose Heroku remotes are staging and production, you can:
$ git config heroku.remote staging
$ rake airbrake:heroku:add_deploy_notification
$ git config heroku.remote production
$ rake airbrake:heroku:add_deploy_notification
$ git config --unset heroku.remote

A fix has now been pushed for this.
You can set the environment variable HEROKU_APP to the name of the app.

Related

Updating the stack on Heroku

I have a small application running there using the heroku-buildpack-perl buildpack. It's just a small Plack application and it had been running fine for about two years.
But then, Heroku informed me that the stack it was running on was getting too old and I needed to upgrade it. "Just run a new deploy and the application will be installed to a new stack!" said they or something like that.
I inniciated a new deploy by creating an empty commit in the git repository, the deployment ran... but the application was crashing. From the logs I realised they updated the Perl version, but the deployment didn't update my XS libraries (I use local::lib, not sure if that's part of the buildpack or I set it up manually when creating the application back then).
In the end, I deleted the application and recreated it on the new stack, which worked OK. I don't keep any data anywhere so it was not a problem. What's the correct way to update the stack, though? There should be an option somewhere that tells Heroku to rebuild the dependencies, right?
Crossposted to PerlMonks.
Setting Heroku stack. In this case to heroku-20 equivalent with Ubuntu 20.04
$ heroku stack:set heroku-20
Since you are using a different stack, the old cache may not be compatible. Clearing cache:
$ heroku plugins:install heroku-builds
$ heroku builds:cache:purge -a appname
Triggering a rebuild:
$ git commit --allow-empty -m "Purge cache"
$ git push heroku master
Note:
You have to make sure that the buildpack you are using is compatible with heroku-20. If it is not it will not work. You will have to wait for the maintainer to update, use a different buildpack or fix the buildpack yourself and use that.
If you follow this step by step it is similar to deploying an entirely fresh app.

How to deploy flutter web on Heroku

I built a web application in Flutter and run the command flutter build web successfully. I'm trying to find a way to deploy it on Heroku like my react applications but found nothing in Heroku documentation.
we run flutter web or static page run with the help of php.we can use many other language .we can simply use php without any more work.
First
create app in heroku after this will shown .
after run flutter build web in the root of the project folder it will generate static content in build/web .copy the file to any other directory and open cmd like this
create two file index.php and composer.json
in index.php
add this
<?php include_once("index.html");
in composer.json
add this (braces)
{}
after run the command in the
`heroku login`
heroku git:clone -a appname
git add .
git commit -am "make it better
git push heroku master
after running this it may be show any error .if not show any error
run this https://appname.herokuapp.com/#/ .your website will be live.
Try these simple steps.
first, you need to create your app on Heroku, after typing the commands in your project directory console
heroku login
git init
heroku git:remote -a [your app name in heroku]
git commit -m "[your commit message]"
heroku buildpacks:set diezep/flutter -a [your app name]
git push heroku master

remove git secrets from Ubuntu

I have added git secrets to ubuntu(16.04 LTS) and it was working fine until I was executing these commands,
git secrets --register-aws
git secrets --install ~/.git-templates/git-secrets
git config --global init.templateDir ~/.git-templates/git-secrets
I have removed these files,
~/.git-templates/git-secrets
/usr/bin/git-secrets
from my environment, but still it seems not working fine.
git secrets --scan , gives nothing
How do I remove git-secrets permanently from my PC and re-install or solve this issue.
Currently we need to do this manually.
Delete secrets from .git/config for all local repositories.
Delete secrets from .gitconfig.
Remove commit-msg, pre-commit and prepare-commit-msg hooks from all git repositories.
Change/remove git template so that it does not configure these hooks for newer repos.
Uninstall binary. Following are the multiple places you can look in the Linux based machine.
i. By default all the git core command scripts are available in /usr/lib/git-core/ directory.
ii. Apart from that, you can check in /usr/bin/ and /usr/local/bin/ directories as well.
iii. If you are still NOT able to find the binary, then type which git-secrets to identify the place where actually git-secrets is installed.
There is an issue created for the same in GitHub. You can check the progress in there as well.

Error: Deploying a HelloWorld application to Heroku (Play 2.3.2)

I am trying to deploy a hello world application to heroku.com.
I followed the steps on: playframework.com but it doesn't work.
All steps I made can be viewed here:pastebin.com.. Which steps am I missing?
The issue was solved, after I updated play, sbt (..) using brew update.
Now I can deploy a new project with these commands ():
heroku login
play new appName
cd appName
git init .
git add -A
git commit -m "init"
heroku create
git push heroku master

How to deploy jekyll on slicehost

I have jekyll blog up and running locally. I am not sure how to push the content to slicehost. They have an instruction page but I am not able to follow the instruction.
I have all my content on github. Just need to know how to make post-update hook work?
To deploy a generated Jekyll site, you just need to copy the contents of the local _site directory to the appropriate remote directory on your server (often public_html, but it depends on the server configuration).
Personally, I think the easiest way is to just use rsync, assuming you can use rsync with your server. Then it's as simple as executing the command
$ rsync -avz --delete _site/ user#host:/path/to/web/root
to deploy your site. For my Jekyll-based sites, I encapsulate this in a Rake task so I can just do
$ rake site:deploy
to copy the site to the server.
If you can't use rsync, you can always transfer the _site directory via FTP, which is also pretty easy to do (and with a bit of Ruby scripting, can be automated using Rake as well).
You can use Git, as noted in the Jekyll docs. You will have to have Git installed on your server, and access to using it. If that's the case, you have to create a bare Git repo on your server. In the bare repo, you then create a post-update hook to check out the latest copy of the site. You do this by creating a script at $BARE_REPO/hooks/post-update with contents like the following (as noted here):
#!/bin/sh
unset GIT_DIR && cd /path/to/web/root && git pull
You then clone the bare repository to your web root, like so:
$ cd /path/to/web/root
$ cd ..
$ rm -rf root
$ git clone /path/to/bare/repo.git root
As you can see, it's often easier to use rsync or FTP instead of Git.