You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[ ] referenced any relevant issues (or none exist)
3
+
*[ ] added unit tests (or none needed)
4
+
*[ ] written relevant docs (or none needed)
5
+
*[ ] referenced any relevant issues (or none exist)
6
6
7
7
### Guidelines
8
8
9
9
Please add a description of this Pull Request's motivation, scope, outstanding issues or potential alternatives, reasoning behind the current solution, and any other relevant information for posterity.
Copy file name to clipboardexpand all lines: README.md
+35-29
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Boilermaker
2
2
3
-
*Good things come in pairs*
3
+
_Good things come in pairs_
4
4
5
5
Looking to mix up a backend with express/sequelize and a frontend with react/redux? That's `boilermaker`!
6
6
@@ -35,9 +35,10 @@ Now that you've got the code, follow these steps to get acclimated:
35
35
* Create two postgres databases: `boilermaker` and `boilermaker-test` (you can substitute these with the name of your own application - just be sure to go through and change the `package.json` and `.travis.yml` to refer to the new name)
36
36
* By default, running `npm test` will use `boilermaker-test`, while regular development uses `boilermaker`
37
37
* Create a file called `secrets.js` in the project root
38
-
* This file is `.gitignore`'d, and will *only* be required in your *development* environment
38
+
39
+
* This file is `.gitignore`'d, and will _only_ be required in your _development_ environment
39
40
* Its purpose is to attach the secret env variables that you'll use while developing
40
-
* However, it's **very** important that you **not** push it to Github! Otherwise, *prying eyes* will find your secret API keys!
41
+
* However, it's **very** important that you **not** push it to Github! Otherwise, _prying eyes_ will find your secret API keys!
41
42
* It might look like this:
42
43
43
44
```
@@ -78,15 +79,19 @@ Ready to go world wide? Here's a guide to deployment! There are two (compatible)
78
79
Either way, you'll need to set up your deployment server to start:
79
80
80
81
### Prep
81
-
1. Set up the [Heroku command line tools](https://devcenter.heroku.com/articles/heroku-cli)
82
-
2.`heroku login`
83
-
3. Add a git remote for heroku:
84
-
-**If you're creating a new app...**
85
-
1.`heroku create` or `heroku create your-app-name` if you have a name in mind.
86
-
2.`heroku addons:create heroku-postgresql:hobby-dev` to add ("provision") a postgres database to your heroku dyno
87
82
88
-
-**If you already have a Heroku app...**
89
-
1.`heroku git:remote your-app-name` You'll need to be a collaborator on the app.
83
+
1. Set up the [Heroku command line tools](https://devcenter.heroku.com/articles/heroku-cli)
84
+
2.`heroku login`
85
+
3. Add a git remote for heroku:
86
+
87
+
***If you're creating a new app...**
88
+
89
+
1.`heroku create` or `heroku create your-app-name` if you have a name in mind.
90
+
2.`heroku addons:create heroku-postgresql:hobby-dev` to add ("provision") a postgres database to your heroku dyno
91
+
92
+
***If you already have a Heroku app...**
93
+
94
+
1.`heroku git:remote your-app-name` You'll need to be a collaborator on the app.
90
95
91
96
### When you're ready to deploy
92
97
@@ -96,31 +101,32 @@ Either way, you'll need to set up your deployment server to start:
96
101
97
102
CI is not about testing per se – it's about _continuously integrating_ your changes into the live application, instead of periodically _releasing_ new versions. CI tools can not only test your code, but then automatically deploy your app. Boilermaker comes with a `.travis.yml` configuration almost ready for deployment; follow these steps to complete the job.
98
103
99
-
1. Run `git checkout master && git pull && git checkout -b f/travis-deploy` (or use some other new branch name).
100
-
2. Un-comment the bottom part of `.travis.yml` (the `before_deploy` and `deploy` sections)
101
-
3. Add your Heroku app name to `deploy.app`, where it says "YOUR HEROKU APP NAME HERE". For example, if your domain is `cool-salty-conifer.herokuapp.com`, your app name is `cool-salty-conifer`.
102
-
4. Install the Travis CLI tools by following [the instructions here](https://github.com/travis-ci/travis.rb#installation).
103
-
5. Run `travis encrypt $(heroku auth:token) --org` to encrypt your Heroku API key. _**Warning:** do not run the `--add` command suggested by Travis, that will rewrite part of our existing config!_
104
-
6. Copy-paste your encrypted API key into the `.travis.yml` file under `deploy.api_key.secure`, where it says "YOUR ENCRYPTED API KEY HERE".
8. Make a PR for the new branch, get it approved, and merge it into master.
104
+
1.Run `git checkout master && git pull && git checkout -b f/travis-deploy` (or use some other new branch name).
105
+
2.Un-comment the bottom part of `.travis.yml` (the `before_deploy` and `deploy` sections)
106
+
3.Add your Heroku app name to `deploy.app`, where it says "YOUR HEROKU APP NAME HERE". For example, if your domain is `cool-salty-conifer.herokuapp.com`, your app name is `cool-salty-conifer`.
107
+
4.Install the Travis CLI tools by following [the instructions here](https://github.com/travis-ci/travis.rb#installation).
108
+
5.Run `travis encrypt $(heroku auth:token)` to encrypt your Heroku API key. _**Warning:** do not run the `--add` command suggested by Travis, that will rewrite part of our existing config!_
109
+
6.Copy-paste your encrypted API key into the `.travis.yml` file under `deploy.api_key.secure`, where it says "YOUR ENCRYPTED API KEY HERE".
8.Make a PR for the new branch, get it approved, and merge it into master.
107
112
108
113
That's it! From now on, whenever `master` is updated on GitHub, Travis will automatically push the app to Heroku for you.
109
114
110
115
#### Option B: Manual Deployment from your Local Machine
111
116
112
117
Some developers may prefer to control deployment rather than rely on automation. Your local copy of the application can be pushed up to Heroku at will, using Boilermaker's handy deployment script:
113
118
114
-
1. Make sure that all your work is fully committed and pushed to your master branch on Github.
115
-
2. If you currently have an existing branch called "deploy", delete it now (`git branch -d deploy`). We're going to use a dummy branch with the name "deploy" (see below), so if you have one lying around, the script below will error
116
-
3.`npm run deploy` - this will cause the following commands to happen in order:
117
-
-`git checkout -b deploy`: checks out a new branch called "deploy". Note that the name "deploy" here isn't magical, but it needs to match the name of the branch we specify when we push to our heroku remote.
118
-
-`webpack -p`: webpack will run in "production mode"
-`git commit --allow-empty -m 'Deploying'`: create a commit, even if nothing changed
121
-
-`git push --force heroku deploy:master`: push your local "deploy" branch to the "master" branch on heroku
122
-
-`git checkout master`: return to your master branch
123
-
-`git branch -D deploy`: remove the deploy branch
119
+
1. Make sure that all your work is fully committed and pushed to your master branch on Github.
120
+
2. If you currently have an existing branch called "deploy", delete it now (`git branch -d deploy`). We're going to use a dummy branch with the name "deploy" (see below), so if you have one lying around, the script below will error
121
+
3.`npm run deploy` - this will cause the following commands to happen in order:
122
+
123
+
*`git checkout -b deploy`: checks out a new branch called "deploy". Note that the name "deploy" here isn't magical, but it needs to match the name of the branch we specify when we push to our heroku remote.
124
+
*`webpack -p`: webpack will run in "production mode"
0 commit comments