example:
-
index
-
quirkus (folder: integration-tests)
-
quarkus-quickstarts
log:
- how to use
- LOG.level("string"); (ex: LOG.debug("小寫"))
-
$ ./mvnw compile quarkus:dev -Dquarkus.log.file.enable=true -Dquarkus.log.file.rotation.max-file-size=10M -Dquarkus.log.file.rotation.max-backup-index=20
- it will save in "target" folder
DataBase:
-
quarkus.hibernate-orm.database.generation=drop-and-create | update | none
編譯成Native Image執行檔:
-
$ ./mvnw package -Pnative -Dquarkus.native.container-runtime=docker (可以在「target」目錄下看到XXX-runner的執行檔)
GraalVM Native Image:
-
承上 $ docker build -f src/main/docker/Dockerfile.native -t REPOSITORY_name . $ docker run -d -p 8080:8080 REPOSITORY_name (可用「docker stats」查看其使用之記憶體空間)
Dockerfile and run.sh:
-
FROM registry.access.redhat.com/ubi8/ubi-minimal WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work EXPOSE 8080 CMD ["./application", "-Dquarkus.http.host=0.0.0.0", \ "-Dquarkus.log.file.enable=true", \ "-Dquarkus.log.file.rotation.max-file-size=10M", \ "-Dquarkus.log.file.rotation.max-backup-index=20"]
-
#!/bin/bash docker run -it \ --privileged \ -v $HOME/hello/:/work \ (如果word是執行檔,要將word執行檔放在host端) -p 8080:8080 \ hello:word
沒有留言:
張貼留言