Skip to content

Commit 48f9f7d

Browse files
committed
Allow setting cv2: for the db url
1 parent 35d3755 commit 48f9f7d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • ext/central-controller-docker

ext/central-controller-docker/main.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ if [ -z "$ZT_DB_PASSWORD" ]; then
2424
echo '*** FAILED: ZT_DB_PASSWORD environment variable not defined'
2525
exit 1
2626
fi
27+
if [ -z "$ZT_DB_TYPE" ]; then
28+
ZT_DB="postgres"
29+
fi
2730

2831
REDIS=""
2932
if [ "$ZT_USE_REDIS" == "true" ]; then
@@ -70,7 +73,7 @@ APP_NAME="controller-$(cat /var/lib/zerotier-one/identity.public | cut -d ':' -f
7073

7174
echo "{
7275
\"settings\": {
73-
\"controllerDbPath\": \"postgres:host=${ZT_DB_HOST} port=${ZT_DB_PORT} dbname=${ZT_DB_NAME} user=${ZT_DB_USER} password=${ZT_DB_PASSWORD} application_name=${APP_NAME} sslmode=prefer sslcert=${DB_CLIENT_CERT} sslkey=${DB_CLIENT_KEY} sslrootcert=${DB_SERVER_CA}\",
76+
\"controllerDbPath\": \"${ZT_DB_TYPE}:host=${ZT_DB_HOST} port=${ZT_DB_PORT} dbname=${ZT_DB_NAME} user=${ZT_DB_USER} password=${ZT_DB_PASSWORD} application_name=${APP_NAME} sslmode=prefer sslcert=${DB_CLIENT_CERT} sslkey=${DB_CLIENT_KEY} sslrootcert=${DB_SERVER_CA}\",
7477
\"portMappingEnabled\": true,
7578
\"softwareUpdate\": \"disable\",
7679
\"interfacePrefixBlacklist\": [

0 commit comments

Comments
 (0)