kuby-core
kuby-core copied to clipboard
Add a way to disable asset compilation/deployment
Some Rails apps don't need asset management (i.e. they're API-only, etc). It would be nice to have a way to disable asset management entirely, perhaps the same way database management is enabled/disabled via the manage_database true/false method.
Is it possible to use a workaround to build an api-only rails app? Currently i got this error on build step:
[stage-1 13/13] RUN bundle exec rake assets:precompile #20 sha256:ab9daf939c6d997aebc0d8f7687823b56ac263601fbbce8803989a4fc5c4223f #20 0.908 rake aborted! #20 0.908 Don't know how to build task 'assets:precompile' ... ...
Good question @sebastianobar. Yes, you should be able to remove the asset build phase and rails_assets plugin like this:
Kuby.define('my-app') do
environment(:production) do
docker do
delete :assets_phase
end
kubernetes do
plugins.delete :rails_assets
end
end
end
That will disable running the asset precompile rake task and prevent Kuby from launching a static asset server.