You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build environment neutral Docker image, so that same image can be used across staging and production without performing two asset:precompile (takes a lot of time to build an image).
Is there a way to create two manifest.json files? (each points to asset_host based on environment)
My current hack -
I build a production docker image and create another docker image from production as a base image for staging - with an extra bash command to replace asset_host in manifest.json with staging CDN.
Problem with this approach is - two docker images for one application, which is not a right way in terms of CI/CD pipelines.
The text was updated successfully, but these errors were encountered:
From what I could gather. Previous versions of Webpacker used to generate manifest.json files with relative asset paths, and the Rails app themselves would use config.action_controller.asset_host to construct the full URL to the assets referenced. (In that case your single docker image could be loaded with different environment variables and link to different CDNs). The asset paths are now hardcoded on compile time, which prevents this. Maybe this issue affects you as well?
I am trying to build environment neutral Docker image, so that same image can be used across staging and production without performing two asset:precompile (takes a lot of time to build an image).
Is there a way to create two manifest.json files? (each points to asset_host based on environment)
My current hack -
I build a production docker image and create another docker image from production as a base image for staging - with an extra bash command to replace asset_host in manifest.json with staging CDN.
Problem with this approach is - two docker images for one application, which is not a right way in terms of CI/CD pipelines.
The text was updated successfully, but these errors were encountered: