Host Metabase CSS/JS In CDN

Hello Everyone,

We are running Metabase open source docker instance. It's hosted on AWS instance.

Currently CSS/JS files are served from machine instance where metabase docker is running.

What configuration change needed to serve CSS/JS files from CDN like AWS cloudfront?

Thanks for help in advance.

Hi @abhay
You can set Cloudfront to cache everything within the /app/*
Just remember to clear cache every time you upgrade, since you otherwise will be served a frontend from old version cache and a backend from actual live version.
The question is more specific to Cloudfront than Metabase, so you might find better help and tips in a forum dedicated to Cloudfront.

Thanks @flamber for reply.

I am running docker container.
How can I set Cloudfront to cache everything within the /app/*?
Is there ENV variable for this?

@abhay It has nothing to do with Metabase. You would make the configuration somewhere in Cloudfront, so it caches everything starting with the URL /app/*. I would recommend that you try asking in a Cloudfront forum.