Showing
3 changed files
with
5 additions
and
1 deletions
@@ -16,6 +16,8 @@ CASSANDRA_HOST=cassandra | @@ -16,6 +16,8 @@ CASSANDRA_HOST=cassandra | ||
16 | CASSANDRA_PORT=9042 | 16 | CASSANDRA_PORT=9042 |
17 | 17 | ||
18 | # postgres db config | 18 | # postgres db config |
19 | +POSTGRES_HOST=cassandra | ||
20 | +POSTGRES_PORT=9042 | ||
19 | # SPRING_JPA_DATABASE_PLATFORM=org.hibernate.dialect.PostgreSQLDialect | 21 | # SPRING_JPA_DATABASE_PLATFORM=org.hibernate.dialect.PostgreSQLDialect |
20 | # SPRING_DRIVER_CLASS_NAME=org.postgresql.Driver | 22 | # SPRING_DRIVER_CLASS_NAME=org.postgresql.Driver |
21 | # SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/thingsboard | 23 | # SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/thingsboard |
@@ -28,7 +28,7 @@ fi | @@ -28,7 +28,7 @@ fi | ||
28 | 28 | ||
29 | if [ "$DATABASE_TYPE" == "sql" ]; then | 29 | if [ "$DATABASE_TYPE" == "sql" ]; then |
30 | if [ "$SPRING_DRIVER_CLASS_NAME" == "org.postgresql.Driver" ]; then | 30 | if [ "$SPRING_DRIVER_CLASS_NAME" == "org.postgresql.Driver" ]; then |
31 | - until nmap postgres -p 5432 | grep "5432/tcp open" | 31 | + until nmap $POSTGRES_HOST -p $POSTGRES_PORT | grep "$POSTGRES_PORT/tcp open" |
32 | do | 32 | do |
33 | echo "Waiting for postgres db to start..." | 33 | echo "Waiting for postgres db to start..." |
34 | sleep 10 | 34 | sleep 10 |