From c4fc0bbbbdee07327131211c406b232659df2a52 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Tue, 8 Apr 2025 15:44:45 -0700 Subject: [PATCH] add detach for up and add config command --- lib/stack_car/cli.rb | 9 +++++++++ lib/stack_car/version.rb | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/stack_car/cli.rb b/lib/stack_car/cli.rb index 5a4aafb..ddd524e 100644 --- a/lib/stack_car/cli.rb +++ b/lib/stack_car/cli.rb @@ -25,6 +25,7 @@ def self.exit_on_failure? method_option :service, default: 'web', type: :string, aliases: '-s' method_option :build, default: false, type: :boolean, aliases: '-b' + method_option :detach, default: false, type: :boolean, aliases: '-d' method_option :logs, default: true, type: :boolean desc "up", "starts docker compose with rebuild, defaults to web" def up @@ -32,6 +33,7 @@ def up ensure_development_env args = [] args << '--build' if options[:build] + args << '--detach' if options[:detach] if options[:build] run("#{dotenv} docker compose pull #{options[:service]}") end @@ -125,6 +127,13 @@ def ps(*args) end map status: :ps + method_option :service, default: 'web', type: :string, aliases: '-s' + desc "config", "outputs the docker compose config" + def up + setup + run_with_exit("#{dotenv} docker compose up #{args.join(' ')} #{options[:service]}") + end + method_option :service, default: 'web', type: :string, aliases: '-s' desc "bundle ARGS", "wraps docker compose run web unless --service is used to specify" def bundle(*args) diff --git a/lib/stack_car/version.rb b/lib/stack_car/version.rb index 1be400d..91e6fb3 100644 --- a/lib/stack_car/version.rb +++ b/lib/stack_car/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module StackCar - VERSION = '0.19.0' + VERSION = '0.20.0' end