Setup auto deployment for laravel app from bitbucket to heroku - heroku

I'm trying to setup bitbucket pipeline to auto deploy laravel app to heroku
1. Created an app on heroku
2. pushed the code to bitbucket repo
3. added repo environment on bitbucket with the name of the heroku app and app key
4. created .yml file and put this code http://prntscr.com/rb3u4p
5. Pipeline fails http://prntscr.com/rb3ybo
It says the zip file name i mentioned on the yml not found, do i need to create the zip on Heroku. I already created the same zip file on my local and pushed to bitbucket.

You have to zip the source code of you application in your pipelines so the pipe can push in to Heroku. This guide provides a good example https://confluence.atlassian.com/bitbucket/deploy-to-heroku-872013667.html

Related

Question Regarding Node JS App Deployment on Heroku

I have a nodejs application that I need deploy on Heroku
that Connects with a mongodb Database
Now I need to host this on heroku and have a dot env file which contains the creds (which contains DB_URL, DB_NAME , DB PASS)
So should I add .env into gitignore and the push the code into github repo or don't add it to gitignore and then push. Because I will be connecting this repo into heroku for deployment

How to deploy vuejs + adonis-api only project on heroku?

First thing i am very new in Vue, adonis and heroku. so please tell me all the steps in answer
i have a project build in vuejs(frontend) and adonisjs api-only and i want to deploy this project on heroku with postgresql database.
What i am done till now:-
1). create a heroku account
2). create a project on heroku
3). upload frontend dist/ folder on heroku using these command
git add --all
git commit -m "initial commit"
git push heroku master
And my frontend run perfectly but i don't know how to deploy backend and how to create database
in heroku.
my working directories are
To deploy the back-end application you can do the same steps as you did for the other application.
Here's what's changing:
Add database with heroku add-ons (https://elements.heroku.com/addons/heroku-postgresql)
! When adding the add-on new heroku environment variables are created. (If they do not appear, see below)
Interesting things to know:
To execute Adonis commands : node ace <your_command> (node ace migration:run)
I advise you to use the heroku environment variables. Don't forget to add the variable ENV_SILENT = true to avoid errors because of the.env file.
Get connection db informations: (on your postgresql add-on):
Some additional information
Personal project deployed on heroku (.gitlab-ci.yml) : https://gitlab.com/CrBast/website
Interesting article : https://scotch.io/tutorials/deploying-adonisjs-apps-to-heroku
If my explanations are not clear, don't hesitate to tell me :)

Deploying Angular-fullstack app on Heroku using Codeship

I'm trying to deploy a website via CodeShip unto Heroku. The site is built with Yeoman's Angular-Fullstack generator, which is pushed to GitHub. Codeship detects the push, builds the entire thing and then the trouble start.
Angular-Fullstack is set up so that the dist/ folder contains the entire Heroku app, so blindly deploying everything will not work on Heroku.
Locally, I can use the Heroku toolbelt to login, add a remote inside the dist folder, and then use grunt buildcontrol to deploy the entire thing unto Heroku.
But in Codeship there are a few caveats:
* I cannot install the Heroku toolbelt with wget because it needs sudo and Codeship doesn't support that
* If I could, I couldn't login to Heroku using the CLI because I cannot interact with the shell in Codeship
* I cannot go into the dist/ folder and after adding the remote, simply push to Heroku because I need to enter my credentials.
Is there a way that I missed here? I'd like to let Codeship handle everything from building to deployment to Heroku (only on the master branch).
Figured it out!
I skipped the step where I was trying to install the Heroku Toolbelt, and just added the repo on Heroku as remote:
git remote add heroku ssh://git#heroku.com/[your-heroku-app-name].git
Codeship has public keys available for every build. So, I added that publick key to my Heroku account.
Then I noticed that Git was still trying to push using HTTPS instead of SSH, so I added this to the deployment script:
git config --global url.ssh://git#heroku.com/.insteadOf https://git.heroku.com/
This made sure that Git uses the SSH url for Heroku. I then let Codeship build the entire project and push it with grunt buildcontrol:heroku.

Amazon Web Services secret key & id not being found in my bash profile when pushing cloned Rails 4 S3 app to Heroku

I have an application I built that pushes images to Amazon S3 using Carrierwave. I forked and cloned that repo on Github. When trying to push it as a new application to Heroku, Heroku keeps throwing an error that it can't find my Amazon S3 secret key and ID and aborts the push. I have the original Secret Key and ID in my bash profile and pushing to heroku worked with that setup. I can't figure out why it isn't working with my clone of the application.
You need to set configuration varibles via heroku config:set KEY=VALUE for them to be available on Heroku
Read more at https://devcenter.heroku.com/articles/config-vars

Using local configs in a Heroku deployment environment

I'm trying to migrate my app to Heroku - I have a config file that varies with development/staging/production environments as it contains uniquely assigned keys (from Facebook, S3, etc.), so I keep it out of the repository and keep the configs local.
As such I'm trying to find a solution for Heroku to have that config file since Heroku deploys from the repository. I noticed Heroku deploys from the master branch - can it deploy from another branch? Because then I could commit the Heroku configs there, and have it not overwrite the other environments' configs every time it pulls.
Thanks!
I believe Heroku always launches the master branch of the Gt repo, but they support config vars to address exactly this issue.
You can use foreman and heroku-config for this.
Check out the article at heroku dev center:
http://devcenter.heroku.com/articles/config-vars
I love this because you can keep the .env file in .gitignore and shield your production variables from ending up in the repository.

Resources