Roots Discourse

Multisite with multiple different Sage 9 themes

I have a multisite setup and I have two completely different Sage 9 themes that are being built. After each deploy, the main site gives autoloader not found error and requires me to ssh in and run composer install in the theme directory. The second site processes fine without this need.

I’m trying to determine how to set this up so when I deploy it will build-before for each theme.

I’ve added these deploy_build_before commands to my main.yml file:

composer_keep_updated: true
 - { name: hirak/prestissimo }
apt_cache_valid_time: 3600
apt_package_state: present
apt_security_package_state: latest
apt_dev_package_state: latest
ntp_timezone: Etc/UTC
ntp_manage_config: true
www_root: /srv/www

# Values of raw_vars will be wrapped in `{% raw %}` to avoid templating problems if values include `{%` and `{{`.
# Will recurse dicts/lists. `*` is wildcard for one or more dict keys, list indices, or strings. Example:
#   - vault_wordpress_sites.*.*_salt    -- matches etc.
# Will not function for var names or topmost dict keys that contain a period ('.').
  - vault_mail_password
  - vault_mysql_root_password
  - vault_users.*.password
  - vault_users.*.salt
  - vault_wordpress_env_defaults
  - vault_wordpress_sites

  - "{{ playbook_dir }}/deploy-hooks/build-before.yml"

  - "{{ playbook_dir }}/deploy-hooks/pablo-build-before.yml"

The first default one for the main theme and the second one for the pablo theme.

The project deploys without error but still requires me to run composer install from the theme directory on the server.

@erit suggested that I start a new thread explaining what I’ve tried, so here it is.


Instead of doing:

  - "{{ playbook_dir }}/deploy-hooks/build-before.yml"

  - "{{ playbook_dir }}/deploy-hooks/pablo-build-before.yml"

It looks like this should be:

  - "{{ playbook_dir }}/deploy-hooks/build-before.yml"
  - "{{ playbook_dir }}/deploy-hooks/pablo-build-before.yml"

Not sure if that'll work, but worth a shot

That was easy. Thanks, worked perfectly.

This topic was automatically closed after 42 days. New replies are no longer allowed.