mglaman / wasm-drupal

Drupal in WASM
https://wasm-drupal.mglaman.dev/
MIT License
33 stars 6 forks source link

Move all build steps into Docker #13

Closed mglaman closed 3 months ago

mglaman commented 3 months ago

We can move all of the build steps into Docker to avoid having Node (NPM), PHP (Composer) on the host. However on my macOS it is extremely slow when the artifacts are extracted.

DOCKER_RUN=docker run --rm --interactive --tty
# TODO someone better w/ Makefiles add support for `${COMPOSER_HOME:-$HOME/.composer}`.
DOCKER_DRUPAL_RUN=${DOCKER_RUN} -v ${PWD}/drupal-src:/app -v ${HOME}/.composer:/tmp

drupal-update:
    ${DOCKER_DRUPAL_RUN} composer update --ignore-platform-reqs

drupal-build:
    ${DOCKER_DRUPAL_RUN} composer install --ignore-platform-reqs

drupal-archive:
    ${DOCKER_DRUPAL_RUN} composer archive --format=zip
    mv drupal-src/drupal-wasm-1.0.zip .

The drupal-install target would require some special work.

mglaman commented 3 months ago

I think we can consider this fixed by https://github.com/mglaman/wasm-drupal/pull/31, but we need to update the README