railman-deployment 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f4c4fd2291a943b49cbb10e05d320725ba5f2da
|
4
|
+
data.tar.gz: f13bdae1b88834a8aa839bb967bf6cb9c5d37bf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e2b57957f46eaf866816ec84a1202289eebf7120dc2e2ebe2a18fc38a5d14d6b5711d48725c958593e471d92616029d815bc155b8f01d413dd18722c884be7a
|
7
|
+
data.tar.gz: 05701eabbfc70084717c21760da75bd6fc1c3ea5edbff304ddb010af1f3f1a0253cc6b5c7808d076e3ad6f976d2aec48a0b8fbbbb53d1ef3e6e95c2ffd6a185f
|
@@ -9,8 +9,8 @@ task :setup do
|
|
9
9
|
invoke :sync_local_dirs_to_server
|
10
10
|
end
|
11
11
|
server_conf_dir = "#{fetch(:deploy_to)}/config/server"
|
12
|
-
execute :cp, "
|
13
|
-
execute :ln, "-s /etc/nginx/sites-available/#{fetch(:domain)}.conf /etc/nginx/sites-enabled/"
|
12
|
+
execute :cp, "#{server_conf_dir}/nginx.conf /etc/nginx/sites-available/#{fetch(:domain)}"
|
13
|
+
execute :ln, "-s -f /etc/nginx/sites-available/#{fetch(:domain)}.conf /etc/nginx/sites-enabled/"
|
14
14
|
execute :ln, "-s -f #{server_conf_dir}/logrotate.conf /etc/logrotate.d/#{fetch(:application)}"
|
15
15
|
within fetch(:deploy_to) do
|
16
16
|
execute :bundle, :install, '--without development test'
|
@@ -23,7 +23,7 @@ task :setup do
|
|
23
23
|
execute :service, 'nginx restart'
|
24
24
|
execute :certbot, "--nginx -d #{fetch(:domain)}"
|
25
25
|
else
|
26
|
-
execute
|
26
|
+
execute 'cp .env.example.production', '.env'
|
27
27
|
execute "sed -i -e 's/TODO: generate with: rake secret/#{SecureRandom.hex(64)}/g' #{fetch(:deploy_to)}/.env"
|
28
28
|
warn 'TODO: Edit .env and modify your database and smtp settings.'
|
29
29
|
warn 'TODO: Run \'cap ENV setup\' again!'
|
@@ -4,7 +4,7 @@ task :set_railman_env do
|
|
4
4
|
set :environment, {path: "#{fetch(:rbenv_home)}/shims:#{fetch(:rbenv_home)}/bin:$PATH", rails_env: 'production'}
|
5
5
|
|
6
6
|
SSHKit.config.command_map[:rake] = "#{fetch(:deploy_to)}/bin/rake"
|
7
|
-
%w(ln service start restart stop status certbot).each do |cmd|
|
7
|
+
%w(ln cp service start restart stop status certbot).each do |cmd|
|
8
8
|
SSHKit.config.command_map[cmd.to_sym] = "sudo #{cmd}"
|
9
9
|
end
|
10
10
|
SSHKit.config.command_map[:eye] = "#{fetch(:rbenv_home)}/shims/eye"
|