# This template adds the 'mysql2' gem for import scripts depending on it

params:
  home: /var/www/discourse

hooks:
  after_bundle_exec:
    - exec:
        cd: $home
        cmd:
          - echo "gem 'mysql2'" >> Gemfile
          - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y libmariadb-dev
          - su discourse -c 'bundle config unset deployment'
          - su discourse -c 'bundle install --no-deployment --path vendor/bundle --jobs 4 --without test development'
