Skip to content
Snippets Groups Projects
Commit 39911a7d authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Merge branch 'db-consoles' into 'master'

Add psql, redis-cli subcommands

This makes it easier to connect to the Postgres, Redis databases spawned by `gdk run db`.

See merge request !211
parents d0cce8bd 8031e1c3
No related branches found
No related tags found
1 merge request!211Add psql, redis-cli subcommands
Loading
Loading
@@ -7,5 +7,7 @@ gdk run app # Start GitLab, needs 'gdk run db'
gdk install gitlab_repo=https://my-fork # Install everything
gdk update # Pull application changes from Git
gdk reconfigure # Delete and regenerate all config files created by GDK
gdk psql -d gitlabhq_development # Postgres console
gdk redis-cli # Redis console
 
# Development admin account: root / 5iveL!fe
Loading
Loading
@@ -29,11 +29,15 @@ module GDK
when 'reconfigure'
remember!($gdk_root)
exec(MAKE, 'clean-config', 'all', chdir: $gdk_root)
when 'psql'
exec('psql', '-h', File.join($gdk_root, 'postgresql'), *ARGV, chdir: $gdk_root)
when 'redis-cli'
exec('redis-cli', '-s', File.join($gdk_root, 'redis/redis.socket'), *ARGV, chdir: $gdk_root)
when 'help'
puts File.read(File.join($gdk_root, 'HELP'))
true
else
puts "Usage: #{PROGNAME} run|init|install|update|reconfigure|version|help [ARGS...]"
puts "Usage: #{PROGNAME} run|init|install|update|reconfigure|psql|redis-cli|version|help [ARGS...]"
false
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment