【发布时间】:2012-09-10 03:27:38
【问题描述】:
我正在关注 Heroku 上的 Python/Flask 教程:https://devcenter.heroku.com/articles/python
这些是我采取的步骤:
heroku login
mkdir MyFlaskApp
python virtualenv.py MyFlaskApp --distribute
source MyFlaskApp/bin/activate
cd MyFlaskApp
pip install Flask
pip freeze > requirements.txt
foreman start
git init
git add .
git commit -m "First commit"
heroku create MyFlaskApp
git push heroku master
但是,当我执行 git add & commit 时,我得到了很多文件。在教程中,git push heroku master 报告了Counting objects: 10,但我得到了Counting objects: 425。
可能是什么问题?
我看到的唯一区别是教程没有提到导航到应用程序的文件夹(例如cd MyFlaskApp)。
更新:这是我在完成上述步骤后在文件夹MyFlaskApp 中的文件夹结构:
bin/
include/
lib/
Procfile
app.py
requirements.txt
.gitignore
更新 2: 我的 .gitignore 文件(如教程中所述):
venv
*.pyc
【问题讨论】:
-
你可能会喜欢这个:github.com/zachwill/flask_heroku