Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "Deploy to Heroku" button #66

Closed
jaredpalmer opened this issue May 29, 2019 · 6 comments · Fixed by #166
Closed

Make "Deploy to Heroku" button #66

jaredpalmer opened this issue May 29, 2019 · 6 comments · Fixed by #166
Assignees
Labels

Comments

@jaredpalmer
Copy link

jaredpalmer commented May 29, 2019

Problem

Deploying and getting started requires reading a decent amount of the docs.

Solution

Create "deploy to heroku" button and add to the readme, so folks can quickly spin up a server. If more config is required, maybe a little SPA to generate the config based on some options might be required.

@montogeek
Copy link

This is nice to have.
I want to contribute to this project, if this is accepted by the creator, I can implement it.

@paularmstrong
Copy link
Owner

That would be really awesome. I'm really not super familiar with heroku, I just kind of crashed through getting a Postgres DB up on it and then hosting was less difficult.

That being said, this would be a really great option for the @build-tracker/server CLI. I could imagine it would be possible to make it a composable plugin for your configuration, so we can keep specific functionality out of the core. Heroku, for example, is just one implementation. I could imagine it would be useful for people to "deploy to Firebase" or something else.

Just throwing out ideas to get the ball rolling:

Example configuration:

module.exports = withHeroku(
  withPostgres({ // postgres required for heroku?
    pg: {}, // Will default to environment variables that Heroku provides!
    heroku: {
      appName: 'build-tracker-demo'
    },
    url: 'https://build-tracker-demo.herokuapp.com'
  })
);

Then I could see some requirements:

  • createServer config function provided by withHeroku will spin up the application
  • createDatabase config function provided by withHeroku will initialize the postgres addon
  • The create* functions could be triggered by a new command bt-server create
  • And then deployed via bt-server deploy
    • perhaps auto-run by create, but still separate, because:
    • deploy will be able to re-deploy the server at will, if BT is ever updated, since restarting the server will enable any database migrations provided by the withPostgres and withMariadb plugins

Thoughts?

@paularmstrong
Copy link
Owner

PS: Working on more contributing docs that have specifics about plugins as well as a "project vision" to help keep ya'll informed on what went on in my head creating this. @montogeek if you want to get started on this and get stuck, feel free to put up an early PR as a draft or reach out to me on Twitter.

@montogeek
Copy link

I can't not longer work on this, feel free to pick it up.

@eps1lon
Copy link
Contributor

eps1lon commented Jul 31, 2019

It would already help a lot to provide an example configuration for heroku or a written guide how to set this up. After digging into heroku and fixing various existing issues I'm presented with plain html in the console after yarn bt-cli upload-build and no error in the heroku logs.

@paularmstrong paularmstrong added this to the v1.0.0 milestone Sep 9, 2019
@paularmstrong paularmstrong self-assigned this Feb 17, 2020
@paularmstrong
Copy link
Owner

I've got a start with a config-less version here: https://github.com/paularmstrong/build-tracker-heroku

The down-side to something like this is that you're stuck with an empty artifact configuration. You can't set up any budgets this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants