I use PyroCMS and it requires public/app permissions to write admin area 
image thumbnails and public assets like css and js files. They can be lost, 
as they get regenerated if the files are not there. However, I do agree 
with Jordan, there shouldn't be any writes to the public folder on prod, 
but I'm stuck with that for now. I will have a look at the GCS option, 
thanks.

On Monday, April 24, 2017 at 8:13:02 PM UTC+1, Takashi Matsuo (Google) 
wrote:
>
>
> Hi Donatas,
>
> What's the use case of writing to the public directory? If it is just for 
> writing temporary file (like temporary cache for performance), you can 
> still use other directories (/tmp, /app/otherdir etc). If you want to 
> dynamically update the content in the public directory, unfortunately it 
> won't work, because the files in the local disk are only available to the 
> specific instance, and they are volatile so that when the server restarted 
> for some reason, the files will be lost.
>
> As Jordan said, using Cloud Storage might be a good option. There is a 
> handy GCS stream wrapper 
> <https://github.com/GoogleCloudPlatform/google-cloud-php/blob/master/src/Storage/StreamWrapper.php>
>  
> available, so you can use the GCS bucket as if they are local directory (of 
> course it's slower than the local disk).
>
>
> On Mon, Apr 24, 2017 at 11:22 AM 'Jordan (Cloud Platform Support)' via 
> Google App Engine <google-a...@googlegroups.com <javascript:>> wrote:
>
>> Is there a specific reason why you require the need to perform writes to 
>> your 'public/app' folder? Scalable applications in the cloud should 
>> normally never perform writes to the local filesystem, as data written in 
>> an App Engine instance is released with the instance when it is no longer 
>> needed (e.g. when incoming traffic reduces and your App Engine instances 
>> scale down 
>> <https://cloud.google.com/appengine/docs/flexible/php/an-overview-of-app-engine#instance_scaling>
>> ).
>>
>> It is recommended you perform writes to a non-volatile/persistent 
>> location like Google Cloud Storage <https://cloud.google.com/storage/> or 
>> the Google Cloud Datastore <https://cloud.google.com/datastore/> that 
>> can be written/read by your application running in multiple App Engine 
>> instances. You can follow the Reading and Writing Files 
>> <https://cloud.google.com/appengine/docs/standard/php/googlestorage/> 
>> guide for PHP which explains how to use Google Cloud Storage as a wrapper 
>> for reading and writing files in an App Engine PHP app.
>>
>> -- 
>> 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/cbe25784-7636-4b88-9386-e680877f6318%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-appengine/cbe25784-7636-4b88-9386-e680877f6318%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> -- Takashi
>

-- 
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/c55a7765-6eb1-40e7-bd14-208b11fd7987%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to