if [[ $DB_DEPLOYMENT_TYPE == "docker" && $DB_TYPE == "yugabyte" ]];
then
until psql -h localhost -p 5433 -U yugabyte -c 'show server_version' ; do sleep 1 ; done 2>/dev/null
until schemaInitialized=$(psql -h localhost -p 5433 -U yugabyte -t -c "select count(schema_name) FROM information_schema.schemata WHERE schema_name = 'social'"); echo 'checking for schema' ; do sleep 1 ; done 2>/dev/null
echo $schemaInitialized
if [[ $schemaInitialized == "0" ]];
then
psql -h localhost -p 5433 -U yugabyte -a -f ./schema/postgres.sql
psql -h localhost -p 5433 -U yugabyte -a -f ./data/users.sql
psql -h localhost -p 5433 -U yugabyte -a -f ./data/posts.sql
psql -h localhost -p 5433 -U yugabyte -a -f ./data/comments.sql
psql -h localhost -p 5433 -U yugabyte -a -f ./data/likes.sql
psql -h localhost -p 5433 -U yugabyte -a -f ./data/relationships.sql
psql -h localhost -p 5433 -U yugabyte -a -f ./data/stories.sql
fi
fi
npm start
api-1 | ./docker-entrypoint.sh: line 19: syntax error: unexpected end of file (expecting “then”)
Is there any error in this file??
Link to docs
New contributor
Unleash is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.