At the minute the Dockerfile for Drupal has a number of commands to move assets from the dist directory of the rhd-frontend component around into the correct location. For example:
https://github.com/redhat-developer/developers.redhat.com/blob/master/_docker/drupal/Dockerfile.mp#L36-L56
Instead, rhd-frontend should support building it's distributable assets into a form that can be consumed directly by Drupal. This distribution should be produced by a single command. For example npm run build-drupal-distribution. Once this command has run, the dist directory of the rhd-frontend component should be in a state that can be consumed directly by Drupal.
How it is to be consumed by Drupal is then a choice of Drupal. We can either include it directly on the Drupal filesystem via our current mechanism, or alternatively we can upload the dist directory to a CDN and have Drupal consume it from there.
At the minute the
Dockerfilefor Drupal has a number of commands to move assets from thedistdirectory of therhd-frontendcomponent around into the correct location. For example:https://github.com/redhat-developer/developers.redhat.com/blob/master/_docker/drupal/Dockerfile.mp#L36-L56
Instead,
rhd-frontendshould support building it's distributable assets into a form that can be consumed directly by Drupal. This distribution should be produced by a single command. For examplenpm run build-drupal-distribution. Once this command has run, thedistdirectory of therhd-frontendcomponent should be in a state that can be consumed directly by Drupal.How it is to be consumed by Drupal is then a choice of Drupal. We can either include it directly on the Drupal filesystem via our current mechanism, or alternatively we can upload the
distdirectory to a CDN and have Drupal consume it from there.