File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ services:
9
9
database : stuff
10
10
config :
11
11
database : config/my.cnf
12
+ customnopwd :
13
+ type : mariadb:10.3
14
+ portforward : true
15
+ creds :
16
+ user : pirog
17
+ password :
18
+ database : stuff
12
19
customimage :
13
20
type : mariadb:custom
14
21
portforward : true
Original file line number Diff line number Diff line change 2
2
3
3
// checks to see if a setting is disabled
4
4
module . exports = options => {
5
- return [
5
+ let healthcheck = [
6
6
'mysql' ,
7
7
`--host=${ options . name } ` ,
8
- `--user=${ options . creds . user } ` ,
9
- `--database=${ options . creds . database } ` ,
10
- `--password=${ options . creds . password } ` ,
8
+ ] ;
9
+
10
+ // Only include whatever creds are available.
11
+ options . creds . user ? healthcheck . push ( `--user=${ options . creds . user } ` ) : false ;
12
+ options . creds . database ? healthcheck . push ( `--database=${ options . creds . database } ` ) : false ;
13
+ options . creds . password ? healthcheck . push ( `--password=${ options . creds . password } ` ) : false ;
14
+
15
+ healthcheck = healthcheck . concat ( [
11
16
'--silent' ,
12
17
'--execute' ,
13
18
'"SHOW TABLES;"' ,
14
- ] . join ( ' ' ) ;
19
+ ] ) ;
20
+
21
+ return healthcheck . join ( ' ' ) ;
15
22
} ;
You can’t perform that action at this time.
0 commit comments