Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacesta committed Apr 16, 2024
1 parent 456c4c7 commit b84e329
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from container-registry.oracle.com/database/free:23.3.0.0
COPY docker-entrypoint.sh /usr/local/bin/
COPY --chmod=777 docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
21 changes: 21 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ORACLEDB-INIT

ORACLEDB-INIT is designed to initialize a schema within an Oracle database if it does not already exist. It utilizes SQL*Plus to execute SQL commands within the Oracle database environment.

The script executed within the Docker container performs the following actions:

1. Checks if the specified user exists in the database.
2. If the user does not exist, it creates the user with the provided username and password.
3. Grants necessary privileges to the created user.

## Usage

`docker run -e ADMIN_USER=<admin_user> -e ADMIN_PASSWORD=<admin_password> -e DB_USER=<db_user> -e PASSWORD=<db_password> -e dsn=<connection_string> oracledb-init`

## Environment Variables

- `ADMIN_USER`: The admin username of the Oracle database.
- `ADMIN_PASSWORD`: The admin password of the Oracle database.
- `DB_USER`: The username of the schema to be initialized.
- `PASSWORD`: The password for the new schema.
- `DSN`: The Oracle Data Source Name (DSN) for connection.

0 comments on commit b84e329

Please sign in to comment.