From 28da569ec385d5ce0b66fd754031d399093b37b0 Mon Sep 17 00:00:00 2001 From: Corey Peterson Date: Mon, 4 Nov 2024 10:11:16 -0500 Subject: [PATCH] Restores composer and build_assets steps in run_first to address docker volume mounting issue --- docker/run_first.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docker/run_first.sh b/docker/run_first.sh index b690be831..7a61ccef3 100755 --- a/docker/run_first.sh +++ b/docker/run_first.sh @@ -50,13 +50,17 @@ elif [ "$choice" == "2" ]; then echo "Building containers. This will take a few minutes..." docker compose build app webserver fakes3 - # install php composer deps - docker compose run --rm --no-deps app composer install --ignore-platform-reqs else echo "Invalid choice. Try again." exit 1 fi +# Install php composer deps +# Even though these are present on the images already, the assets don't exist locally +# When docker compose volume mounts the project, the local filesystem takes precedence +# As such it's required to rerun this process to bring the host machine into parity +docker compose run --rm --no-deps app composer install --ignore-platform-reqs + # run migrations and seed any db data needed for a new install docker compose run --rm app /wait-for-it.sh mysql:3306 --timeout=120 --strict -- composer oil-install-quiet @@ -66,6 +70,9 @@ docker compose run --rm app bash -c 'php oil r widget:install_from_config' # Install any widgets in the tmp dir source run_widgets_install.sh '*.wigt' +# Same deal as composer: the assets are available in the images but not locally +source run_build_assets.sh + # create a dev user based on your current shell user (password will be 'kogneato') MATERIA_DEV_PASS=whatever can be used to set a custom pw source run_create_me.sh