environment variable for hostname

This commit is contained in:
mbremer
2021-07-26 08:37:46 +02:00
parent 6b1b1f1d00
commit ccf130ad28
2 changed files with 11 additions and 8 deletions

View File

@@ -26,17 +26,20 @@ The application is now runnable using `java -jar target/quarkus-app/quarkus-run.
### Creating a native executable ### Creating a native executable
You can create a native executable using: You can create a native executable with no GraalVM installed:
```shell script
./mvnw package -Pnative
```
Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
```shell script ```shell script
./mvnw package -Pnative -Dquarkus.native.container-build=true ./mvnw package -Pnative -Dquarkus.native.container-build=true
``` ```
You can then execute your native executable with: `./target/buerokalender-0.1.0-SNAPSHOT-runner` ...and execute it:
```shell script
export POSTGRES_HOST=localhost
export POSTGRES_PORT=5432
export POSTGRES_USER=buerokalender
export POSTGRES_PASSWORD=buerokalender
target/buerokalender-1.1.0-runner
```
Push to docker.io: Push to docker.io:
```shell script ```shell script

View File

@@ -1,5 +1,5 @@
# Database # Database
%prod.quarkus.datasource.jdbc.url = jdbc:postgresql://db:${POSTGRES_PORT:5432}/buerokalender %prod.quarkus.datasource.jdbc.url = jdbc:postgresql://${POSTGRES_HOST:db}:${POSTGRES_PORT:5432}/buerokalender
%prod.quarkus.datasource.username = ${POSTGRES_USER:buerokalender} %prod.quarkus.datasource.username = ${POSTGRES_USER:buerokalender}
%prod.quarkus.datasource.password = ${POSTGRES_PASSWORD:buerokalender} %prod.quarkus.datasource.password = ${POSTGRES_PASSWORD:buerokalender}
%prod.quarkus.datasource.jdbc.max-size=16 %prod.quarkus.datasource.jdbc.max-size=16