From 54cce55baf98cc0d3722ad4773aa42341f9088e1 Mon Sep 17 00:00:00 2001
From: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com>
Date: Sun, 22 Mar 2026 04:29:15 +0000
Subject: [PATCH] chore: update
---
.devcontainer/Dockerfile | 17 +++++++
.devcontainer/devcontainer.json | 35 +++++---------
.devcontainer/docker-compose.kafka.yaml | 29 ++++++++++++
.devcontainer/docker-compose.main.yaml | 14 ++++++
README.md | 62 -------------------------
pom.xml | 30 ++++++++++++
6 files changed, 101 insertions(+), 86 deletions(-)
create mode 100644 .devcontainer/Dockerfile
create mode 100644 .devcontainer/docker-compose.kafka.yaml
create mode 100644 .devcontainer/docker-compose.main.yaml
delete mode 100644 README.md
create mode 100644 pom.xml
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
new file mode 100644
index 0000000..696e093
--- /dev/null
+++ b/.devcontainer/Dockerfile
@@ -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
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index ef2d3bb..0ebfd7f 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,33 +1,20 @@
// 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
{
- "name": "Alpine",
- // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
- "image": "mcr.microsoft.com/devcontainers/base:alpine-3.22",
- "features": {
- "ghcr.io/muhmdraouf/devcontainers-features/alpine-apk:0": {
- "packages": "pnpm",
- "upgradePackages": true
- }
- },
+ "dockerComposeFile": "docker-compose.main.yml",
+ "mounts": [
+ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
+ ],
+ "remoteUser": "root",
+ "service": "devcontainer",
+ "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"customizations": {
"vscode": {
"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"
-}
+}
\ No newline at end of file
diff --git a/.devcontainer/docker-compose.kafka.yaml b/.devcontainer/docker-compose.kafka.yaml
new file mode 100644
index 0000000..a0a0b07
--- /dev/null
+++ b/.devcontainer/docker-compose.kafka.yaml
@@ -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'
\ No newline at end of file
diff --git a/.devcontainer/docker-compose.main.yaml b/.devcontainer/docker-compose.main.yaml
new file mode 100644
index 0000000..ec02d0e
--- /dev/null
+++ b/.devcontainer/docker-compose.main.yaml
@@ -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
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 5ebcc11..0000000
--- a/README.md
+++ /dev/null
@@ -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: .
-
-## 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 .
-
-## 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 it’s 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 .
-
-## Provided Code
-
-### REST
-
-Easily start your REST Web Services
-
-[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources)
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..6b230d3
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,30 @@
+
+
+ 4.0.0
+ com.drinkool
+ drinkool
+ 1.0.0-SNAPSHOT
+ pom
+
+ 17
+ quarkus-bom
+ io.quarkus.platform
+ 3.32.3
+
+
+ lib
+
+
+
+
+ ${quarkus.platform.group-id}
+ ${quarkus.platform.artifact-id}
+ ${quarkus.platform.version}
+ pom
+ import
+
+
+
+
\ No newline at end of file