https://github.com/kenpb/wait-for-oracledb
A simple utility to wait for Oracle 11g availability/table population in a docker-compose setup
https://github.com/kenpb/wait-for-oracledb
docker docker-compose oracle-11g wait-for-it
Last synced: 3 days ago
JSON representation
A simple utility to wait for Oracle 11g availability/table population in a docker-compose setup
- Host: GitHub
- URL: https://github.com/kenpb/wait-for-oracledb
- Owner: kenpb
- License: mit
- Created: 2018-08-06T21:25:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-08T15:33:11.000Z (almost 8 years ago)
- Last Synced: 2023-08-14T02:30:58.367Z (almost 3 years ago)
- Topics: docker, docker-compose, oracle-11g, wait-for-it
- Language: Java
- Homepage:
- Size: 3.51 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wait-for-oracle
A small Docker utility to check the availability or existence of tables and records in a dependent Oracle database, tested with [Oracle 11g](https://hub.docker.com/r/sath89/oracle-xe-11g/).
It uses maven, the OJDBC driver is included under the `driver` folder, to build just run `mvn package`.
To use in a project copy both, the jar file (the one that's not prefixed with `original-`) at the `target` folder and the bash script in the `bin` directory to a location in your project, add as entrypoint to your docker file among the lines of the supplied example.
```sh
usage: wait-for-oracle host user password command [-q query] [-d delay] [-e --exceptions]
-c,--command The command to run after the verification success.
-d,--delay The delay between tries.
-e,--exceptions Show the exception messages with the retry message.
-h,--host The JDBC connection string. iex:
jdbc:oracle:thin:@localhost:1521:xe
-p,--pass The database password.
-q,--query The query to verify the database integrity.
-u,--user The username for the databases.
```
Add in the docker file for example:
```dockerfile
volumes:
- ./docker/wait-for-oracle.jar:/wait-for-oracle.jar
- ./docker/wait-for-oracle:/wait-for-oracle
entrypoint: ["./wait-for-oracle", "-h", "jdbc:oracle:thin:@oracle:1521:xe", "-u", "system", "-p", "system", "-c", "\"java -Djava.security.egd=file:/dev/./urandom -jar /app.jar\""]
```
## TODO
* Still working in the README
* Handle args better in the script
* Default connection and credentials
* Maybe it doesn't actually need the bash script?