chore: update

This commit is contained in:
TakahashiNg
2026-03-22 04:29:15 +00:00
parent 1816687ec7
commit 54cce55baf
6 changed files with 101 additions and 86 deletions
+17
View File
@@ -0,0 +1,17 @@
FROM alpine:3.22
RUN apk update && apk add --no-cache \
curl \
bash \
openjdk21-jdk \
maven \
git \
ca-certificates \
pnpm
# git trust all directories
RUN git config --global --add safe.directory '*'
# Install quarkus
RUN curl -Ls https://sh.jbang.dev | bash -s - trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/ \
&& curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force quarkus@quarkusio
+10 -23
View File
@@ -1,33 +1,20 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the // For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine // README at: https://github.com/devcontainers/templates/tree/main/src/alpine
{ {
"name": "Alpine", "dockerComposeFile": "docker-compose.main.yml",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile "mounts": [
"image": "mcr.microsoft.com/devcontainers/base:alpine-3.22", "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
"features": { ],
"ghcr.io/muhmdraouf/devcontainers-features/alpine-apk:0": { "remoteUser": "root",
"packages": "pnpm", "service": "devcontainer",
"upgradePackages": true "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
}
},
"customizations": { "customizations": {
"vscode": { "vscode": {
"extensions": [ "extensions": [
"Oracle.oracle-java", "redhat.vscode-quarkus",
"redhat.vscode-quarkus" "vscjava.vscode-java-pack",
"redhat.vscode-xml"
] ]
} }
} }
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
} }
+29
View File
@@ -0,0 +1,29 @@
services:
kafka:
image: apache/kafka:latest
restart: unless-stopped
network_mode: host
extra_hosts:
- 'host.docker.internal:host-gateway'
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9093
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
kafdrop:
image: obsidiandynamics/kafdrop:latest
restart: unless-stopped
depends_on:
- kafka
network_mode: host
extra_hosts:
- 'host.docker.internal:host-gateway'
command: sh -c "sleep 5 && exec ./start-app"
environment:
KAFKA_BROKERCONNECT: 'localhost:9092'
+14
View File
@@ -0,0 +1,14 @@
include:
- ./docker-compose.kafka.yaml
services:
devcontainer:
build:
context: .
dockerfile: Dockerfile
volumes:
- ../..:/workspaces:cached
network_mode: host
extra_hosts:
- 'host.docker.internal:host-gateway'
command: sleep infinity
-62
View File
@@ -1,62 +0,0 @@
# Drinkool
This project uses Quarkus, the Supersonic Subatomic Java Framework.
If you want to learn more about Quarkus, please visit its website: <https://quarkus.io/>.
## Running the application in dev mode
You can run your application in dev mode that enables live coding using:
```shell script
./mvnw 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 running the application
The application can be packaged using:
```shell script
./mvnw package
```
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.
The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.
If you want to build an _über-jar_, execute the following command:
```shell script
./mvnw package -Dquarkus.package.jar.type=uber-jar
```
The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`.
## Creating a native executable
You can create a native executable using:
```shell script
./mvnw package -Dnative
```
Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
```shell script
./mvnw package -Dnative -Dquarkus.native.container-build=true
```
You can then execute your native executable with: `./target/user-service-1.0.0-SNAPSHOT-runner`
If you want to learn more about building native executables, please consult <https://quarkus.io/guides/maven-tooling>.
## Provided Code
### REST
Easily start your REST Web Services
[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources)
+30
View File
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.32.3</quarkus.platform.version>
</properties>
<modules>
<module>lib</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>