Skip to content

Commit 3febf43

Browse files
authored
Merge pull request #42 from aakb/feature/open_sql_gui
Added sql:open command as shortcut to open tableplus or other DB GUI
2 parents d263d58 + 2055c2c commit 3febf43

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/itkdev-docker-compose

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ Commands:
143143
Use `$(itkdev-docker-compose sql:connect)` to open the
144144
database cli.
145145
146+
sql:open
147+
Open database GUI and connect to MariaDB.
148+
146149
sql:port
147150
Display the exposed MariaDB SQL server port.
148151
@@ -382,6 +385,14 @@ EOF
382385
echo mysql --host=$host --port=$port --user=db --password=db db
383386
;;
384387

388+
sql:open)
389+
address=$(docker_compose port mariadb 3306)
390+
host=$(echo $address | cut -d: -f1)
391+
port=$(echo $address | cut -d: -f2)
392+
echo open mariadb://db:db@$host:$port/db
393+
open mariadb://db:db@$host:$port/db
394+
;;
395+
385396
sql:port)
386397
docker_compose port mariadb 3306 | cut -d: -f2
387398
;;

0 commit comments

Comments
 (0)