improve deployment instructions
- Use gradle wrapper (./gradlew) instead of requiring manual install - Simplify deployment from 5 commands to 2 - Add symlink to /usr/local/bin for system-wide access - Remove unnecessary ownership changes - Add update instructions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b3a9151eff
commit
b0ee4c77d9
54
readme.md
54
readme.md
@ -15,31 +15,41 @@ export PATH=$PATH:$JAVA_HOME/bin
|
|||||||
|
|
||||||
`java --version` to test
|
`java --version` to test
|
||||||
|
|
||||||
## install gradle
|
## install gradle (optional)
|
||||||
https://docs.gradle.org/current/userguide/installation.html
|
Gradle wrapper (`gradlew`) is included in the repo, so manual Gradle installation is not required.
|
||||||
go to gradle.org and find the latest bin.zip file (burried in the `direct link` hyperlink)
|
If you prefer to install Gradle system-wide:
|
||||||
```
|
```
|
||||||
wget https://services.gradle.org/distributions/gradle-7.6-bin.zip
|
wget https://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||||
unzip -d /opt/gradle gradle-7.6-bin.zip
|
unzip -d /opt/gradle gradle-8.5-bin.zip
|
||||||
```
|
export PATH=$PATH:/opt/gradle/gradle-8.5/bin
|
||||||
point to the gradle install
|
gradle -v
|
||||||
```
|
|
||||||
export PATH=$PATH:/opt/gradle/gradle-7.6/bin
|
|
||||||
gradle -v` to validate
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## clone this repo
|
## clone this repo
|
||||||
clone
|
|
||||||
`git clone https://gitea.hptrow.me/pt/jrunner.git`
|
|
||||||
|
|
||||||
build
|
|
||||||
gradle build`
|
|
||||||
|
|
||||||
copy to opt for use
|
|
||||||
```
|
```
|
||||||
sudo cp app/build/distributions/app.zip /opt/
|
git clone https://gitea.hptrow.me/pt/jrunner.git
|
||||||
sudo rm -rf /opt/app/
|
cd jrunner
|
||||||
sudo unzip /opt/app.zip -d /opt/
|
```
|
||||||
sudo rm /opt/app.zip
|
|
||||||
sudo chown ptrowbridge:ptrowbridge -R /opt/app/
|
## build
|
||||||
|
```
|
||||||
|
./gradlew build
|
||||||
|
```
|
||||||
|
|
||||||
|
## deploy system-wide
|
||||||
|
```
|
||||||
|
sudo unzip app/build/distributions/app.zip -d /opt/
|
||||||
|
sudo ln -sf /opt/app/bin/app /usr/local/bin/jrunner
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you can run from anywhere:
|
||||||
|
```
|
||||||
|
jrunner -scu jdbc:postgresql://... -scn user -scp pass ...
|
||||||
|
```
|
||||||
|
|
||||||
|
To update after rebuilding:
|
||||||
|
```
|
||||||
|
./gradlew build
|
||||||
|
sudo rm -rf /opt/app
|
||||||
|
sudo unzip app/build/distributions/app.zip -d /opt/
|
||||||
```
|
```
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user