heroku

Serve static files in Flask from private AWS S3 bucket

痞子三分冷 提交于 2020-02-23 11:48:05
问题 I am developing a Flask app running on Heroku that allows users to upload images. The app has a page displaying the user's images in a table. For developing purposes, I am saving the uploaded files to Heroku's ephemeral file system, and everything works fine: the images are correctly loaded and displayed (I am using the last method shown here implying the use of send_from_directory()). Now I have moved the storage to S3 and I am trying to adapt the code. I use boto3 to upload the files to the

Why does GC stat minor_gc_count decrement?

我们两清 提交于 2020-02-23 10:16:08
问题 We have an heroku app. When I check GC.stat in the morning, GC.stat[:minor_gc_count] is 51. Later in the day it is 50. From my understanding, this should be the number of times the garbage collector has done a minor sweep, so going up the next morning would make sense, but why would it decrease? 510 talos-intelligence :>heroku run rails c --remote production Running rails c on ⬢ talosintelligence... up, run.2287 (Standard-1X) Loading production environment (Rails 5.2.2.1) irb(main):001:0> GC

Source folder is not a Java project when working with Heroku eclipse plugin

随声附和 提交于 2020-02-23 07:38:09
问题 I have set up a new project and hooked it up with Heroku: I'm able to make changes and upload them to my dyno at Heroku but when trying to add new classes in eclipse I get **Source folder is not a Java project **. Have I missed anything? 回答1: Ok found it, needed to tell eclipse that this was a java project by adding: <natures> <nature> <name></name> </nature> <nature>org.eclipse.jdt.core.javanature</nature> </natures> So that the .project file look like this: <?xml version="1.0" encoding="UTF

Namecheap domain won't redirect without “www”

那年仲夏 提交于 2020-02-22 07:17:07
问题 I'm looking to connect my domain to a heroku app. So far, the tutorials I've read say we want Namecheap to have the following records for domain example.com : CNAME Record www www.example.com.herokudns.com URL Redirect @ https://www.example.com With this config, I can successfully get to my homepage using: http://example.com/ http://www.example.com/ https://www.example.com/ But for some reason http://example.com/ won't connect and times out. Does anyone know if there's a way to get both https

Namecheap domain won't redirect without “www”

落爺英雄遲暮 提交于 2020-02-22 07:16:46
问题 I'm looking to connect my domain to a heroku app. So far, the tutorials I've read say we want Namecheap to have the following records for domain example.com : CNAME Record www www.example.com.herokudns.com URL Redirect @ https://www.example.com With this config, I can successfully get to my homepage using: http://example.com/ http://www.example.com/ https://www.example.com/ But for some reason http://example.com/ won't connect and times out. Does anyone know if there's a way to get both https

unable to parse Procfile

醉酒当歌 提交于 2020-02-21 11:55:03
问题 I am trying to deploy an Heroku app. I must be doing something wrong with the Procfile. When I run foreman check I get this error. ERROR: no processes defined I get pretty much the same thing when deploying on Heroku -----> Building runtime environment -----> Discovering process types ! Push failed: cannot parse Procfile. The Procfile looks like this web: node app.js What did I miss? update I re-did all from the start, It works properly now. I think I might have issue with Unix line ending

Where do I get a CPU-only version of PyTorch?

生来就可爱ヽ(ⅴ<●) 提交于 2020-02-21 10:51:31
问题 I'm trying to get a basic app running with Flask + PyTorch, and host it on Heroku. However, I run into the issue that the maximum slug size is 500mb on the free version, and PyTorch itself is ~500mb. After some google searching, someone wrote about finding a cpu-only version of PyTorch, and using that, which is much smaller here. However, I'm pretty lost as to how this is done, and the person didn't document this at all. Any advice is appreciated, thanks. EDIT: To be more specific about my

Where do I get a CPU-only version of PyTorch?

无人久伴 提交于 2020-02-21 10:49:26
问题 I'm trying to get a basic app running with Flask + PyTorch, and host it on Heroku. However, I run into the issue that the maximum slug size is 500mb on the free version, and PyTorch itself is ~500mb. After some google searching, someone wrote about finding a cpu-only version of PyTorch, and using that, which is much smaller here. However, I'm pretty lost as to how this is done, and the person didn't document this at all. Any advice is appreciated, thanks. EDIT: To be more specific about my

Can I map local branches to remote branches with different prefixes in git?

…衆ロ難τιáo~ 提交于 2020-02-19 09:42:53
问题 We're working with a semi-centralized git repository here where I work. Each developer has their own subtree in the central git repository, so it looks something like this: master alice/branch1 alice/branch2 bob/branch1 michael/feature release/1.0 release/1.1 Working locally in my tree I have topic/feature , which corresponds to michael/feature in the central tree. I've been using git push origin topic/feature:michael/feature to push my changes to the remote tree. However, this is cumbersome

Heroku with rails 5 error Gem::LoadError: Specified 'postgresql' for database adapter

ぃ、小莉子 提交于 2020-02-10 04:27:08
问题 I am a Rails beginner and i see some issue while deploying to Heroku. Earlier i used SQLite3, later when i understood that i needed postgresql i installed the same and work on local machine. One deployment went fine after migrating from sqlite to postgresql. Now i see some issue. Heroku logs, Gem file and Database.yml details are as below. Can some one help me in this please. Advance Thanks...!!! Part of Gem file: group :development, :test do gem 'pg', '~> 1.0.0' gem 'rails_12factor' #gem