Skip to content

Commit

Permalink
use thrust binstub if available
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Dec 11, 2024
1 parent 1c5de4f commit 52b07e8
Show file tree
Hide file tree
Showing 42 changed files with 51 additions and 45 deletions.
14 changes: 10 additions & 4 deletions lib/generators/dockerfile_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def generate_app

if fix_database_config
template "database.yml.erb", "config/database.yml",
force: File.exist?("fly.toml")
force: options.force? || File.exist?("fly.toml")
end

if solidq_launcher == :puma && !File.read("config/puma.rb").include?(":solid_queue")
Expand Down Expand Up @@ -1249,9 +1249,15 @@ def procfile
rails: "./bin/rails server -p 3001"
}
elsif using_thruster?
base = {
rails: "bundle exec thrust ./bin/rails server"
}
if File.exist? "bin/thrust"
base = {
rails: "./bin/thrust ./bin/rails server"
}
else
base = {
rails: "bundle exec thrust ./bin/rails server"
}
end
else
base = {
rails: "./bin/rails server"
Expand Down
2 changes: 1 addition & 1 deletion test/results/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]

# Start the server by default, this can be overwritten at runtime
EXPOSE 80
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/alpine/docker-entrypoint
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh -e

# If running the rails server then create or migrate existing database
if [ "${*}" == "bundle exec thrust ./bin/rails server" ]; then
if [ "${*}" == "./bin/thrust ./bin/rails server" ]; then
./bin/rails db:prepare
fi

Expand Down
2 changes: 1 addition & 1 deletion test/results/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/bin_cd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/bun/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/cache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/env/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/esbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/execjs_importmap/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/execjs_node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/fullstaq/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/grover/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/jemalloc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/label/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/litefs/docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
sudo -E litefs mount &

# If running the rails server then create or migrate existing database
if [ "${*}" == "bundle exec thrust ./bin/rails server" -a "$FLY_REGION" == "$PRIMARY_REGION" ]; then
if [ "${*}" == "./bin/thrust ./bin/rails server" -a "$FLY_REGION" == "$PRIMARY_REGION" ]; then
./bin/rails db:prepare
fi

Expand Down
2 changes: 1 addition & 1 deletion test/results/minimal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/mysql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]

# Start the server by default, this can be overwritten at runtime
EXPOSE 80
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/no_precompiled_gems/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/no_prep/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/parallel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/postgresql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]

# Start the server by default, this can be overwritten at runtime
EXPOSE 80
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/precompile_defer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/precompile_defer/docker-entrypoint
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -e

# If running the rails server then create or migrate existing database
if [ "${*}" == "bundle exec thrust ./bin/rails server" ]; then
if [ "${*}" == "./bin/thrust ./bin/rails server" ]; then
./bin/rails assets:precompile
./bin/rails db:prepare
fi
Expand Down
2 changes: 1 addition & 1 deletion test/results/private_gemserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/private_gemserver_with_cache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/redis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/rmagick/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/shrine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/sidekiq/fly.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

[processes]
app = "bundle exec thrust ./bin/rails server"
app = "./bin/thrust ./bin/rails server"
sidekiq = "bundle exec sidekiq"

2 changes: 1 addition & 1 deletion test/results/solid_queue_postgres/fly.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

[processes]
app = "bundle exec thrust ./bin/rails server"
app = "./bin/thrust ./bin/rails server"
solidq = "bundle exec rake solid_queue:start"

2 changes: 1 addition & 1 deletion test/results/solid_queue_sqlite3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/sqlite3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/swap/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/swap/docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ $UID -eq 0 ]; then
fi

# If running the rails server then create or migrate existing database
if [ "${*}" == "bundle exec thrust ./bin/rails server" ]; then
if [ "${*}" == "./bin/thrust ./bin/rails server" ]; then
./bin/rails db:prepare
fi

Expand Down
2 changes: 1 addition & 1 deletion test/results/thruster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/trilogy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]

# Start the server by default, this can be overwritten at runtime
EXPOSE 80
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/vite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]
2 changes: 1 addition & 1 deletion test/results/yjit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
VOLUME /data
CMD ["bundle", "exec", "thrust", "./bin/rails", "server"]
CMD ["./bin/thrust", "./bin/rails", "server"]

0 comments on commit 52b07e8

Please sign in to comment.