浏览代码

Support new versions of debian/ubuntu with libjemalloc2

tags/v1.0.0
Benjamin Neff 4 年前
父节点
当前提交
a039410ebc
没有帐户链接到提交者的电子邮件
共有 3 个文件被更改,包括 19 次插入4 次删除
  1. +1
    -1
      diaspora/files/diaspora-sidekiq.service
  2. +1
    -1
      diaspora/files/diaspora-web.service
  3. +17
    -2
      diaspora/map.jinja

+ 1
- 1
diaspora/files/diaspora-sidekiq.service 查看文件

@@ -6,7 +6,7 @@ StopWhenUnneeded=true
[Service]
User={{ diaspora.user.username }}
Environment=RAILS_ENV={{ diaspora.configuration.server.rails_environment }}
Environment=LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1
Environment=LD_PRELOAD={{ diaspora.libjemalloc }}
WorkingDirectory={{ diaspora.install_path }}
ExecStart=/bin/bash -lc "bin/bundle exec sidekiq"
Restart=always

+ 1
- 1
diaspora/files/diaspora-web.service 查看文件

@@ -6,7 +6,7 @@ StopWhenUnneeded=true
[Service]
User={{ diaspora.user.username }}
Environment=RAILS_ENV={{ diaspora.configuration.server.rails_environment }}
Environment=LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1
Environment=LD_PRELOAD={{ diaspora.libjemalloc }}
WorkingDirectory={{ diaspora.install_path }}
PIDFile={{ diaspora.install_path }}/tmp/pids/web.pid
ExecStart=/bin/bash -lc "bin/bundle exec unicorn -c config/unicorn.rb -E {{ diaspora.configuration.server.rails_environment }}"

+ 17
- 2
diaspora/map.jinja 查看文件

@@ -17,7 +17,10 @@
'libmagickwand-dev',
'ghostscript',
'nodejs',
'libjemalloc1',
salt['grains.filter_by']({
'stretch': 'libjemalloc1',
'default': 'libjemalloc2'
}, grain='oscodename'),
],
'postgresql_package': 'libpq-dev',
'mysql_package' : 'libmariadbclient-dev',
@@ -28,6 +31,10 @@
'certificate_authorities': '/etc/ssl/certs/ca-certificates.crt'
}
},
'libjemalloc': salt['grains.filter_by']({
'stretch': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.1',
'default': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.2'
}, grain='oscodename'),
},
'RedHat': {
'dependencies' : [
@@ -55,6 +62,7 @@
'certificate_authorities': '/etc/pki/tls/certs/ca-bundle.crt'
}
},
'libjemalloc': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.1',
},
}, merge=salt['grains.filter_by']({
'Ubuntu': {
@@ -70,9 +78,16 @@
'imagemagick',
'libmagickwand-dev',
'nodejs',
'libjemalloc1',
salt['grains.filter_by']({
'bionic': 'libjemalloc1',
'default': 'libjemalloc2'
}, grain='oscodename'),
],
'mysql_package' : 'libmysqlclient-dev',
'libjemalloc': salt['grains.filter_by']({
'bionic': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.1',
'default': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.2'
}, grain='oscodename'),
},
}, grain='os', merge=salt['pillar.get']('diaspora:lookup'))) %}


正在加载...
取消
保存