Readme changes: - Document that deployment directory must exist first - Show mkdir -p commands before deploy - Explain atomic deployment behavior (extracts to /tmp first) Version bump to 1.0: - Major refactoring: renamed app to jrunner - Simplified deployment script - Updated documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
78 lines
1.9 KiB
Markdown
78 lines
1.9 KiB
Markdown
## install java jdk.
|
|
find downloads page and get latest tarball.
|
|
https://www.oracle.com/java/technologies/downloads/
|
|
|
|
```
|
|
wget https://download.oracle.com/java/19/latest/jdk-19_linux-x64_bin.tar.gz
|
|
tar -xvf downloaded_file
|
|
```
|
|
move the extracted folder to /opt
|
|
put the extracted location in your path variable
|
|
```
|
|
export JAVA_HOME=/opt/jdk-19.0.1
|
|
export PATH=$PATH:$JAVA_HOME/bin
|
|
```
|
|
|
|
`java --version` to test
|
|
|
|
## install gradle (optional)
|
|
Gradle wrapper (`gradlew`) is included in the repo, so manual Gradle installation is not required.
|
|
If you prefer to install Gradle system-wide:
|
|
```
|
|
wget https://services.gradle.org/distributions/gradle-8.5-bin.zip
|
|
unzip -d /opt/gradle gradle-8.5-bin.zip
|
|
export PATH=$PATH:/opt/gradle/gradle-8.5/bin
|
|
gradle -v
|
|
```
|
|
|
|
## clone this repo
|
|
```
|
|
git clone https://gitea.hptrow.me/pt/jrunner.git
|
|
cd jrunner
|
|
```
|
|
|
|
## build
|
|
```
|
|
./gradlew build
|
|
```
|
|
|
|
## deploy
|
|
|
|
### using the deploy script (recommended)
|
|
|
|
First, create the deployment directory:
|
|
```
|
|
sudo mkdir -p /opt/jrunner
|
|
```
|
|
|
|
Then deploy:
|
|
```
|
|
# Deploy to /opt/jrunner (default, creates system-wide symlink)
|
|
./deploy.sh
|
|
|
|
# Deploy to custom location (for testing, no symlink)
|
|
sudo mkdir -p /opt/jrunner-test
|
|
./deploy.sh /opt/jrunner-test
|
|
```
|
|
|
|
The script builds, extracts to a temporary location, and only updates the target directory after the build succeeds. This ensures your existing deployment stays intact if the build fails. When deploying to `/opt/jrunner`, it creates a symlink at `/usr/local/bin/jrunner`.
|
|
|
|
### manual deployment
|
|
```
|
|
./gradlew build
|
|
sudo unzip jrunner/build/distributions/jrunner.zip -d /opt/
|
|
sudo ln -sf /opt/jrunner/bin/jrunner /usr/local/bin/jrunner
|
|
```
|
|
|
|
## usage
|
|
|
|
After deployment to default location:
|
|
```
|
|
jrunner -scu jdbc:postgresql://... -scn user -scp pass ...
|
|
```
|
|
|
|
After deployment to custom location:
|
|
```
|
|
/opt/jrunner-test/bin/jrunner -scu jdbc:postgresql://... -scn user -scp pass ...
|
|
```
|