Skip to content

Commit da24bd6

Browse files
committed
make dbstack fail faster if docker-compose build/start fails
1 parent 95a985e commit da24bd6

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

bin/dbstack

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,13 @@ build() {
224224

225225
if [ ${RECREATE} = 'true' ]; then
226226
${DOCKER_COMPOSE_CMD} ${VERBOSITY} up -d --force-recreate
227+
RETCODE=$?
227228
else
228229
${DOCKER_COMPOSE_CMD} ${VERBOSITY} up -d
230+
RETCODE=$?
231+
fi
232+
if [ ${RETCODE} -ne 0 ]; then
233+
exit ${RETCODE}
229234
fi
230235

231236
wait_for_bootstrap all
@@ -309,6 +314,10 @@ setup_app() {
309314
export COMPOSE_SETUP_APP_ON_BOOT=false
310315

311316
${DOCKER_COMPOSE_CMD} ${VERBOSITY} up -d ${WORKER_SERVICE}
317+
RETCODE=$?
318+
if [ ${RETCODE} -ne 0 ]; then
319+
exit ${RETCODE}
320+
fi
312321

313322
wait_for_bootstrap worker
314323
RETCODE=$?

doc/TODO.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
(ascii chars, utf8 basic plane, utf8 multilingual plane) and then selects data from it
120120

121121
- adminer:
122-
+ make it easier to log in: provide transparently root user/pwd in links to it
122+
+ make it easier to log in: provide transparently root user/pwd in links to it and/or in server list
123123
+ add sql log file
124124
+ add data dump capabilities
125125
+ add schema dump capabilities
@@ -128,6 +128,7 @@
128128
- build/docker:
129129
+ make container build faster (helps Travis):
130130
+ save pre-built oracle image in own dockerhub account
131+
+ try to reduce disk size by decreasing the number of docker build steps (eg. for oracle, sqlserver)
131132
+ add composer HEALTHCHECK to containers, at least our own ones (see https://docs.docker.com/engine/reference/builder/#healthcheck)
132133
+ when there are no db data files at start, dbstack & dbconsole should wait for the db instances to be fully ready...
133134
at the moment, only the oracle container waits for the db to be rebuild
@@ -155,13 +156,14 @@
155156
+ hide the docker-compose warning about orphan containers when setting COMPOSE_ONLY_VENDORS or COMPOSE_EXCEPT_VENDORS
156157

157158
- host: improve cli scripts:
159+
+ make dbstack build & start faster by waiting in parallel for bootstrap.sh
158160
+ allow 'cleanup' command to remove all anonymous docker volumes - or at least the ones belonging to this app
159161
use `docker-compose config --volumes` to list them? see https://github.com/docker/docker.github.io/issues/8366
160162
+ add removal of docker images and containers (eg. docker-compose down)
161163
+ move from bash to sh ? also, reduce the number of cli commands we use (listed in readme)
162164
+ check if we can use a linux container to generate the shell commands used by dbstack / dbconsole...
165+
+ move to getopt for better arg parsing ? see https://medium.com/@Drew_Stokes/bash-argument-parsing-54f3b81a6a8f, https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash
163166
+ add shell completion for commands of dbstack
164-
+ make dbstack build & start faster by waiting in parallel for bootstrap.sh
165167

166168
- worker: improve cli scripts
167169
+ allow to drop many dbs, users in single commands
@@ -186,6 +188,7 @@
186188

187189
- app refactor:
188190
+ allow to register via sf config execution of a cli tool against all dbs, with mapped username, pwd, etc... (eg: mysqltuner)
191+
+ allow to register new db instances (and drivers) via bundles (how to set up custom php db exts in worker ?)
189192
+ allow the Command object to specify many sql queries, where 2nd one depends on result of 1st (with callable in between)
190193
+ finish & test execution of select/nonselect queries via pdo; doctrine
191194
+ allow to plug Schema Managers via tagged services instead of registering class names
@@ -214,7 +217,7 @@
214217
- worker: bring back oracle-mysql client via dedicated installation (can it be in parallel to mariadb client ?)
215218
+ what about the percona-mysql client ?
216219

217-
- db: mariadb/mysql: allow to define in docker parameters the size of the ramdisk used for /tmpfs;
220+
- db: mariadb/mysql: allow to define in docker parameters (env var) the size of the ramdisk used for /tmpfs;
218221
also in default configs, do use /tmpfs for temp tables? At least add it commented out
219222

220223
- db: postgresql: move stats_temp_directory to /tmpfs

0 commit comments

Comments
 (0)