SSH Public Key is very important and must be used when you execute the git push command later, but don't worry, the heroku client will automatically help us deal with it. You can also manually upload the file by executing the command heroku keys: add.
5. Use the Heroku client to create an app
The so-called app is actu
When creating a Python app with the official tutorial on Heroku, this deploy-the-app error is reported when uploading the code to the Heroku git repository:A search on the Internet, the relevant answer incredibly few, the first page only appeared an article (fortunately this article inside the method to solve this problem), the method mentioned below:Execute firstheroku git:remote -a And then do git
Teach you how to deploy the Node. js application on heroku cloud platform, herokunode. js
Although AWS has also launched its own PaaS platform called Elastic Beanstalk, heroku has many third-party add-on, such as MongoDB, mysql, redis, and memcached, there are also various plug-ins such as message queue, sms and email, backend batch processing, search, and automatic monitoring. They are much better than AWS
services and reduces the damage to users of poor plug-ins.
5. The protocol is stored as a local file by a third-party vendor and Heroku. The template is defined by Heroku. A third-party vendor must enter the service address, resource variable, and other information. Heroku can also allow the vendor to fill in the information on the website, but
Although AWS now has its own PAAs platform called Elastic Beanstalk, the advantage of Heroku is that it has a number of third-party add-on, such as Mongodb,mysql, Redis, memcached, and various message queues, SMS and mail, background batch, search, automatic monitoring and other plug-ins, from an ecological perspective than AWS or much stronger.
That is to say, there is a ready-made node.js PAAs running environment on the
Premise:
Already installed Ruby, Rails, Git
===============================================================
Setup Heroku for the first time
$sudo Gem Install Heroku
Set Heroku account number, need email and password, please apply for free in http://www.heroku.com/
$ Heroku Keys:add======================================
The program initially uses the sqlite3 database. Modify the Gemfile file to add the Support group: productiondo # gemsspecificallyforHerokugoheregem "pg" endbundleinstall to the heroku deployment to pre-compile some files. Otherwise, the bundleexecrakeassets will error on heroku:
The program initially uses the sqlite3 database.
Modify the Gemfile file, and add pg support to
1, Purpose: Use Heroku to deploy the development environment to the production environment. Heroku is dedicated to deploying rails and other Web applications, and the process of deploying rails applications is straightforward-as long as the source code is incorporated into the GIT version control system.2. Build Heroku Deployment Environment(1)
remote server, which is abbreviated as origin. (Hypothesis) You may have configured many remote servers.
$ Git remote-vOrigin git@heroku.com: Sample-Project.git)Origin git@heroku.com: Sample-Project.git (push)
3. Deploy your code
Use git push to deploy your code.
$ Git push origin masterInitializing repository, done.Counting objects: 11, done.Delta compression u
example shows an example of configuring only a simple remote server, which is referred to as Origin. (suppose) You may have configured a lot of remote servers.
$ git remote-vorigin git@heroku.com:sample-project.git (Fetch) Origin git@heroku.com:sample-project.git (push)
3. Deploy your code
Use "Git push" to deploy your code.
$ Git push origin masterinitializing
:
Unicorn Sample_project.wsgi--log-file-
2. See the short name of the remote server where you want to deploy the code. The following example shows an example of configuring a simple remote server with a short name of origin. You may have configured a lot of remote servers.
$ git Remote-v
Origin git@heroku.com:sample-project.git (fetch)
Origin Git@heroku.com:sample-project.git ( Push
3. Deploy your code
Use git
went through the document process to get a sample app, where the creation of the app is done with the Heroku instructions, almost a local file and app in some way to connect and then synchronize the code. That's probably the process.
Heroku Login login, here the account password I have and git confused ...
git clone https://github.com/heroku/python-
The program was originally used by the Sqlite3 database.
Modify the Gemfile file to add PG support for Heroku deployment
Group:p Roduction Do
# Gems specifically for Heroku go
Gem "PG"
End
Bundle Install
Precompile some files, otherwise there will be an error on the HerokuBundle EXEC Rake Assets:precompile
Publish application to GitHub top$ git Add.$ git commit-a-M "Done with the demo app"Done with
git Commit-am "make it Better" git push Heroku master appears similar to the following information, indicating that the deployment is complete: counting objects:16, done. Delta compression using up to 4 threads. Compressing objects:100% (8/8), done. Writing objects:100% (14/14), 3.32 KiB | 0 bytes/s,Done. Total (delta 0), reused 0 (Delta 0) remote:compressing source files ... done.remote:Building source:re
), There is a piece of code in header.html:{{if. recentcnt}} {{if GT. recentcnt 0}} One of the IF GT is Revel self-contained template method, your sister Ah, I also think you bring the things, will certainly pack compiled into put, didn't think Ah, this reason wasted my day time (according to the Code a section to check, did not think the header will have problems), then how to solve it, You can do it by yourself.In the Init.go method, join as before:Revel. template
name for which you want to deploy the code.The following example shows an example of configuring only one simple remote server, which is abbreviated as origin. (Hypothesis) You may have configured many remote servers.
$ git remote -vorigin git@heroku.com:Sample-Project.git (fetch)origin git@heroku.com:Sample-Project.git (push)
3. Deploy your code
Use git push to deploy your code.
$ git
command to create the app locally, if it is a novice or suggest to create on the official website, intuitive and clear.
Step three: Upload apps In fact, the process and upload code to github almost, first CD to the application directory, you need to add a file in this directory procfile, the content is a line of code: 1: web:node app.js
Then, under the current directory, right-click Git Bash, log in, enter your username and password: 1:
1. Register Heroku Account First
2, first install Heroku Toolbelt tool Https://toolbelt.heroku.com/debian
wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
Heroku LoginEnter your registered account email and passwordGo to the directory you want to upload
cd"first commit"
Create your app in Heroku
create (会生成
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.