Coder Social home page Coder Social logo

auto-set-java_opts's Introduction

auto set JAVA_OPTS in docker and kubernetes

use

docker build . -f jar.ubuntu.Dockerfile -t jvm:ubuntu
docker run -it -p 8080:8080 jvm:ubuntu
docker run --cpus=2 --memory=4096m -it -p 8080:8080 -p 5005:5005 jvm:ubuntu

docker build . -f jar.alpine.Dockerfile -t jvm:alpine
docker run -it -p 8080:8080 jvm:alpine

docker build . -f war.Dockerfile -t jvm:tomcat
docker run -it -p 8080:8080 jvm:tomcat

访问

http://localhost:8080/jvm

document

in Dockerfile add

ENV SPRING_BOOT="true" \
	    DEBUG_PRINT="ture" \
	    APP_NAME="app.jar" 

应用名

APP_NAME=${APP_NAME:-"app.jar"}

是否开启 Dump

OOM_DUMP=${OOM_DUMP:-"true"}

是否开记打印

DEBUG_PRINT=${DEBUG_PRINT:-"false"}

是 Srping Boot jar 应用还是 tomcat war 应用

SPRING_BOOT=${SPRING_BOOT:-"true"}

不限制内存时默认内存

DEFAULT_MEMORY=${DEFAULT_MEMORY:-2048}

不限制 CPU 时默认 CPU

DEFAULT_CPU=${DEFAULT_CPU:-1}

默认输出目录

UNIFIED_OUTPUT_PATH=${UNIFIED_OUTPUT_PATH:-"/data"}

远程调试

REMOTE_DEBUG=${REMOTE_DEBUG:-"true"}

远程调试端口

REMOTE_DEBUG_PORT=${REMOTE_DEBUG_PORT:-5005}

默认时区

DEFAULT_TIMEZONE=${DEFAULT_CPU:-"GMT+08"}

auto-set-java_opts's People

Contributors

xalexec avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.