fly.io-rails 0.0.7 → 0.0.8

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: 512f92510ac8d587c3ebea38bf3fb4b3ca54ce87b998165441481b7034741a5f
4
- data.tar.gz: 5e84bc665bc1d3e5933659949e100900b923a66d7dab177b2e6e18ea25c82b0e
3
+ metadata.gz: a3bb276f91a3517a89d96e6416e3944fd05c5127e30fbf21ff999e194d3b368d
4
+ data.tar.gz: 1ff540bed90a499253a1c0b5ed9d5418b4284378396c532a0dbf1cf05e2d3e2e
5
5
  SHA512:
6
- metadata.gz: f05ee68d701c6b2e56483efa7d229c1201a99779b655ff2121fea037c0df148d6759b02266194fc6d2283cb1dfde7bdf9a77680f4a20e93520721b6905711755
7
- data.tar.gz: a35a7fb8582a6a5f9b3623b5b96e0d74407d770e61b14c7f0738162bb660156e562390b1cc8bd7e6332c2222ee3cb063fa9fa3a291d9209c94fe479f04fa5ffa
6
+ metadata.gz: 5a60a56d8468e1f4f434bd45da75a08f5ff918554aa5241799abf681667b938f32ae330fe2b166992c55448681d06ac6d7bc9176cd4fe912ab1e825738644dca
7
+ data.tar.gz: 60785bbab16177bc41402518eba1146e44db3f4fda50726f60166888728618ed1496e00242bbbb8d4b8dd8113697ded35a4a5ff785f522f46c685dd491bdbb64
data/Rakefile CHANGED
@@ -156,3 +156,8 @@ task package: :download
156
156
 
157
157
  CLOBBER.add(exepaths.map { |path| File.dirname(path) })
158
158
 
159
+ namespace :gem do
160
+ task :push do
161
+ sh 'for i in pkg/*.gem; do gem push $i; done'
162
+ end
163
+ end
@@ -1,3 +1,3 @@
1
1
  module Fly_io
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
@@ -7,22 +7,44 @@ terraform {
7
7
  }
8
8
  }
9
9
 
10
+ # Allocate an IPv4 address
10
11
  resource "fly_ip" "<%= @appName %>Ipv4" {
11
12
  app = <%= @app.inspect %>
12
13
  type = "v4"
13
14
  }
14
15
 
16
+ # Allocate an IPv6 address
15
17
  resource "fly_ip" "<%= @appName %>Ipv6" {
16
18
  app = <%= @app.inspect %>
17
19
  type = "v6"
18
20
  }
19
21
 
22
+ /* Uncomment this if you want a volume
23
+ resource "fly_volume" "<%= @appName %>Volume" {
24
+ for_each = toset(<%= @regions.inspect %>)
25
+ region = each.value
26
+
27
+ name = "<%= @appName %>Volume"
28
+ app = <%= @app.inspect %>
29
+ size = 3
30
+ }
31
+ */
32
+
33
+ # Start a fly machine
20
34
  resource "fly_machine" "<%= @appName %>Machine" {
21
35
  for_each = toset(<%= @regions.inspect %>)
22
- app = <%= @app.inspect %>
23
36
  region = each.value
37
+
38
+ app = <%= @app.inspect %>
24
39
  name = "<%= @app %>-${each.value}"
25
40
  image = "quay.io/evl.ms/fullstaq-ruby:<%= @ruby_version %>-jemalloc-slim"
41
+
42
+ # Scale application resources
43
+ cpus = 1
44
+ cputype = "shared"
45
+ memorymb = 256
46
+
47
+ # map http[s] external ports 443 and 80 to internal port 8080
26
48
  services = [
27
49
  {
28
50
  ports = [
@@ -35,8 +57,24 @@ resource "fly_machine" "<%= @appName %>Machine" {
35
57
  handlers = ["http"]
36
58
  }
37
59
  ]
38
- "protocol" : "tcp",
39
- "internal_port" : 8080
40
- },
60
+
61
+ protocol = "tcp"
62
+ internal_port = 8080
63
+ }
64
+ ]
65
+
66
+ /* Uncomment this if you want sqlite3 on a volume
67
+ env = {
68
+ DATABASE_URL = "sqlite3:///mnt/db/production.sqlite3"
69
+ }
70
+
71
+ mounts = [
72
+ {
73
+ volume = "<%= @appName %>Volume"
74
+ path = "/mnt/db"
75
+ }
41
76
  ]
77
+
78
+ depends_on = [fly_volume.<%= @appName %>Volume]
79
+ */
42
80
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fly.io-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby