i have a problem, i have two services in docker compose, one with oracle database and second with springboot application. Java app needs to wait for database to be created and wait for scripts to be initialized. Otherwise its throwing connection error. I tried with health check and depends on but doenst work well My docker-compose file:
version: '2.1'
services:
oracle-xe:
image: gvenzl/oracle-xe:latest
container_name: oracle
ports:
- "1521:1521"
environment:
- ORACLE_PASSWORD=oracle
volumes:
- ../database/scripts:/docker-entrypoint-initdb.d
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
- oracle-xe
Healthcheck, bash commands, depends on