prun-ops 0.4.8 → 0.4.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d758947073ec3284c497b60d541666fcf52cb14c98671e114621de05e3941a71
4
- data.tar.gz: f471a3e9a7a9bcb2e443815f34da627de2aac513cb1ae5394d448b469624469f
3
+ metadata.gz: 27044205a7b7b95610e087bb375ac3f85e64f73960cd5092abcba1bf5042f13d
4
+ data.tar.gz: ccc47bc281921f3558ed83f1b5c6ea2a03f232971a828802a6c4c1a1e1832520
5
5
  SHA512:
6
- metadata.gz: 7b01f24d354255a82f74b6394c4a485e3c2cf7ad4c2b8052406fc2cd2985a709f05ef71b1ea5638e383671ac0b726b3d566e61d9841880bd5d4ac158a476ff01
7
- data.tar.gz: f8144649b275b921f91b5995e3101403f168591776c28539ea1ecdaa1c3ab72917ad8c03d368d4e734f7e4dd52a172371bce074bd2254db41c69a7141d7fa1da
6
+ metadata.gz: eacb040584790ef737940fc4ebc1cc64090743acf4678dbb572785699881050bea2d8e172d549799468fd83ae4a96ee0ff9ebaaa8a3a9247effe353ed811f7c9
7
+ data.tar.gz: 529e4a85fe27dcf62f8d6d844f6bd982abd3547b07af1e3140e91262d56a1bd623bc0ff5ed2a2cc9f9f92df704a78f993ba78558658fbdf03c68572c4b681916
data/README.md CHANGED
@@ -102,7 +102,7 @@ Secondary tasks:
102
102
  - `cap [stg] postgres:[start|stop|restart]` start/stop postgres
103
103
  - `cap [stg] nginx:install` install and configure nginx
104
104
  - `cap [stg] nginx:[start|stop|restart]` start/stop nginx
105
- - `cap [stg] nodejs:install` install node
105
+ - `cap [stg] nodejs:install` install node (version from `.node-version`, latest if missing)
106
106
  - `cap [stg] redis:install` install redis server
107
107
  - `cap [stg] puma:install` install puma server
108
108
  - `cap [stg] app:db_prepare`(DEPRECATED) database first load
@@ -27,7 +27,7 @@ namespace :nginx do
27
27
  on roles(:web, :api) do |_host|
28
28
  execute <<-EOBLOCK
29
29
  cd /etc/ssl/certs
30
- openssl dhparam -out dhparam.pem 4096
30
+ openssl dhparam -dsaparam -out dhparam.pem 2048
31
31
  EOBLOCK
32
32
  template "vhost_ssl.conf", "/etc/nginx/conf.d/vhost.conf"
33
33
  invoke "nginx:restart"
@@ -2,6 +2,8 @@
2
2
 
3
3
  namespace :nodejs do
4
4
  task :install do
5
+ node_version = File.exist?(".node-version") ? File.read(".node-version").strip.delete_prefix("v") : "node"
6
+
5
7
  on roles :app do
6
8
  execute "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash"
7
9
 
@@ -12,7 +14,9 @@ namespace :nodejs do
12
14
  execute "{ tail -n 3 .bashrc && head -n -3 .bashrc; } > tempfile && mv tempfile .bashrc"
13
15
 
14
16
  execute <<-EOBLOCK
15
- nvm install node
17
+ nvm install #{node_version}
18
+ nvm alias default #{node_version}
19
+ nvm use #{node_version}
16
20
  npm install -g yarn
17
21
  EOBLOCK
18
22
  end
@@ -1,5 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ set :default_env, fetch(:default_env, {}).merge(
4
+ node_env: "production",
5
+ skip_yarn_install: "1"
6
+ )
7
+
3
8
  namespace :yarn do
4
9
  task :install do
5
10
  on roles :app do
@@ -7,8 +12,17 @@ namespace :yarn do
7
12
  curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
8
13
  echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
9
14
  apt-get -qq update && apt-get install -y yarn
10
- yarn install --check-files
11
15
  EOBLOCK
12
16
  end
13
17
  end
18
+
19
+ task :dependencies do
20
+ on roles :app do
21
+ within release_path do
22
+ execute :yarn, "install --check-files --frozen-lockfile --production=true"
23
+ end
24
+ end
25
+ end
14
26
  end
27
+
28
+ before "deploy:assets:precompile", "yarn:dependencies"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Prun
4
4
  module Ops
5
- VERSION = "0.4.8"
5
+ VERSION = "0.4.10"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prun-ops
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - jlebrijo