Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added quickerstart.sh #56

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,21 @@ Type "Y" to continue or CTRL-C to exit: y
>
> Should you forget to save your password, you can find it in the generated settings file along with any other details about the container. It is named after your container, e.g. `apexiscool.env`.

## Quick-er Start
By [SilasMahler](https://github.com/silasmahler)

The [`quickerstart.sh`](./quickerstart.sh) is a modification of the quickstart.sh to be more convenient and even faster to use. Thanks for the nice work Adrian and Martin :)

### Usage
Just insert email, password, containername and desired settingsfile-name.

```bash
$ bash quickerstart.sh [email protected] MyPassword123 dockerapex21xe mysettings.env
```

You can modify the quickerstarter.sh to adjust more environment-variables if needed.


## Additional Notes About the Settings File

* Specify the Docker network to attach to using the parameter `DOCKER_NETWORK_NAME`. The run script will check if the network exists, and if not, create it.
Expand Down
56 changes: 56 additions & 0 deletions quickerstart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env bash
# Use bash quickerstart.sh [email protected] Testpassword123 dockerapex21xe mysetting.env
##### Create environment variables file. #####
APEX_ADMIN_EMAIL=$1
ORACLE_PWD=$2
CONTAINER_NAME=$3
ENV_FILE_NAME=$4

cat << EOF > $ENV_FILE_NAME
ORACLE_SID=XE
ORACLE_PDB=XEPDB1
ORACLE_PWD=$ORACLE_PWD
APEX_ADMIN_EMAIL=$APEX_ADMIN_EMAIL
APEX_ADMIN_PWD=$ORACLE_PWD
APEX_PUBLIC_USER_PWD=$ORACLE_PWD
APEX_LISTENER_PWD=$ORACLE_PWD
APEX_REST_PUBLIC_USER_PWD=$ORACLE_PWD
ORDS_PUBLIC_USER_PWD=$ORACLE_PWD
INSTALL_FILE_APEX=apex-latest.zip
INSTALL_FILE_ORDS=ords-latest.zip
INSTALL_FILE_JAVA=jdk-17_linux-x64_bin.tar.gz
DOCKER_ORDS_PORT=50080
DOCKER_EM_PORT=55500
DOCKER_DB_PORT=51521
DB_VERSION=21.3.0
DB_EDITION=xe
DOCKER_NETWORK_NAME=das_network
ALLOW_DB_PATCHING=N
OML4R_SUPPORT=N
REST_ENABLED_SQL=Y
RTU_ENABLED=N
SQLDEVWEB=Y
DATABASEAPI=Y
FILES_DIR=/files
XE_USE_LOCAL_COPY=N
EOF

##### Download files #####
echo "##### Downloading latest binaries for APEX and ORDS #####"
curl https://download.oracle.com/otn_software/apex/apex-latest.zip --output files/apex-latest.zip
curl https://download.oracle.com/otn_software/java/ords/ords-latest.zip --output files/ords-latest.zip
curl https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz --output files/jdk-17_linux-x64_bin.tar.gz

echo "Set Permissions"
sudo chmod +x 01-build.sh
sudo chmod +x 02-run.sh

echo "##### Running the build #####"
# bash ./01-build.sh $ENV_FILE_NAME 2>&1 | tee 01-build.log
bash ./01-build.sh $ENV_FILE_NAME &> /dev/null

echo "##### Deploying the container #####"
# bash ./02-run.sh ${CONTAINER_NAME} $ENV_FILE_NAME 2>&1 | tee 02-run.log
bash ./02-run.sh ${CONTAINER_NAME} $ENV_FILE_NAME &> /dev/null

echo "Finished"