Readme, docker.io-config, docker-compose.yml

This commit is contained in:
mbremer
2021-07-05 17:19:17 +02:00
parent 166871165f
commit 4d6642c144
6 changed files with 62 additions and 28 deletions

View File

@@ -1,8 +1,6 @@
# buerokalender Project # buerokalender
This project uses Quarkus, the Supersonic Subatomic Java Framework. Eine kleine Webapp um die Belegung eines Büroarbeitsplatzes ohne Kollision zu buchen.
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
## Running the application in dev mode ## Running the application in dev mode
@@ -11,16 +9,13 @@ You can run your application in dev mode that enables live coding using:
./mvnw compile quarkus:dev ./mvnw compile quarkus:dev
``` ```
> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/. ## Packaging and deployment
## Packaging and running the application
The application can be packaged using: The application can be packaged using:
```shell script ```shell script
./mvnw package ./mvnw package
``` ```
It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory. It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory.
Be aware that its not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory.
If you want to build an _über-jar_, execute the following command: If you want to build an _über-jar_, execute the following command:
```shell script ```shell script
@@ -29,7 +24,7 @@ If you want to build an _über-jar_, execute the following command:
The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`. The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.
## Creating a native executable ### Creating a native executable
You can create a native executable using: You can create a native executable using:
```shell script ```shell script
@@ -43,16 +38,7 @@ Or, if you don't have GraalVM installed, you can run the native executable build
You can then execute your native executable with: `./target/buerokalender-0.1.0-SNAPSHOT-runner` You can then execute your native executable with: `./target/buerokalender-0.1.0-SNAPSHOT-runner`
If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.html. Push to docker.io:
```shell script
## Related Guides ./mvnw clean package -DskipTests -Dquarkus.container-image.push=true
```
- RESTEasy JAX-RS ([guide](https://quarkus.io/guides/rest-json)): REST endpoint framework implementing JAX-RS and more
## Provided Code
### RESTEasy JAX-RS
Easily start your RESTful Web Services
[Related guide section...](https://quarkus.io/guides/getting-started#the-jax-rs-resources)

39
docker-compose.yml Normal file
View File

@@ -0,0 +1,39 @@
version: "2.3"
services:
app:
image: mattbremer/buerokalender:1
environment:
- POSTGRES_USER=buerokalender
- POSTGRES_PASSWORD=buerokalender
- POSTGRES_PORT=5432
restart: always
networks:
- buerokalender
ports:
- "3004:8080"
depends_on:
db:
condition: service_healthy
db:
image: "postgres:13"
mem_limit: 128m
environment:
- POSTGRES_USER=buerokalender
- POSTGRES_PASSWORD=buerokalender
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U buerokalender" ]
interval: 5s
timeout: 5s
retries: 6
# ports:
# - "5432:5432"
networks:
- buerokalender
volumes:
- ./postgres:/var/lib/postgresql/data
networks:
buerokalender:
external: false

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>de.mbremer</groupId> <groupId>de.mbremer</groupId>
<artifactId>buerokalender</artifactId> <artifactId>buerokalender</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>1.0.0</version>
<properties> <properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version> <compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters> <maven.compiler.parameters>true</maven.compiler.parameters>
@@ -69,6 +69,10 @@
<groupId>io.quarkus</groupId> <groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator</artifactId> <artifactId>quarkus-hibernate-validator</artifactId>
</dependency> </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-docker</artifactId>
</dependency>
<dependency> <dependency>
<groupId>io.quarkus</groupId> <groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId> <artifactId>quarkus-junit5</artifactId>

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="de">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="de">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">

View File

@@ -1,7 +1,7 @@
# Database # Database
%prod.quarkus.datasource.jdbc.url = jdbc:postgresql://db:5432/buerokalender %prod.quarkus.datasource.jdbc.url = jdbc:postgresql://db:${POSTGRES_PORT:5432}/buerokalender
%prod.quarkus.datasource.username = buerokalender %prod.quarkus.datasource.username = ${POSTGRES_USER:buerokalender}
%prod.quarkus.datasource.password = buerokalender %prod.quarkus.datasource.password = ${POSTGRES_PASSWORD:buerokalender}
%prod.quarkus.datasource.jdbc.max-size=16 %prod.quarkus.datasource.jdbc.max-size=16
quarkus.datasource.db-kind=postgresql quarkus.datasource.db-kind=postgresql
@@ -14,3 +14,8 @@ quarkus.http.auth.form.enabled=true
#quarkus.http.auth.session.encryption-key=zHId14V+uiyxmbzhEPCyi7VvbaI80UeEO5yu0H/hVLs= #quarkus.http.auth.session.encryption-key=zHId14V+uiyxmbzhEPCyi7VvbaI80UeEO5yu0H/hVLs=
# 24h # 24h
quarkus.http.auth.form.timeout=86400 quarkus.http.auth.form.timeout=86400
# Deployment
quarkus.container-image.additional-tags= 1
quarkus.container-image.group = mattbremer
quarkus.container-image.name = buerokalender