Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 1.68 KB

README.md

File metadata and controls

47 lines (35 loc) · 1.68 KB

wait-for-oracle

main pipeline docker pulls docker image size Github last-commit

It's like wait-for-it.sh, but for Oracle databases.

Requirements

  • Go v1.18 or later

Usage

You can pass the information as command-line arguments:

./wait-for-oracle --user=<username> --password=<password> --host=<host> [--port=<port>] --sid=<sid> [--timeout=<timeout>]

You can also use environment variables to pass the information:

export ORACLE_USER=<username>
export ORACLE_PASSWORD=<password>
export ORACLE_HOST=<host>
export ORACLE_PORT=<port>
export ORACLE_SID=<sid>
export ORACLE_TIMEOUT=<timeout>

./wait-for-oracle

Options

  • --user or ORACLE_USER: Oracle database user
  • --password or ORACLE_PASSWORD: Oracle database password
  • --host or ORACLE_HOST: Oracle database host
  • --port or ORACLE_PORT: Oracle database port (default: 1521)
  • --sid or ORACLE_SID: Oracle database SID
  • --timeout or ORACLE_TIMEOUT: Timeout in seconds (default: 0)

If timeout is not specified or is 0, the program will wait indefinitely.

Output

The program will either print "Connected" if the connection to the database is successful and exit with code 0, or "Timeout" if the connection could not be established within the specified timeout (exit code 1).

License

This program is licensed under the MIT License.