美文网首页
deploy python website with Googl

deploy python website with Googl

作者: Zihowe | 来源:发表于2017-08-03 13:17 被阅读22次

    Adding the project of Google app engine to GitHub

    cd to the directory that you want to push into github

    echo "# MyBlog" >> README.md
    git init
    git add README.md
    git commit -m "first commit"
    

    It may ask for self-identity

    # Set a Git username:
    $ git config --global user.name "myName"
    # Confirm that you have set the Git username correctly:
    $ git config --global user.name
    > myName
    

    It may need your username and password of github

    $ git remote add origin "remote repository URL"
    # Sets the new remote
    $ git remote -v
    # Verifies the new remote URL
    $ git push -u origin master
    # Pushes the changes in your local repository up to the remote repository you specified as the origin
    

    当我们更改了github上的内容之后,我们登录到Google cloud,再把这些更新同步下来:

    $ git pull origin master
    # 意思是我们从origin pull 下来,和本地的master branch合并
    

    Test the application

    $ dev_appserver.py app.yaml
    

    Deploy your app


    $ gcloud app deploy
    

    References:


    https://cloud.google.com/appengine/docs/standard/python/quickstart
    https://help.github.com/articles/setting-your-username-in-git/

    相关文章

      网友评论

          本文标题:deploy python website with Googl

          本文链接:https://www.haomeiwen.com/subject/akhplxtx.html