-
Notifications
You must be signed in to change notification settings - Fork 9
Forking Guide
Joe Bandenburg edited this page Jul 2, 2015
·
9 revisions
- Create a GitHub account if you don't have one already. https://github.com/join
- Fork chat-grad-project by clicking the "Fork" button on the project page.
- Sign into CircleCI with your GitHub account. https://circleci.com
- Add your fork as a new project on CircleCI.
- Create an account on Heroku if you don't have one already. https://signup.heroku.com/
- Add a new app on Heroku called
chat-grad-project-<name>. Replace<name>with a unique id for you. E.g.chat-grad-project-dave. - Create an account on MongoLab if you don't have one already. https://mongolab.com/
- Create a database.
- Pick "Single-node" and choose the free, sandbox, option.
- For simplicity, give the database the same name as your project on Heroku.
- Create a user for your web server to connect using. Pick a strong, random password - you won't need to memorise it. You will need it in a few steps, however, so copy it somewhere temporary. NEVER check-in passwords into version control.
- Create a new application on GitHub. https://github.com/settings/applications/new
- Set the homepage URL to
https://chat-grad-project-<name>.herokuapp.com. - Set the authorization callback URL to
https://chat-grad-project-<name>.herokuapp.com/oauth.
- Go to your project's settings on Heroku.
- Click "Reveal config vars".
- Add a variable with the key
DB_URIand the value of the URI to your database in MongoLab, including the username and password you created earlier. e.g.mongodb://<dbuser>:<dbpassword>@ds027491.mongolab.com:27491/chat-grad-project. The URI for your database can be found on the database management page on MongoLabs. - Add a variable with the key
OAUTH_CLIENT_IDand the value of the client ID from the GitHub application page. - Add a variable with the key
OAUTH_SECRETand the value of the client secret from the GitHub application page.
- Go to your account settings on Heroku and copy your API key. https://dashboard.heroku.com/account
- Go to your account settings on CircleCI and paste in your Heroku API key. https://circleci.com/account/heroku
- Go to your project's settings on CircleCI, go to "Heroku Deployment" and click "Add Heroku Deploy User".
- Edit
circle.ymland change the name of the Heroku app to deploy to fromchat-grad-projectto the name you entered when you created the Heroku app (e.g.chat-grad-project-dave). - When you commit your changes to
circle.yml, it should automatically trigger a build on CircleCI and then deploy to Heroku. You can see the status of the build on the CircleCI homepage. When the deployment completes you should be able to access your app athttps://chat-grad-project-<name>.herokuapp.com/ - If it works, you're ready to move on to the Tasks.