Hi Ganesh,
I use a side service like this for that:
yb-demo-init:
image: yugabytedb/yugabyte:latest
volumes:
- ./scripts:/home/yugabyte/scripts
command: |
bash -c "
bin/ysqlsh v ON_ERROR_STOP=1 -c 'select * from yb_servers()' &&
./scripts/script.sh
"
deploy:
restart_policy:
condition: on-failure