heroku

Error when running “python manage.py syncdb” locally, but no error when running the same command via Heroku

a 夏天 提交于 2020-02-28 17:24:50
问题 I am new to Heroku and Django/Python. I was hoping to find an answer for an issue I'm experiencing. I have been following the Getting Started tutorial in Heroku's Dev Center: https://devcenter.heroku.com/articles/django Everything is working properly when running commands and pushing app code to Heroku. For example, when I run the CLI command "heroku run python manage.py syncdb" everything works as expected with no errors. However, when I try to run the same command locally, "python manage.py

Error when running “python manage.py syncdb” locally, but no error when running the same command via Heroku

对着背影说爱祢 提交于 2020-02-28 17:22:27
问题 I am new to Heroku and Django/Python. I was hoping to find an answer for an issue I'm experiencing. I have been following the Getting Started tutorial in Heroku's Dev Center: https://devcenter.heroku.com/articles/django Everything is working properly when running commands and pushing app code to Heroku. For example, when I run the CLI command "heroku run python manage.py syncdb" everything works as expected with no errors. However, when I try to run the same command locally, "python manage.py

Express js redirect with cookie, cookie not present

。_饼干妹妹 提交于 2020-02-28 06:30:14
问题 So I've implemented facebook login using Passport-js. I've also implemented Cookie-strategy for using good ole username/password login. My setup is Express-js backend and a React front-end. Backend and frontend runs on different servers and domains(backend-client.com, frontend-client.com). Everything works like a charm on localhost but not in stage and production environment. Don't know if it matters but I'm using Heroku for hosting my applications. The issue: When the facebook authentication

Heroku 的“得”与“失”

倾然丶 夕夏残阳落幕 提交于 2020-02-28 01:53:05
作者 | 孙健波(天元) 阿里巴巴技术专家 2011 年,Heroku 的联合创始人 Adam Wiggins 根据针对上百万应用托管和运维的经验,发布了著名的 “十二要素应用宣言(The Twelve-Factor App)”。不知那时候他们有没有想到,这份宣言会在今后数年时间里,成为 SaaS 应用开发的启蒙书。同时也奠定了 Heroku 在 PaaS 领域的地位,成为了云上应用开发规范化的基石。 Heroku 无疑是一家伟大的公司,它关注应用与开发者,“以应用为中心”的理念让我们至今受益。然而在过去这一两年里,我们看到许多 Heroku 的用户开始寻找别的选择。这不禁让我们好奇,站在“云原生”如火如荼的今天回望过去,Heroku 的“得”与“失”究竟在哪里? “以应用为中心”的先进理念 Heroku 创办于 2007 年,是最早成熟的 PaaS 产品之一。Heroku 也是最早喊出“以应用为中心”,大规模帮助应用上云的产品。正是围绕“以应用为中心”这样先进的理念,使得 Heroku 从一开始便拥有了至今看来都非常诱人的功能: 用户可以直接从开发语言出发,选择对应的技术栈,通过 heroku create 这样简单的命令,将应用托管到云上。主流的开发语言,均能在 Heroku 中找到对应的选择。 从代码的变动自动触发软件的部署交付,清晰的工作流、多样的发布策略

如何将不同的本地Git分支推送到Heroku / master

百般思念 提交于 2020-02-27 23:56:52
Heroku的政策是忽略除“ master”之外的所有分支。 虽然我确信Heroku的设计师有充分的理由执行此政策(我想是为了存储和性能优化),但对我来说,作为开发人员的结果是,无论我正在从事的本地主题部门如何,我都希望有一个简单的方法将Heroku的master切换到该本地主题分支,并执行“ git push heroku -f”以覆盖Heroku上的master。 通过阅读 http://progit.org/book/ch9-5.html 的“推送参考规范”部分,我得到的是 git push -f heroku local-topic-branch:refs/heads/master 我真正想要的是一种在配置文件中进行设置的方法,以便“ git push heroku”始终执行上述操作,用当前分支的名称替换 local-topic-branch 。 如果有人知道如何做到这一点,请告诉我! 当然,需要注意的是,只有当我是唯一可以推送到该Heroku应用程序/存储库的人时,这才有意义。 测试或质量检查团队可能会管理这样的存储库以尝试不同的候选分支,但是他们必须进行协调,以便他们在任何一天都同意将其推向哪个分支。 不用说,拥有一个独立的远程存储库(例如GitHub)也是一个好主意,而不受此限制,可以备份所有内容。 我会称其为“起源”,并为Heroku使用“ heroku”,以便“

如何将表格导出为带有PostgreSQL标题的CSV文件?

