Welcome to the THELIA support and discusssion forum


Rejoignez la communauté sur le Discord Thelia :


#1 CDN + Google Storage/Bucket

(24-04-2020 06:51:11)


I'm trying to use the Thelia CDN with google storage, google bucket to be more precise. I have mounted the bucket to the local/media folder in order to facilitate the saving of the media that is saved through Thelia on the storage. Now, I'm trying to use CDN to get the resources for the media (documents/images) through the base.url.cdn variable from the back office however, it doesn't seem to work properly. The way I imagined things working was that I was going to mount the storage to the local/media and web/cache and basically write and read from the same place (because based on what I have investigated, the cache mechanism saves resized images in the cache to be reused).

While I do not expect that my solution is the best, I'm really curious about how would the MEDIA -> CDN -> WEB/CACHE system/information flow should work?

Based on my understanding, local/media is the root of the media storage mechanism, web/cache's duty is to bring that media into web context and make it accessible but since this is a regenerable resource (that can be cleared) is not as persistent, is web/cache supposed to also be a more permanent media storage?

I seem to have a problem with multiple aspects of this:
** the regenerability of the cache
** number of write operations in the cache after deployment (CI-CD context)
** how should the cache be linked to the bucket (copy material into a mounted location and then accessing through CDN base-url and only copy new files?)

Is the Thelia CDN whole mechanism in a more of an Alpha state?

Sorry for the number of questions and being all over the place but I would like to understand how the flow was supposed to be!

Thank you!


There's no flow. base.url.cdn is jus a way to give the base URL to a remote server where media are stored, so that Thelia will get media from this server instead of the local one.

Thelia will construct something like https://the-remote-storage.tld/the/remo … dia/image/... instead of https://yourhost.tld/media/image/... and that's all.

CDN management (copy, replication, etc.) has to be done through another tool.

OpenStudio Toulouse


I understand!

Thank you very much for your explanation, that's what my conclusion was as well, however I was wondering if I was missing anything regarding the "flow" but yes, I understand now, thank you very much, is there any further development regarding this feature for the future in the works for Thelia?


There's no plan to impement this feature in the Thelia core. However, writing a module to manage the bucket would be a great idea smile

OpenStudio Toulouse