Update documentation for database related options.
This commit is contained in:
parent
90702ac55e
commit
f783ef46b6
2 changed files with 38 additions and 8 deletions
26
README.md
26
README.md
|
@ -37,6 +37,31 @@ Container werden automatisch vom reverse proxy/host manager aufgegriffen wenn si
|
||||||
|
|
||||||
Optional kann über das Label `local.web.port` der gebundene Port gesetzt werden (Default mysql: 3306, Default postgres: 5432)
|
Optional kann über das Label `local.web.port` der gebundene Port gesetzt werden (Default mysql: 3306, Default postgres: 5432)
|
||||||
|
|
||||||
|
### Label Liste
|
||||||
|
#### Erforderlich
|
||||||
|
- `local.db.type`
|
||||||
|
- DEFAULT: `unset`
|
||||||
|
- DESCRIPTION: Datenbank Typ. Muss auf `mysql` oder `postgres` gesetzt werden.
|
||||||
|
- `local.db.host`
|
||||||
|
- DEFAULT: `unset`
|
||||||
|
- DESCRIPTION: Der Hostname unter dem der Container registriert wird
|
||||||
|
|
||||||
|
#### Optional
|
||||||
|
- `local.db.port`
|
||||||
|
- DEFAULT (mysql): `3306`
|
||||||
|
- DEFAULT (postgres): `5432`
|
||||||
|
- DESCRIPTION: Der Datenbank Port des Zielcontainers
|
||||||
|
- `local.db.dbname`
|
||||||
|
- DEFAULT (mysql): `unset`
|
||||||
|
- DEFAULT (postgres): `postgres`
|
||||||
|
- DESCRIPTION: Name der initialen Zieldatenbank
|
||||||
|
- `local.db.user`
|
||||||
|
- DEFAULT: `unset`
|
||||||
|
- DESCRIPTION: Nutzername für den Datenbank Login
|
||||||
|
- `local.db.password`
|
||||||
|
- DEFAULT: `unset`
|
||||||
|
- DESCRIPTION: Passwort für den Datenbank Login
|
||||||
|
|
||||||
## Minimale Beispiel-Konfiguration
|
## Minimale Beispiel-Konfiguration
|
||||||
In diesem Beispiel sind zwei Container, beide sind Teil des `proxy` Netzwerks.
|
In diesem Beispiel sind zwei Container, beide sind Teil des `proxy` Netzwerks.
|
||||||
Der `app` Container hat das Label `local.web.host` und wird deshalb als HTTP Proxy Target registriert.
|
Der `app` Container hat das Label `local.web.host` und wird deshalb als HTTP Proxy Target registriert.
|
||||||
|
@ -52,6 +77,7 @@ services:
|
||||||
local.db.type: "mysql"
|
local.db.type: "mysql"
|
||||||
local.db.host: "db.myapp.localhost"
|
local.db.host: "db.myapp.localhost"
|
||||||
# Optional labels
|
# Optional labels
|
||||||
|
local.db.dbname: "db_name"
|
||||||
local.db.port: "3306"
|
local.db.port: "3306"
|
||||||
local.db.user: "db_user"
|
local.db.user: "db_user"
|
||||||
local.db.password: "db_user_pass"
|
local.db.password: "db_user_pass"
|
||||||
|
|
20
script/myssh
20
script/myssh
|
@ -4,14 +4,18 @@ SQL_PROXY_HOST="${SQL_PROXY_HOST:-localhost}"
|
||||||
SSH_SQL_PROXY_HOST="sqlproxy.${SQL_PROXY_HOST}"
|
SSH_SQL_PROXY_HOST="sqlproxy.${SQL_PROXY_HOST}"
|
||||||
CONNECTION_CACHE="$HOME/.cache/sqlproxy_${SQL_PROXY_HOST}"
|
CONNECTION_CACHE="$HOME/.cache/sqlproxy_${SQL_PROXY_HOST}"
|
||||||
|
|
||||||
HELP="Usage: myssh [ls|connect]\n
|
HELP="Usage: myssh [ ls | connect | disconnect ]
|
||||||
SUBCOMMANDS:\n
|
SUBCOMMAND LIST:
|
||||||
ls: list available database hosts\n
|
ls: list available database hosts
|
||||||
connect: connect to a database host\n
|
connect: connect to a database host
|
||||||
disconnect: Quit existing ssh master session\n
|
disconnect: Quit existing ssh master session
|
||||||
\n
|
|
||||||
SYNTAX connect host [-u user] [-p password] [-c client]
|
[ connect ]
|
||||||
"
|
SYNTAX connect host [-u user] [-p password] [-d dbname] [-c]
|
||||||
|
-u\tSets/Overrides the database user login name
|
||||||
|
-p\tSets/Overrides the database user login password
|
||||||
|
-d\tSets/Overrides the target database name
|
||||||
|
-c\tRun SQL on CLI instead of GUI"
|
||||||
|
|
||||||
# Detect Pipe
|
# Detect Pipe
|
||||||
if ! [ -t 1 ]
|
if ! [ -t 1 ]
|
||||||
|
|
Loading…
Reference in a new issue