ish_models 3.1.0.23 → 3.1.0.25

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: 8c16d37166d30d6e36729b5c418e0d9ac02fa38741488d461368c8596e2569a5
4
- data.tar.gz: 41f4d1c62cdcd0c1652739b52ef5ec18c409036bbd4dc89b051f5c8713798120
3
+ metadata.gz: 76d8038103197bf7105917ad1738790390e318b0d954fde670fb6c4d0794bf2f
4
+ data.tar.gz: 615a22baee9b09394ae9787aa0a8f48c741a7f74e84fc4f873e3eaa42232b4d8
5
5
  SHA512:
6
- metadata.gz: 289baeb1ff039cbf8e9afb7a147313b9409739c0017380c7c8b576d12c975680216d3a5cfa3677a62b2315ed529400771f4e08b3ef86b7a3f308fc286965bd98
7
- data.tar.gz: 6725988d353958068af1e0c096d9ff3df3d2844968679e63bbe9aedcd0c46c4576ff74d7e6bba9a53dd627bfa78c2307528f299a3793e61215ebe631512a3f35
6
+ metadata.gz: 8754fd24f4ee6856b8b193b00d09102810bb3f3d1bb733246baedef3639ff129823708137508077a12235b4c08351187a7dae7f515c35a98d3228ac0e1307c2e
7
+ data.tar.gz: 5bbae27bb76fb39627418e07f26ee6f0191dbbe1d2c698485295c67f861067af8f810595e638afc841bfe4b7fc8db1f177919a1190f0da4c3881b142a78a9af3
@@ -9,12 +9,12 @@ class WcoHosting::Domain
9
9
 
10
10
  ## orbital.city : Z0145070C3DD1OJWHTXJ
11
11
  ## oquaney-splicing.com : Z060228025Y0JHUA35GN5
12
- field :route53_zone
13
- validates :route53_zone, presence: true
12
+ # field :route53_zone
13
+ # validates :route53_zone, presence: true
14
14
 
15
15
  STATE_ACTIVE = 'active'
16
16
  STATE_INACTIVE = 'inactive'
17
- STATES = [ 'active', 'inactive' ]
17
+ STATES = [ 'active', 'inactive' ]
18
18
  field :state, default: STATE_ACTIVE
19
19
 
20
20
  def self.list
@@ -1,6 +1,7 @@
1
1
 
2
2
  require 'net/scp'
3
3
  require 'open3'
4
+ require 'droplet_kit'
4
5
 
5
6
  class WcoHosting::Serverhost
6
7
  include Mongoid::Document
@@ -40,6 +41,17 @@ class WcoHosting::Serverhost
40
41
  end
41
42
 
42
43
  def create_subdomain app
44
+ client = DropletKit::Client.new(access_token: DO_TOKEN_1)
45
+ record = DropletKit::DomainRecord.new(
46
+ type: 'A',
47
+ name: app.subdomain,
48
+ data: app.serverhost.public_ip,
49
+ )
50
+ client.domain_records.create(record, for_domain: app.domain )
51
+ end
52
+
53
+ ## obsolete _vp_ 2023-12-23
54
+ def aws_create_subdomain app
43
55
  ac = ActionController::Base.new
44
56
  ac.instance_variable_set( :@app, app )
45
57
  rendered_str = ac.render_to_string("wco_hosting/scripts/create_subdomain.json")
@@ -5,6 +5,6 @@ server {
5
5
  location / {
6
6
  proxy_pass http://127.0.0.1:<%= @app.port %>/;
7
7
  }
8
- ssl_certificate /etc/letsencrypt/live/<%= @app.host %>/fullchain.pem; # managed by Certbot
9
- ssl_certificate_key /etc/letsencrypt/live/<%= @app.host %>/privkey.pem; # managed by Certbot
8
+ ssl_certificate /etc/letsencrypt/live/pox.bar/fullchain.pem; # managed by Certbot
9
+ ssl_certificate_key /etc/letsencrypt/live/pox.bar/privkey.pem; # managed by Certbot
10
10
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.23
4
+ version: 3.1.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - mac_a2141
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 4.0.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: droplet_kit
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 3.20.0
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 3.20.0
125
139
  description: https://wasya.co
126
140
  email:
127
141
  - victor@piousbox.com
@@ -158,7 +172,7 @@ files:
158
172
  - app/views/wco_hosting/docker-compose/dc-any.erb
159
173
  - app/views/wco_hosting/docker-compose/dc-helloworld.erb
160
174
  - app/views/wco_hosting/docker-compose/dc-wordpress.erb
161
- - app/views/wco_hosting/scripts/create_subdomain.json.erb
175
+ - app/views/wco_hosting/scripts/create_subdomain.json.erb-trash
162
176
  - app/views/wco_hosting/scripts/create_volume.erb
163
177
  - app/views/wco_hosting/scripts/nginx_site.conf.erb
164
178
  - config/routes.rb