diff --git a/lib/generators/dockerfile_generator.rb b/lib/generators/dockerfile_generator.rb index efe8bbb..292b836 100644 --- a/lib/generators/dockerfile_generator.rb +++ b/lib/generators/dockerfile_generator.rb @@ -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") @@ -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" diff --git a/test/results/alpine/Dockerfile b/test/results/alpine/Dockerfile index 5807164..de5439e 100644 --- a/test/results/alpine/Dockerfile +++ b/test/results/alpine/Dockerfile @@ -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"] diff --git a/test/results/alpine/docker-entrypoint b/test/results/alpine/docker-entrypoint index cf31c5c..620df25 100644 --- a/test/results/alpine/docker-entrypoint +++ b/test/results/alpine/docker-entrypoint @@ -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 diff --git a/test/results/api/Dockerfile b/test/results/api/Dockerfile index e53196e..2476fbb 100644 --- a/test/results/api/Dockerfile +++ b/test/results/api/Dockerfile @@ -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"] diff --git a/test/results/bin_cd/Dockerfile b/test/results/bin_cd/Dockerfile index 2cadf32..29a0541 100644 --- a/test/results/bin_cd/Dockerfile +++ b/test/results/bin_cd/Dockerfile @@ -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"] diff --git a/test/results/bun/Dockerfile b/test/results/bun/Dockerfile index 83d2886..0348016 100644 --- a/test/results/bun/Dockerfile +++ b/test/results/bun/Dockerfile @@ -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"] diff --git a/test/results/cache/Dockerfile b/test/results/cache/Dockerfile index 07be94c..a09b83e 100644 --- a/test/results/cache/Dockerfile +++ b/test/results/cache/Dockerfile @@ -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"] diff --git a/test/results/ci/Dockerfile b/test/results/ci/Dockerfile index de44271..14aa3fd 100644 --- a/test/results/ci/Dockerfile +++ b/test/results/ci/Dockerfile @@ -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"] diff --git a/test/results/config/Dockerfile b/test/results/config/Dockerfile index ba76627..618ddf3 100644 --- a/test/results/config/Dockerfile +++ b/test/results/config/Dockerfile @@ -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"] diff --git a/test/results/env/Dockerfile b/test/results/env/Dockerfile index e09e441..ace79bb 100644 --- a/test/results/env/Dockerfile +++ b/test/results/env/Dockerfile @@ -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"] diff --git a/test/results/esbuild/Dockerfile b/test/results/esbuild/Dockerfile index 95614ce..09ac943 100644 --- a/test/results/esbuild/Dockerfile +++ b/test/results/esbuild/Dockerfile @@ -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"] diff --git a/test/results/execjs_importmap/Dockerfile b/test/results/execjs_importmap/Dockerfile index b7ba3da..bf90be5 100644 --- a/test/results/execjs_importmap/Dockerfile +++ b/test/results/execjs_importmap/Dockerfile @@ -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"] diff --git a/test/results/execjs_node/Dockerfile b/test/results/execjs_node/Dockerfile index cfa8941..800c640 100644 --- a/test/results/execjs_node/Dockerfile +++ b/test/results/execjs_node/Dockerfile @@ -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"] diff --git a/test/results/fullstaq/Dockerfile b/test/results/fullstaq/Dockerfile index 8709c86..3132357 100644 --- a/test/results/fullstaq/Dockerfile +++ b/test/results/fullstaq/Dockerfile @@ -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"] diff --git a/test/results/grover/Dockerfile b/test/results/grover/Dockerfile index cd65b60..d345a0f 100644 --- a/test/results/grover/Dockerfile +++ b/test/results/grover/Dockerfile @@ -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"] diff --git a/test/results/jemalloc/Dockerfile b/test/results/jemalloc/Dockerfile index a5bf1e3..1947320 100644 --- a/test/results/jemalloc/Dockerfile +++ b/test/results/jemalloc/Dockerfile @@ -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"] diff --git a/test/results/label/Dockerfile b/test/results/label/Dockerfile index 15d8cb0..00f69aa 100644 --- a/test/results/label/Dockerfile +++ b/test/results/label/Dockerfile @@ -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"] diff --git a/test/results/litefs/docker-entrypoint b/test/results/litefs/docker-entrypoint index c7ed7bb..ce237a7 100644 --- a/test/results/litefs/docker-entrypoint +++ b/test/results/litefs/docker-entrypoint @@ -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 diff --git a/test/results/minimal/Dockerfile b/test/results/minimal/Dockerfile index 44a2db8..4ca3663 100644 --- a/test/results/minimal/Dockerfile +++ b/test/results/minimal/Dockerfile @@ -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"] diff --git a/test/results/mysql/Dockerfile b/test/results/mysql/Dockerfile index 2c4e011..dc140f7 100644 --- a/test/results/mysql/Dockerfile +++ b/test/results/mysql/Dockerfile @@ -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"] diff --git a/test/results/no_precompiled_gems/Dockerfile b/test/results/no_precompiled_gems/Dockerfile index 3a0ee68..0016624 100644 --- a/test/results/no_precompiled_gems/Dockerfile +++ b/test/results/no_precompiled_gems/Dockerfile @@ -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"] diff --git a/test/results/no_prep/Dockerfile b/test/results/no_prep/Dockerfile index 41a4c1d..32b73b9 100644 --- a/test/results/no_prep/Dockerfile +++ b/test/results/no_prep/Dockerfile @@ -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"] diff --git a/test/results/parallel/Dockerfile b/test/results/parallel/Dockerfile index c231a90..4fe6909 100644 --- a/test/results/parallel/Dockerfile +++ b/test/results/parallel/Dockerfile @@ -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"] diff --git a/test/results/postgresql/Dockerfile b/test/results/postgresql/Dockerfile index f7c6a5a..a7d8918 100644 --- a/test/results/postgresql/Dockerfile +++ b/test/results/postgresql/Dockerfile @@ -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"] diff --git a/test/results/precompile_defer/Dockerfile b/test/results/precompile_defer/Dockerfile index 2c84cfc..ec365e1 100644 --- a/test/results/precompile_defer/Dockerfile +++ b/test/results/precompile_defer/Dockerfile @@ -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"] diff --git a/test/results/precompile_defer/docker-entrypoint b/test/results/precompile_defer/docker-entrypoint index 8de9a84..e5e06af 100755 --- a/test/results/precompile_defer/docker-entrypoint +++ b/test/results/precompile_defer/docker-entrypoint @@ -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 diff --git a/test/results/private_gemserver/Dockerfile b/test/results/private_gemserver/Dockerfile index d8830ed..39cc091 100644 --- a/test/results/private_gemserver/Dockerfile +++ b/test/results/private_gemserver/Dockerfile @@ -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"] diff --git a/test/results/private_gemserver_with_cache/Dockerfile b/test/results/private_gemserver_with_cache/Dockerfile index a885c26..3dfda17 100644 --- a/test/results/private_gemserver_with_cache/Dockerfile +++ b/test/results/private_gemserver_with_cache/Dockerfile @@ -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"] diff --git a/test/results/redis/Dockerfile b/test/results/redis/Dockerfile index a262fa0..9ebcd0b 100644 --- a/test/results/redis/Dockerfile +++ b/test/results/redis/Dockerfile @@ -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"] diff --git a/test/results/rmagick/Dockerfile b/test/results/rmagick/Dockerfile index 85f7ca1..da66f02 100644 --- a/test/results/rmagick/Dockerfile +++ b/test/results/rmagick/Dockerfile @@ -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"] diff --git a/test/results/shrine/Dockerfile b/test/results/shrine/Dockerfile index 44a2db8..4ca3663 100644 --- a/test/results/shrine/Dockerfile +++ b/test/results/shrine/Dockerfile @@ -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"] diff --git a/test/results/sidekiq/fly.toml b/test/results/sidekiq/fly.toml index 7856d87..4141174 100644 --- a/test/results/sidekiq/fly.toml +++ b/test/results/sidekiq/fly.toml @@ -1,5 +1,5 @@ [processes] - app = "bundle exec thrust ./bin/rails server" + app = "./bin/thrust ./bin/rails server" sidekiq = "bundle exec sidekiq" diff --git a/test/results/solid_queue_postgres/fly.toml b/test/results/solid_queue_postgres/fly.toml index 56882d2..086f48f 100644 --- a/test/results/solid_queue_postgres/fly.toml +++ b/test/results/solid_queue_postgres/fly.toml @@ -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" diff --git a/test/results/solid_queue_sqlite3/Dockerfile b/test/results/solid_queue_sqlite3/Dockerfile index 766e01f..c6d7a14 100644 --- a/test/results/solid_queue_sqlite3/Dockerfile +++ b/test/results/solid_queue_sqlite3/Dockerfile @@ -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"] diff --git a/test/results/sqlite3/Dockerfile b/test/results/sqlite3/Dockerfile index a262fa0..9ebcd0b 100644 --- a/test/results/sqlite3/Dockerfile +++ b/test/results/sqlite3/Dockerfile @@ -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"] diff --git a/test/results/swap/Dockerfile b/test/results/swap/Dockerfile index ca17444..6ea969a 100644 --- a/test/results/swap/Dockerfile +++ b/test/results/swap/Dockerfile @@ -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"] diff --git a/test/results/swap/docker-entrypoint b/test/results/swap/docker-entrypoint index 184adbc..27006df 100644 --- a/test/results/swap/docker-entrypoint +++ b/test/results/swap/docker-entrypoint @@ -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 diff --git a/test/results/thruster/Dockerfile b/test/results/thruster/Dockerfile index 2b434da..4721412 100644 --- a/test/results/thruster/Dockerfile +++ b/test/results/thruster/Dockerfile @@ -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"] diff --git a/test/results/trilogy/Dockerfile b/test/results/trilogy/Dockerfile index 048cbbd..2b7a1bb 100644 --- a/test/results/trilogy/Dockerfile +++ b/test/results/trilogy/Dockerfile @@ -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"] diff --git a/test/results/vite/Dockerfile b/test/results/vite/Dockerfile index f20419a..f6dda62 100644 --- a/test/results/vite/Dockerfile +++ b/test/results/vite/Dockerfile @@ -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"] diff --git a/test/results/windows/Dockerfile b/test/results/windows/Dockerfile index 02b2919..054a14b 100644 --- a/test/results/windows/Dockerfile +++ b/test/results/windows/Dockerfile @@ -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"] diff --git a/test/results/yjit/Dockerfile b/test/results/yjit/Dockerfile index 5cd8b07..5682597 100644 --- a/test/results/yjit/Dockerfile +++ b/test/results/yjit/Dockerfile @@ -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"]