feat: set db type
This commit is contained in:
parent
29a7d585dc
commit
ec1735a005
@ -2,6 +2,7 @@ version: "3.8"
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
environment:
|
environment:
|
||||||
|
- CMD_DB_TYPE=postgres
|
||||||
- CMD_DB_NAME=codimd
|
- CMD_DB_NAME=codimd
|
||||||
- CMD_DB_USER=codimd
|
- CMD_DB_USER=codimd
|
||||||
- CMD_DB_HOST=db
|
- CMD_DB_HOST=db
|
||||||
|
@ -43,8 +43,7 @@ main() {
|
|||||||
main
|
main
|
||||||
|
|
||||||
if [ -z "${CMD_DB_URL:-""}" ] ; then
|
if [ -z "${CMD_DB_URL:-""}" ] ; then
|
||||||
# TODO: support databases other than postgres and sqlite
|
export CMD_DB_URL="${CMD_DB_TYPE}://$CMD_DB_USER:$CMD_DB_PASSWORD@$CMD_DB_HOST:5432/$CMD_DB_NAME}"
|
||||||
export CMD_DB_URL="${postgres://$CMD_DB_USER:$CMD_DB_PASSWORD@$CMD_DB_HOST:5432/$CMD_DB_NAME}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 3wc: `source /docker-entrypoint.sh -e` to load CMD_DB_URL for CLI scripts
|
# 3wc: `source /docker-entrypoint.sh -e` to load CMD_DB_URL for CLI scripts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user