坚强是说给别人听的谎言 提交于 2020-02-26 02:38:22
我正在尝试通过命令行将带有标题的PostgreSQL表导出到CSV文件,但是我将其导出到CSV文件,但是没有标题。 我的代码如下所示: COPY products_273 to '/tmp/products_199.csv' delimiters','; #1楼 从psql命令行: \COPY my_table TO 'filename' CSV HEADER 最后没有分号。 #2楼 COPY products_273 TO '/tmp/products_199.csv' WITH (FORMAT CSV, HEADER); 如 手册所述 。 #3楼 除了表名,您还可以编写查询以仅获取选定的列数据。 COPY (select id,name from tablename) TO 'filepath/aa.csv' DELIMITER ',' CSV HEADER; 具有管理员权限 \COPY (select id,name from tablename) TO 'filepath/aa.csv' DELIMITER ',' CSV HEADER; #4楼 复制(anysql查询datawanttoexport)到'fileablsoutepathwihname'分隔符','csv标头; 使用此功能,您还可以导出数据。 #5楼 这是我如何使用pgsl连接到Heroku

Heroku 的“得”与“失”

谁说我不能喝 提交于 2020-02-26 01:22:09
作者 | 孙健波(天元) 阿里巴巴技术专家 2011 年,Heroku 的联合创始人 Adam Wiggins 根据针对上百万应用托管和运维的经验,发布了著名的 “十二要素应用宣言(The Twelve-Factor App)”。不知那时候他们有没有想到,这份宣言会在今后数年时间里,成为 SaaS 应用开发的启蒙书。同时也奠定了 Heroku 在 PaaS 领域的地位,成为了云上应用开发规范化的基石。 Heroku 无疑是一家伟大的公司,它关注应用与开发者,“以应用为中心”的理念让我们至今受益。然而在过去这一两年里,我们看到许多 Heroku 的用户开始寻找别的选择。这不禁让我们好奇,站在“云原生”如火如荼的今天回望过去,Heroku 的“得”与“失”究竟在哪里? “以应用为中心”的先进理念 Heroku 创办于 2007 年,是最早成熟的 PaaS 产品之一。Heroku 也是最早喊出“以应用为中心”,大规模帮助应用上云的产品。正是围绕“以应用为中心”这样先进的理念,使得 Heroku 从一开始便拥有了至今看来都非常诱人的功能: 用户可以直接从开发语言出发,选择对应的技术栈,通过 heroku create 这样简单的命令,将应用托管到云上。主流的开发语言,均能在 Heroku 中找到对应的选择。 从代码的变动自动触发软件的部署交付,清晰的工作流、多样的发布策略

Heroku, NodeJs and React issue: SCRIPT5007: Unable to get property 'apply' of undefined or null reference

时间秒杀一切 提交于 2020-02-24 12:16:17
问题 I have a weird issue with, I guess, polyfills. I used MERN stack for my app, and pushed to Heroku. For some reason, on my computer in Chrome I can view the website, however, on other computers I'm getting a blank page and the error in console: 'SCRIPT5007: Unable to get property 'apply' of undefined or null reference' it points to this chunk of code, and, apparently, is linked to Redux: return funcs.reduce(function (a, b) { return function () { return a(b.apply(undefined, arguments)); }; });

查看部署在Heroku上的项目信息

≯℡__Kan透↙ 提交于 2020-02-24 07:22:42
1. 进入项目根目录 2. 终端输入 $ heroku info 输出 === strong-day-9896 Addons: Shared Database 5MB Database Size: 152k Git URL: git@heroku.com:strong-day-9896.git Owner Email: shaobin0604@qq.com Repo Size: 2M Slug Size: 3M Stack: cedar Web URL: http://strong-day-9896.herokuapp.com/ 3. 查看数据库信息 $ heroku pg:info 输出 === SHARED_DATABASE (DATABASE_URL) Data Size: 152k 参考 http://blog.jerodsanto.net/2011/01/quickly-determine-your-current-heroku-database-size/ http://stackoverflow.com/questions/4220231/quickest-way-to-find-out-heroku-database-size 来源: https://www.cnblogs.com/shaobin0604/archive/2012/06/15/2550820

flask and postgre on heroku

我与影子孤独终老i 提交于 2020-02-24 04:43:20
http://blog.y3xz.com/blog/2012/08/16/flask-and-postgresql-on-heroku/ 给出链接,还没来得及整理。 1.heroku addons:add heroku-postgresql:dev可能出现如下错误: /Users/bracken/.rvm/gems/ruby-1.9.3-p194/gems/heroku-2.32.11/lib/heroku/helpers.rb:103: warning: Insecure world writable dir /Users/bracken/product/python_study/flaskProject/flask-sqlchemy-test in PATH, mode 040777 Adding heroku-postgresql:dev on agile-savannah-6541... done, v14 (free) Attached as HEROKU_POSTGRESQL_ORANGE_URL Database has been created and is available ! This database is empty. If upgrading, you can transfer ! data from another database with