Skip to content

Instantly share code, notes, and snippets.

@myonaingwinn
Last active August 22, 2024 00:35
Show Gist options
  • Save myonaingwinn/5ec00ac8e28ebb15bbfeb185b95d45ec to your computer and use it in GitHub Desktop.
Save myonaingwinn/5ec00ac8e28ebb15bbfeb185b95d45ec to your computer and use it in GitHub Desktop.
Heroku Deployment (Sub directory or Subtree)
  1. Create Heroku app on terminal.
    heroku create -a app_name

  2. Add existing Heroku app's remote.
    heroku git:remote -a app_name

  3. Add commit and push (every push will make new builds)

  4. Deploy subfolder directly on Heroku server.
    git subtree push --prefix folder_name remote_name branch_name
    example : git subtree push --prefix server heroku master

  5. When you want to deploy different branch.
    example : git subtree push --prefix server heroku fix/issues/24:master

@myonaingwinn
Copy link
Author

myonaingwinn commented Aug 17, 2022

Deploy Laravel on Heroku

https://salitha94.blogspot.com/2019/11/deploy-laravel-application-on-heroku.html

If you wanna use PostgreSQL, don't forget to change default connection in Laravel_App/config.

Need to add Procfile even for subFolder

http://stayregular.net/blog/deploy-laravel-on-heroku-to-create-oauth2-0-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment