With the google cloud storage option to serve static files, what is the 
best way to manage it with the local development environment?

Background: I am thinking of switching from standard to flex environment. I 
am  using python runtime, so the switch can let me to switch from python 
2.7 to python 3 too.  I use webpack to emit a final bundled javascript. In 
a standard environment I can put the file in the static folder as specified 
in app.yaml. 

But if I were to serve this javascript file out of google CDN, how should I 
go about setting up my dev environment?   I certainly do not want to deploy 
scripts whenever I made some minor changes. I think it might be possible to 
use a env variable to control the behaviour. (e,g. use flask to serve 
static file when in dev, but use CDN otherwise)

What is your setup in your cases?

On Tuesday, 16 May 2017 09:28:16 UTC+10, Alex Martelli wrote:
>
> Another possibility for a static-only site, recommended for example in the 
> short, useful video Moving existing applications to Google Cloud Platform 
> <https://www.youtube.com/watch?v=xw-Dk360cEo&index=4&list=PLIivdWyY5sqJ0d5_t8k7cLTjiIzHn5Mg3>,
>  
> is to use Google Cloud Storage <https://cloud.google.com/storage/>. 
> Here's a tutorial 
> <https://cloud.google.com/storage/docs/hosting-static-website> on how 
> best to achieve this.
>
> Alex
>
> On Mon, May 15, 2017 at 5:28 PM, Blaine Garrett <bla...@blainegarrett.com 
> <javascript:>> wrote:
>
>> If you are only doing static code (i.e. express is just serving files), 
>> you may consider just using a standard env (python or go for simplicity). 
>> From my understanding Flex env will add a fair amount of overhead. 
>> I started a github project years ago for this purpose: 
>> https://github.com/blainegarrett/gae-static It is basically just the 
>> app.yaml that makes a difference.
>>
>> I have a personal project that is a api client node app that once built 
>> simply is deployed as static assets using this approach.
>>
>> Hope that helps. 
>> ~ Blaine
>>
>>
>> On Thursday, May 11, 2017 at 4:59:16 PM UTC-5, ja...@thebabyboxco.com 
>> wrote:
>>>
>>> I'm using nodejs flex environment and express.static middleware for 
>>> hosting a static site, a mix of html, javascript, css and images that has 
>>> about 30 rps
>>>
>>> It seems the defaults on flex environment isn't powerful enough to serve 
>>> static files in under 100ms. I've fixed this problem by increasing the cpu 
>>> count and ram of the base instance to:
>>>
>>> resources:
>>> cpu: 2
>>> memory_gb: 7.6
>>> disk_size_gb: 10
>>>
>>> and have a minimum instance count of 
>>>
>>> automatic_scaling:
>>> min_num_instances: 4
>>> max_num_instances: 20
>>>
>>> can anyone recommend the proper sizing for resource instances and proper 
>>> automatic scaling for this workload?
>>>
>>> Thanks!
>>> Jason
>>>
>>> ****NOTICE****
>>> *This e-mail message is confidential, is intended only for the named 
>>> recipient(s) above, and may contain information that is privileged, 
>>> attorney work product or exempt from disclosure under applicable law.  If 
>>> you have received this message in error, or are not a named recipient(s), 
>>> you are hereby notified that any dissemination, distribution or copying of 
>>> this e-mail is strictly prohibited.  If you have received this message in 
>>> error, please immediately notify the sender by return e-mail and delete 
>>> this e-mail message from your computer.  Thank you.*
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-appengi...@googlegroups.com <javascript:>.
>> To post to this group, send email to google-a...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/google-appengine.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-appengine/e36e89da-f69e-43c2-ade3-1a11fe917aef%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-appengine/e36e89da-f69e-43c2-ade3-1a11fe917aef%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/4802b74e-9adf-49fd-9f6d-629eb6ae48aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to