fly.io-rails 0.1.10-x64-mingw32 → 0.1.12-x64-mingw32

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: cfa216998a2b58752a02b95a496381d54af51fe5647446a3b32984536e004614
4
- data.tar.gz: 78d3bf629692d6e3f7049e3ec594c608d53b2ec5dc43b14e1fdb7cc5efd5e25f
3
+ metadata.gz: 27863247f82478b23de4536007c3d980325e880b1310cdc81287c585ded7051d
4
+ data.tar.gz: e53b0f69db6c8fed2715f98d1fe4348a7b107a3428cc740f7f61dcdbede51442
5
5
  SHA512:
6
- metadata.gz: fec47c381011bce137319ee2aa989d3a4c6cd8da8e6a1359d0f3375c3ba4b05a03cda5d13d3f3337881a0b52071f37f737fc6041f993ed1fb71656d7699e6132
7
- data.tar.gz: 2751797b43b81a78e8b3561159301353b302ca142b035a5ac39cfe82d71089e0b623ef746570cb2e048285904c99ab141208d8abedb130199a33dc8e351ef666
6
+ metadata.gz: a3745620abd7237ee9b64a91bdc941ba9ff03f23529b4acfea7fc7d11c0f83b551e9a3c79014133dfe99b8e3a85e043da7e0540d8421cd8f35430d170d713a87
7
+ data.tar.gz: d710fb22d75a7a1800723c7cb34f19196146b835c30da38ae0f37f40b28ab1bfd7a350c78d2cda9f0901f257c32e39ce61019ba959b80ba5691b16593f43d916
@@ -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
@@ -10,6 +10,8 @@ module Fly
10
10
  @sqlite3 = true
11
11
  elsif database == 'postgresql'
12
12
  @postgresql = true
13
+ elsif database == 'mysql' or database == 'mysql2'
14
+ @mysql = true
13
15
  end
14
16
 
15
17
  gemfile = IO.read('Gemfile') rescue ''
@@ -1,3 +1,3 @@
1
1
  module Fly_io
2
- VERSION = '0.1.10'
2
+ VERSION = '0.1.12'
3
3
  end
@@ -63,6 +63,7 @@ FROM base as build_deps
63
63
  @build_packages = %w(git build-essential wget vim curl gzip xz-utils)
64
64
  @build_packages << 'libpq-dev' if @postgresql
65
65
  @build_packages << 'libsqlite3-dev' if @sqlite3
66
+ @build_packages << 'default-libmysqlclient-dev' if @mysql
66
67
  -%>
67
68
  ARG BUILD_PACKAGES=<%= @build_packages.join(' ').inspect %>
68
69
  ENV BUILD_PACKAGES ${BUILD_PACKAGES}
@@ -108,7 +109,16 @@ RUN npm install
108
109
  FROM flyio/litefs:pr-109 AS litefs
109
110
 
110
111
  #######################################################################
111
- <% end %>
112
+ <% end -%>
113
+ <% if @anycable -%>
114
+
115
+ # Build anycable
116
+ FROM golang:1.18 as go
117
+ RUN GOBIN=/usr/local/bin/ go install github.com/anycable/anycable-go/cmd/anycable-go@latest
118
+
119
+ #######################################################################
120
+ <% end -%>
121
+
112
122
  # install deployment packages
113
123
 
114
124
  FROM base
@@ -126,6 +136,7 @@ RUN apt-get install -y dirmngr gnupg apt-transport-https ca-certificates curl &&
126
136
  @deploy_packages += %w(nginx passenger libnginx-mod-http-passenger) if @passenger
127
137
  @deploy_packages << 'postgresql-client' if @postgresql
128
138
  @deploy_packages << 'libsqlite3-0' if @sqlite3
139
+ @deploy_packages << 'default-mysql-client' if @mysql
129
140
  @deploy_packages << 'fuse' if @litefs
130
141
  @deploy_packages << 'ruby-foreman' if @procs.length > 1
131
142
  @deploy_packages << 'redis-server' if @redis == :internal
@@ -141,11 +152,6 @@ RUN --mount=type=cache,id=prod-apt-cache,sharing=locked,target=/var/cache/apt \
141
152
  ${DEPLOY_PACKAGES} \
142
153
  && rm -rf /var/lib/apt/lists /var/cache/apt/archives
143
154
 
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
155
  <% if @redis == :internal -%>
150
156
  # configure redis
151
157
  RUN sed -i 's/^daemonize yes/daemonize no/' /etc/redis/redis.conf &&\
@@ -163,6 +169,11 @@ COPY --from=gems /usr/local/bundle /usr/local/bundle
163
169
  # copy installed node modules
164
170
  COPY --from=node_modules /app/node_modules /app/node_modules
165
171
 
172
+ <% end -%>
173
+ <% if @anycable -%>
174
+ # copy anycable-go
175
+ COPY --from=go /usr/local/bin/anycable-go /usr/local/bin/anycable-go
176
+
166
177
  <% end -%>
167
178
  <% if @litefs -%>
168
179
  # 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.12
5
5
  platform: x64-mingw32
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