Browse Source

Install gems

tags/v1.0.0
Benjamin Neff 7 years ago
parent
commit
a69bf9f96c
No account linked to committer's email address
2 changed files with 20 additions and 0 deletions
  1. +1
    -0
      diaspora/defaults.yaml
  2. +19
    -0
      diaspora/install.sls

+ 1
- 0
diaspora/defaults.yaml View File

diaspora: diaspora:
repository: git://github.com/diaspora/diaspora.git repository: git://github.com/diaspora/diaspora.git
version: master version: master
environment: production
install_path: /srv/diaspora install_path: /srv/diaspora


ruby_version: 2.3.4 ruby_version: 2.3.4

+ 19
- 0
diaspora/install.sls View File

- user: {{ diaspora.user.username }} - user: {{ diaspora.user.username }}
- require: - require:
- file: diaspora_install_directory - file: diaspora_install_directory

diaspora_rvm_ruby_version_alias:
cmd.run:
- name: rvm alias create $(cat {{ diaspora.install_path }}/.ruby-version) ruby-{{ diaspora.ruby_version }}
- runas: diaspora
- unless: rvm alias list | grep "$(cat {{ diaspora.install_path }}/.ruby-version) => ruby-{{ diaspora.ruby_version }}"
- require:
- git: diaspora_git

diaspora_bundle_install:
cmd.run:
- name: rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/bundle install --jobs $(nproc) --deployment --without test development --with {{ diaspora.database.type }}
- runas: diaspora
- cwd: {{ diaspora.install_path }}
- unless: rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/bundle check
- env:
- RAILS_ENV: {{ diaspora.environment }}
- require:
- git: diaspora_git

Loading…
Cancel
Save