fly.io-rails 0.1.10 → 0.1.11

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: cea74280dbe517e71da0dfe935f7f28b25f75e858eec0c087f8649c4dadf17fa
4
- data.tar.gz: 6ae317d9fd653109f6eedf71fe0aa7d6de32e7c9532a154ee8b06b7a7e75a918
3
+ metadata.gz: cabb5f37f0dd4bbec717d8490cd9d94b736373ae9227a92eb0c26e7ac0d2e0b9
4
+ data.tar.gz: acb4bd5973ad7736266c1a3b357587534aa3a023804ccf9ee26a6204ca032c68
5
5
  SHA512:
6
- metadata.gz: 8daf49d385324229c388f202cd41b0320a835e273e76340e408e3b7667fe92afdf3108366aae23a881153170fb917457aa3eb700ba11356c9513b03411f0b7ce
7
- data.tar.gz: 175df3eb6a67c028a7c87f6cdd083a896649aecc035c46c2185ab3f270bbeccb15853c599c3e7d20f3e131c0d6a4ef42226003cd848a7235cca0cf51eb4daa0d
6
+ metadata.gz: 11199be3467dcf32923d67804bae749af69f8b1c041641690cdb8b4e72e4e4f84a742cce06b6d98ab64a975f74c778a20a1d829eff72290da15c9eb5f78050b8
7
+ data.tar.gz: c7adb212a71b16dcf7bdcd0b413b2c7b1a224561627f5754c011b8341bb5740a175b9da63d53a83e069224ffd1a7ee656ffca231eda18f2f18c615d68fd17804
@@ -94,8 +94,8 @@ module Fly
94
94
  @procs[:web] = "nginx -g 'daemon off;'" if @passenger
95
95
  @procs[:worker] = 'bundle exec sidekiq' if @sidekiq
96
96
  @procs[:redis] = 'redis-server /etc/redis/redis.conf' if @redis
97
- @procs.merge! 'anycable-rpc': 'bundle exec anycable',
98
- 'anycable-go': '/usr/local/bin/anycable-go --port=8082' if @anycable
97
+ @procs.merge! 'anycable-rpc': 'bundle exec anycable --rpc-host=0.0.0.0:50051',
98
+ 'anycable-go': 'env ANYCABLE_RPC_HOST=$ANYCABLE_GO_RPC_HOST /usr/local/bin/anycable-go --port=8082 --host 0.0.0.0' if @anycable
99
99
  end
100
100
 
101
101
  def app
@@ -1,3 +1,3 @@
1
1
  module Fly_io
2
- VERSION = '0.1.10'
2
+ VERSION = '0.1.11'
3
3
  end
@@ -108,7 +108,16 @@ RUN npm install
108
108
  FROM flyio/litefs:pr-109 AS litefs
109
109
 
110
110
  #######################################################################
111
- <% end %>
111
+ <% end -%>
112
+ <% if @anycable -%>
113
+
114
+ # Build anycable
115
+ FROM golang:1.18 as go
116
+ RUN GOBIN=/usr/local/bin/ go install github.com/anycable/anycable-go/cmd/anycable-go@latest
117
+
118
+ #######################################################################
119
+ <% end -%>
120
+
112
121
  # install deployment packages
113
122
 
114
123
  FROM base
@@ -141,11 +150,6 @@ RUN --mount=type=cache,id=prod-apt-cache,sharing=locked,target=/var/cache/apt \
141
150
  ${DEPLOY_PACKAGES} \
142
151
  && rm -rf /var/lib/apt/lists /var/cache/apt/archives
143
152
 
144
- <% if @anycable -%>
145
- # install anycable
146
- RUN curl -L https://github.com/anycable/anycable-go/releases/download/v1.2.1/anycable-go-linux-amd64 -o /usr/local/bin/anycable-go && chmod 755 /usr/local/bin/anycable-go
147
-
148
- <% end -%>
149
153
  <% if @redis == :internal -%>
150
154
  # configure redis
151
155
  RUN sed -i 's/^daemonize yes/daemonize no/' /etc/redis/redis.conf &&\
@@ -163,6 +167,11 @@ COPY --from=gems /usr/local/bundle /usr/local/bundle
163
167
  # copy installed node modules
164
168
  COPY --from=node_modules /app/node_modules /app/node_modules
165
169
 
170
+ <% end -%>
171
+ <% if @anycable -%>
172
+ # copy anycable-go
173
+ COPY --from=go /usr/local/bin/anycable-go /usr/local/bin/anycable-go
174
+
166
175
  <% end -%>
167
176
  <% if @litefs -%>
168
177
  # copy litefs binary
@@ -24,8 +24,7 @@ namespace :fly do
24
24
  ENV['REDIS_URL'] = "redis://#{ENV['FLY_REGION']}-redis.local:6379/1"
25
25
  <% end -%>
26
26
  <% if @anycable -%>
27
- ENV['ANYCABLE_RPC_HOST'] = "#{ENV['FLY_REGION']}-anycable-rpc.local:50051"
28
- ENV['CABLE_URL'] = "#{ENV['FLY_REGION']}-anycable-go.local"
27
+ ENV['ANYCABLE_GO_RPC_HOST'] = "#{ENV['FLY_REGION']}-anycable-rpc.local:50051"
29
28
  <% end -%>
30
29
  end
31
30
 
@@ -54,7 +53,7 @@ namespace :fly do
54
53
  <%- end -%>
55
54
  Bundler.with_original_env do
56
55
  <%- if @avahi -%>
57
- # Rake::Task['fly:env'].invoke
56
+ Rake::Task['fly:env'].invoke
58
57
  <%- end -%>
59
58
  sh "foreman start --procfile=Procfile.fly --formation=#{formation}"
60
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fly.io-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-13 00:00:00.000000000 Z
11
+ date: 2022-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fly-ruby