version: '3' services: db: image: bonitasoft/bonita-postgres:12.6 environment: POSTGRES_PASSWORD: example restart: always command: - -c - max_prepared_transactions=100 bonita: image: bonita:7.14.0 hostname: custom-hostname.example.com ports: - 8080:8080 environment: - DB_VENDOR=postgres - DB_HOST=db - DB_PORT=5432 - DB_NAME=bonita - DB_USER=bonita - DB_PASS=bpm - BIZ_DB_NAME=business_data - BIZ_DB_USER=business_data - BIZ_DB_PASS=bpm - TENANT_LOGIN=tech_user - TENANT_PASSWORD=secret - PLATFORM_LOGIN=pfadmin - PLATFORM_PASSWORD=pfsecret restart: on-failure:2 depends_on: - db entrypoint: - bash - -c - | set -e echo 'Waiting for PostgreSQL to be available' maxTries=10 while [ "$$maxTries" -gt 0 ] && [ $$(echo 'QUIT' | nc -w 1 "$$DB_HOST" 5432; echo "$$?") -gt 0 ]; do sleep 1 let maxTries-- done if [ "$$maxTries" -le 0 ]; then echo >&2 'error: unable to contact Postgres after 10 tries' exit 1 fi exec /opt/files/startup.sh /opt/bonita/server/bin/catalina.sh run