prun-ops 0.4.9 → 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 +4 -4
- data/README.md +1 -1
- data/lib/capistrano/config/nodejs.rake +5 -1
- data/lib/capistrano/config/yarn.rake +15 -1
- data/lib/prun/ops/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 27044205a7b7b95610e087bb375ac3f85e64f73960cd5092abcba1bf5042f13d
|
|
4
|
+
data.tar.gz: ccc47bc281921f3558ed83f1b5c6ea2a03f232971a828802a6c4c1a1e1832520
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
@@ -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
|
|
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"
|
data/lib/prun/ops/version.rb
CHANGED