prun-ops 0.3.0 → 0.3.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
  SHA256:
3
- metadata.gz: cfe66e0e6eca2984b10e276613767b236a719ed2cdcb92ed51ca3b78062b71ce
4
- data.tar.gz: 366be3e7998aac88911f68bf8a78a087212055fe240f6c0d662070227eb085b3
3
+ metadata.gz: 18f2c5330be90923eaf33001d28259a793106d1f6fb29422e63a62cc542c51fd
4
+ data.tar.gz: 67c617c200371c58e64467ea47edebdcd62f7cddde771d9b64f210ce2d00723e
5
5
  SHA512:
6
- metadata.gz: 3b721ff34499c5ec3891a61fa6ae3f2a0bf2fa9fa615cb78d54747b551e1ccedf6f40ef7e405ef36043ee8236f53873104367c50b03b743a59d73a3ba2d4b833
7
- data.tar.gz: b47621f17dfa836188fa03e022b28767e94b30112082388128363db45f65ceffe4c5f8c8e75131232eb98e941fb0c72cfbc44c9e961d71387d3cccfea77b84ba
6
+ metadata.gz: f5a71ab8a859f032d2c1a66221b57ecb432f86e8c9b32efb1d0fe183528d46f1b488c8dedf51d4b0f23e379000814990687dacf2891b2b82e0b511d35e38c99e
7
+ data.tar.gz: d6b9fef0e7589eeca85c0ffd4e952c71fc1c0964dbbfcea1bb79751297da844be127a94e974b0cb732ae18e56233dde9dfff4bab75dfef13bb8716f69c3ea8a0
data/README.md CHANGED
@@ -84,8 +84,8 @@ Secondary tasks:
84
84
  - `cap [stg] redis:install` install redis server
85
85
  - `cap [stg] app:prepare`(DEPRECATED) create init scripts
86
86
  - `cap [stg] app:db_prepare`(DEPRECATED) database first load
87
- - `cap [stg] nginx:cert` create SSL certificates with [Let's Encrypt](https://letsencrypt.org/)
88
- - `cap [stg] nginx:ssl` configure nginx with SSL certificates
87
+ - `cap [stg] nginx:cert` create SSL certificates with [Let's Encrypt](https://letsencrypt.org/) and confiture nginx
88
+ - `cap [stg] nginx:ssl`(DEPRECATED) configure nginx with SSL certificates
89
89
 
90
90
  Considerations:
91
91
  -
@@ -13,12 +13,9 @@ namespace :nginx do
13
13
  on roles(:web, :api) do |host|
14
14
  run_locally do
15
15
  run_in host, <<-EOBLOCK
16
- sudo cd /usr/local/sbin
17
- sudo wget https://dl.eff.org/certbot-auto
18
- sudo chmod a+x /usr/local/sbin/certbot-auto
19
- sudo mkdir /var/www/#{fetch :application}/current/public/.well-known
20
- sudo certbot-auto certonly -a webroot --webroot-path=/var/www/#{fetch :application}/current/public -d #{host.hostname}
21
- sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
16
+ sudo snap install --classic certbot
17
+ sudo ln -s /snap/bin/certbot /usr/bin/certbot
18
+ sudo certbot --nginx -m admin@#{host.hostname} --non-interactive --agree-tos --domains #{host.hostname}
22
19
  EOBLOCK
23
20
  end
24
21
  end
@@ -26,7 +26,7 @@ namespace :postgres do
26
26
  sudo sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/" /etc/postgresql/#{version}/main/postgresql.conf
27
27
  sudo sed -i "s/local all all peer/local all all md5/" /etc/postgresql/#{version}/main/pg_hba.conf
28
28
  sudo sed -i "s/host all all 127.0.0.1/32 md5/host all all all md5/" /etc/postgresql/#{version}/main/pg_hba.conf
29
- sudo sed -i "s/ssl = true/ssl = false/" /etc/postgresql/#{version}/main/postgresql.conf
29
+ sudo sed -i "s/ssl = on/ssl = off/" /etc/postgresql/#{version}/main/postgresql.conf
30
30
  sudo service postgresql restart
31
31
  EOBLOCK
32
32
 
@@ -22,5 +22,11 @@ server {
22
22
  stub_status on;
23
23
  allow all;
24
24
  }
25
+ location /cable {
26
+ proxy_pass http://0.0.0.0:3000;
27
+ proxy_http_version 1.1;
28
+ proxy_set_header Upgrade $http_upgrade;
29
+ proxy_set_header Connection "Upgrade";
30
+ }
25
31
 
26
32
  }
@@ -35,6 +35,13 @@ server {
35
35
  stub_status on;
36
36
  allow all;
37
37
  }
38
+ location /cable {
39
+ proxy_pass http://0.0.0.0:3000;
40
+ proxy_http_version 1.1;
41
+ proxy_set_header Upgrade $http_upgrade;
42
+ proxy_set_header Connection "Upgrade";
43
+ }
44
+
38
45
  location ~ /.well-known {
39
46
  allow all;
40
47
  }
@@ -8,7 +8,7 @@ namespace :ubuntu do
8
8
  #{apt_nointeractive} libssl-dev libreadline-dev libgdbm-dev openssl
9
9
  #{apt_nointeractive} libreadline6-dev libyaml-dev sqlite3 autoconf libgdbm-dev
10
10
  #{apt_nointeractive} libcurl4 libcurl3-gnutls libcurl4-openssl-dev
11
- #{apt_nointeractive} libncurses5-dev automake libtool bison pkg-config libffi-dev
11
+ #{apt_nointeractive} libncurses5-dev automake libtool bison pkg-config libffi-dev libvips
12
12
  #{apt_nointeractive} software-properties-common gnupg2
13
13
  EOBLOCK
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module PrunOps
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prun-ops
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Lebrijo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-20 00:00:00.000000000 Z
11
+ date: 2023-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler