fly.io-rails 0.0.2-x64-mingw32 → 0.0.3-x64-mingw32
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 -169
- data/exe/x64-mingw32/flyctl.exe +0 -0
- data/lib/fly.io-rails/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: d57f3b28e7fd2c3e14750163862eeab99067b43bb335e3292c917ef8aefb4993
|
4
|
+
data.tar.gz: 4e260fb9da1d52a5fe78ea44a223cfb001a67ba4dce8f73b652344d62a65bf49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e6392b4e88b5324194900addc36de27b78a2b1bcad8da0792472a82245bbd2bcf3617260b077ad51c342eb639f06e4c9119d86462921b5df5b7d7bf7c544c0a
|
7
|
+
data.tar.gz: 730d3acae8cb1bcfd830fc3aacdd40edbf63241d48442ccf052208a74384ebbc931a237b8c73d02872f75bde891a821173502c1a50e66ad2a2ea325c5b239c8d
|
data/README.md
CHANGED
@@ -6,26 +6,7 @@ Add [Fly.io](https://fly.io) support to [Rails](https://rubyonrails.org/).
|
|
6
6
|
|
7
7
|
<u>pre-alpha</u>.
|
8
8
|
|
9
|
-
|
10
|
-
repository as while creating a github repository is an easily reversible act,
|
11
|
-
wiping all memory of a mis-named gem is considerably more challenging.
|
12
|
-
|
13
|
-
It currently is possible to build the gem files, install the prerequisite
|
14
|
-
`ruby-fly` gem, and then install the platform specific gem using `--local`.
|
15
|
-
You can also add the gem to your Gemfile using the `path:` argument to the
|
16
|
-
`gem` statement/method call. Of course, all of this will be taken care of
|
17
|
-
for you once this gem has been published.
|
18
|
-
|
19
|
-
## Quickstart/summary
|
20
|
-
|
21
|
-
```sh
|
22
|
-
rails new demo
|
23
|
-
cd demo
|
24
|
-
bundle add fly.io-rails
|
25
|
-
flyctl auth login
|
26
|
-
bin/rails fly:launch
|
27
|
-
bin/rails deploy
|
28
|
-
```
|
9
|
+
For usage instructions, see [Fly.io Rails Advanced Guide: Terraform](https://fly.io/docs/rails/advanced-guides/terraform/).
|
29
10
|
|
30
11
|
## Build instructions
|
31
12
|
|
@@ -38,152 +19,3 @@ every supported platform as well as an additional gem that doesn't
|
|
38
19
|
include a binary.
|
39
20
|
|
40
21
|
To download new binaries, run `rake clobber` then `rake package` agein.
|
41
|
-
|
42
|
-
## Description
|
43
|
-
|
44
|
-
- `bundle add fly.io-rails`
|
45
|
-
|
46
|
-
This will install `ruby-fly` middleware, add new Rails tasks, extend the
|
47
|
-
channel and job generatotors, and platform binaries for
|
48
|
-
[flyctl](https://github.com/superfly/flyctl#readme). I've followed the
|
49
|
-
trail blazed by [nokogiri](https://nokogiri.org/) and others to make
|
50
|
-
platform binaries happen.
|
51
|
-
|
52
|
-
- `bin/rails fly:launch`
|
53
|
-
|
54
|
-
This won't be a mere front enty to [`flyctl
|
55
|
-
launch`](https://fly.io/docs/flyctl/launch/). It will use
|
56
|
-
[`thor`](https://github.com/rails/thor#thor) to rewrite the configuration
|
57
|
-
for the `production` environment as well as tweak the `Dockerfile` and
|
58
|
-
`fly.toml` based on your application - in particular the configuration for
|
59
|
-
ActiveRecord, ActiveJob, and ActionCable. The people at Fly will know what
|
60
|
-
databases and message queing systems work best on their platform and should
|
61
|
-
make it easy to do the right thing.
|
62
|
-
|
63
|
-
As an example, the default production database for a new application in
|
64
|
-
Rails is sqlite3. Either this will need to be replaced by Postgre in
|
65
|
-
the Rails configuration *or* a volume will need to be defined, mounted,
|
66
|
-
and the Rails configuration modified to point to the new mount point.
|
67
|
-
|
68
|
-
This gem should pick one of those paths as the default, and provide an option to chose other paths.
|
69
|
-
|
70
|
-
- `bin/rails generate channel`, `bin/rails generate job`, etc.
|
71
|
-
|
72
|
-
Rails applications are generally not invented fully formed. They evolve and
|
73
|
-
add features. I don't want people to think about having to configure rails
|
74
|
-
AND configure fly when then add features. Generators that developers
|
75
|
-
already use today should be able to update both the Rails and Fly
|
76
|
-
configurations in a consistent manner.
|
77
|
-
|
78
|
-
For now, both the Rails tasks and generators don't actually modify the Rails
|
79
|
-
configuratio to support Fly, instead they merely output the string `Configuring
|
80
|
-
fly...`. Let your imagination run wild.
|
81
|
-
|
82
|
-
## Motivation
|
83
|
-
|
84
|
-
Oversimplifying and exagerating to make a point, `flyctl launch` generates an
|
85
|
-
initial fly configuration based on the state of the application at launch time
|
86
|
-
but leaves configuring your Rails application up to you. The initial Fly
|
87
|
-
configuration may need to be tweaked, and both the fly and Rails configurations
|
88
|
-
will need to be maintained as the application evolves.
|
89
|
-
|
90
|
-
From a Rails developer perspective, this makes fly an additional framework that
|
91
|
-
must be learned and attended to.
|
92
|
-
|
93
|
-
This can all be changed with a single `bundle add` command. Everything from
|
94
|
-
new `rails` tasks to extending the behavior of existing generators to making
|
95
|
-
changes to configuration to monkeypatching Rails internals itself are on the
|
96
|
-
table.
|
97
|
-
|
98
|
-
A few sublte but important mindset changes are necessary to pull this off:
|
99
|
-
|
100
|
-
* Instead of "we support every (or perhaps even only 'most') Rails
|
101
|
-
configuration" the mindset we should strive for is "we provide a default
|
102
|
-
production configuration that works for most, and provide options to add or
|
103
|
-
replace components as desired".
|
104
|
-
|
105
|
-
We should be bold and daring. We should chose a default web server, a
|
106
|
-
default database, a default active job queue adapter, a default action
|
107
|
-
cable subscription adapter, etc., etc., etc.
|
108
|
-
|
109
|
-
Over time, this should encompas everything needed for monitoring and
|
110
|
-
deployment. Requirements for things like log file management should be
|
111
|
-
anticipated and accounted for.
|
112
|
-
|
113
|
-
* Any configuration artifact that is generated and needs to be checked into
|
114
|
-
the application's source control repository needs to be [beautiful
|
115
|
-
code](https://rubyonrails.org/doctrine#beautiful-code). If you look at
|
116
|
-
configuration files provided by either `rails new` or by rails generators,
|
117
|
-
they have comments. They don't configure things that don't apply to you.
|
118
|
-
|
119
|
-
A concrete example: Rails 7 applications default to import maps. A
|
120
|
-
`Dockerfile` generated for such an app should not contain code that deals
|
121
|
-
with `yarn` or `node_modules`.
|
122
|
-
|
123
|
-
And as a closing remark - to be fair adding Rails support to Fly and adding Fly
|
124
|
-
support to Rails are more complementary than competing efforts.
|
125
|
-
|
126
|
-
## Future
|
127
|
-
|
128
|
-
> Que sera, sera
|
129
|
-
|
130
|
-
-- Doris Day
|
131
|
-
|
132
|
-
I don't know what the future is going to hold, but some guesses:
|
133
|
-
|
134
|
-
* It is plausible that a code base written in Ruby and with access to
|
135
|
-
libraries like [Thos](http://whatisthor.com/) and focused exclusively on
|
136
|
-
Rails may attract more contributions from the Rails community than a
|
137
|
-
codebase written in Go and targetting many disparate frameworks.
|
138
|
-
* Flyctl launch can continue to provide a basic Fly configuration for Rails,
|
139
|
-
but if this effort is successful these configurations would largely be
|
140
|
-
replaced by more tailors configurations that are updated by generators and
|
141
|
-
rake tasks as the application evolves.
|
142
|
-
* Not every flyctl command needs to have a Rails wrapper -- only the common
|
143
|
-
task do. It is quiet OK for developers to deal directly with fly when it
|
144
|
-
makes sence to do so. But those flyctl command that are wrapped may need
|
145
|
-
options added that enable them to be run without the need to prompt the
|
146
|
-
user.
|
147
|
-
* This gem could be built and published alongside the flyctl executables, and
|
148
|
-
`flyctl version update` could detect whether or not it was installed as a
|
149
|
-
gem and react appropriately.
|
150
|
-
|
151
|
-
## Call to Action
|
152
|
-
|
153
|
-
> good ideas and bad code build communities, the other three combinations do
|
154
|
-
> not
|
155
|
-
|
156
|
-
-- Stefano Mazzocchi
|
157
|
-
|
158
|
-
> the best way to get the right answer on the internet is not to ask a
|
159
|
-
> question; it's to post the wrong answer.
|
160
|
-
|
161
|
-
-- Ward Cunningham
|
162
|
-
|
163
|
-
I don't presume that any specific line of code in this initial implementation
|
164
|
-
will last the test of time. Heck, I'm not even confident enough in the
|
165
|
-
proposed name to register the gem, though the name does feel *rails-like* -
|
166
|
-
just take a look at any Rails `Gemfile` to see.
|
167
|
-
|
168
|
-
My hope is that there is enough scaffolding here to not only make clear what
|
169
|
-
the possibilities are, but also enough structure so that it is fairly obvious
|
170
|
-
where new logic should go, together there is not only enough promise and
|
171
|
-
structure to attract a community.
|
172
|
-
|
173
|
-
Some starter ideas:
|
174
|
-
|
175
|
-
* Can we make `bin/rails deploy` smart enough to invoke `flyctl auth login` if
|
176
|
-
you are not logged in and `bin/rails fly:launch` if the application had not
|
177
|
-
previously been launched, with the goal of reducing the number of commands a
|
178
|
-
user has to issue to get started. Also I'm impressed by the way auth login
|
179
|
-
launches a browser, can we do the same for fly launch?
|
180
|
-
|
181
|
-
* While a number of application configuration changes are made through
|
182
|
-
generators, not all are. For example, upgrading the version of Ruby to be
|
183
|
-
used. Perhaps we could create tasks for some of these, but likely it will
|
184
|
-
be worthwhile to create a `fly:reconfig` task.
|
185
|
-
|
186
|
-
Finally, once this repository is in the superfly github organization and
|
187
|
-
a gem has been published, this README should be rewritten from focus on
|
188
|
-
raison d'être and to a focus on what value it would bring to those that
|
189
|
-
install and use it.
|
data/exe/x64-mingw32/flyctl.exe
CHANGED
Binary file
|
data/lib/fly.io-rails/version.rb
CHANGED