3 ms·
Instead of compiling assets externally, you could do it in a multi stage docker build.
by LukaD 7y ago
Instead of compiling assets externally, you could do it in a multi stage docker build.
- mbell 7y agoYou can but I've not found the value in the complexity. The CI container image already requires node and all the needed dev packages for tests to run anyway so I just run the precompile in the CI container after tests pass then copy the resulting `public` directory into the production container. This also means the same exact environment is used to generate the production assets that was used to generate them for test.
- aliswe 7y agoI've found it increases portability and makes it both easier to move between pipeline providers and debugging failed builds locally.