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