Commit 098a5e33 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Alain Takoudjou

drupal: build next.js after drupal is correctly installed

parent bd7fac18
[template-drupal-instance] [template-drupal-instance]
filename = drupal-instance.cfg.in filename = drupal-instance.cfg.in
md5sum = 5b1c36160fdf459019785ef2d002a278 md5sum = 3df0d11d328701ae3e45387efa72a4de
[template-settings.php] [template-settings.php]
filename = default.settings.php.in filename = default.settings.php.in
......
...@@ -86,10 +86,13 @@ command = if [ -z "$(ls -A ${directory:node})" ]; then ...@@ -86,10 +86,13 @@ command = if [ -z "$(ls -A ${directory:node})" ]; then
rm -rf ${directory:node}; rm -rf ${directory:node};
cp -ax {{ nextjs_app_location }}/ ${directory:node}; cp -ax {{ nextjs_app_location }}/ ${directory:node};
fi fi
export NEXT_PUBLIC_DRUPAL_BASE_URL=${request-frontend:connection-secure_access} if [ -s "${directory:var}/.install-done" ]; then
export NEXT_IMAGE_DOMAIN=${request-frontend:connection-domain} # build next.js require next and next_jsonapi installed
cd ${directory:node} export NEXT_PUBLIC_DRUPAL_BASE_URL=${request-frontend:connection-secure_access}
{{ nodejs_location }}/bin/npm run build export NEXT_IMAGE_DOMAIN=${request-frontend:connection-domain}
cd ${directory:node}
{{ nodejs_location }}/bin/npm run build
fi
update-command = ${:command} update-command = ${:command}
stop-on-error = true stop-on-error = true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment