Add a `gdk doctor` command
This is the first iteration on gdk doctor
command that does the following:
- Perform
rake preflight-checks
and warn user of missing dependencies - Advise if the GDK is out-of-date with master
- Advise if services are not running when they should be
- Check for pending DB migrations and advise to migrate
- Run
gdk diff-config
and advise user to review or togdk reconfigure
Example output when something unexpected is encountered:
$ gdk doctor
================================================================================
Please note that these warnings are only used to help in debugging if you
encounter issues with GDK. If this GDK is working fine for you, you can
safely ignore them. Thanks!
================================================================================
Database Migrations
--------------------------------------------------------------------------------
There are pending database migrations.
To update your database, run `cd gitlab && bundle exec rails db:migrate`.
GDK Version
--------------------------------------------------------------------------------
If you are not actively developing on the GDK, consider updating GDK with `gdk update`.
GDK Configuration
--------------------------------------------------------------------------------
Please review the following diff or consider `gdk reconfigure`.
diff --git a/Procfile.unchanged b/Procfile
index b9fc4a3..0217aea 100644
--- a/Procfile.unchanged
+++ b/Procfile
@@ -5,7 +5,7 @@
# Datasources
#
-# redis: exec redis-server /Users/albert/Dev/gdk/redis/redis.conf
+redis: exec redis-server /Users/albert/Dev/gdk/redis/redis.conf
minio: exec support/object-store
postgresql: exec support/postgresql-signal-wrapper /usr/local/bin/postgres -D /Users/albert/Dev/gdk/postgresql/data -k /Users/albert/Dev/gdk/postgresql -h ''
#postgresql-replica: exec support/postgresql-signal-wrapper /usr/local/bin/postgres -D /Users/albert/Dev/gdk/postgresql-replica/data -k /Users/albert/Dev/gdk/postgresql-replica -h ''
When everything is OK:
$ gdk doctor
GDK is ready.
Closes #670 (closed)
Edited by Albert Salim