Skip to content

Instantly share code, notes, and snippets.

@timuckun
Created July 17, 2022 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timuckun/4b1e8f860cd47e0dc27423cad9563f4d to your computer and use it in GitHub Desktop.
Save timuckun/4b1e8f860cd47e0dc27423cad9563f4d to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'thor'
require 'dotenv'
Dotenv.load
module Db
class Ops < Thor
namespace :db
def self.exit_on_failure?
true
end
desc 'dump', 'dumps the database using pgdump'
def backup
puts 'Backup'
end
desc 'restore', 'loads the database from pgdump'
def restore
puts 'restore'
end
end
end
module Docker
class Commands < Thor
namespace :docker
desc 'start', 'starts docker compose'
def start; end
end
end
Db::Ops.start(ARGV)
Docker::Commands.start(ARGV)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment