From e7d977277df70dd36ad6525dbe3321fee6f58729 Mon Sep 17 00:00:00 2001 From: lead4good Date: Thu, 25 May 2017 12:12:25 +0200 Subject: [PATCH] adding mysql dependency template to simplify usage of import scripts --- templates/import/mysql-dep.template.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 templates/import/mysql-dep.template.yml diff --git a/templates/import/mysql-dep.template.yml b/templates/import/mysql-dep.template.yml new file mode 100644 index 0000000..dab0853 --- /dev/null +++ b/templates/import/mysql-dep.template.yml @@ -0,0 +1,13 @@ +# 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 libmysqlclient-dev + - su discourse -c 'bundle install --no-deployment --without test --without development --path vendor/bundle' -- 2.25.1