Last active
June 2, 2017 16:34
-
-
Save arbaouimehdi/636a215c372c436454c2ec8de4fc86f6 to your computer and use it in GitHub Desktop.
Deploying Ruby on Rails App (Bitbucket)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1 (New App) | |
rails new myapp --database=postgresql | |
# 2 (Bundle Install) | |
bundle install | |
# 3 (Run Server) | |
rails server -b $IP -p $PORT | |
# 4 (Git Config) | |
git config --global user.name "Your Name" | |
git config --global user.email [email protected] | |
git config --global push.default matching | |
git config --global alias.co checkout | |
# 5 (Git Files) | |
git init | |
git add -A | |
git status | |
git commit -m "Initialize repository" | |
git log | |
# 6 (Printing the public key) | |
cat ~/.ssh/id_rsa.pub | |
# 7 (BitBucket) | |
- Sign up for a Bitbucket account | |
- Add new private Bitbucket Repository | |
- Go to setting and Access Keys | |
- Copy your public key to your clipboard | |
- Add your public key to Bitbucket | |
# 8 (Adding Bitbucket and pushing up the repository.) | |
git remote add origin [email protected]:<username>/hello_app.git | |
git push -u origin --all | |
# 9 (Heroku) | |
heroku login | |
heroku keys:add | |
heroku create | |
git push heroku master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment