Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eureka-server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangguangchao
eureka-server
Commits
73469306
Commit
73469306
authored
Nov 13, 2023
by
wangguangchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改打包方式
parent
7c11cf0a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
54 deletions
+3
-54
Dockerfile
Dockerfile
+3
-4
Dockerfile.bak
Dockerfile.bak
+0
-9
application.properties.bak
src/main/resources/application.properties.bak
+0
-12
startup.bat
src/main/scripts/startup.bat
+0
-27
startup.sh
src/main/scripts/startup.sh
+0
-2
No files found.
Dockerfile
View file @
73469306
...
...
@@ -4,17 +4,16 @@ FROM adoptopenjdk/openjdk8:x86_64-alpine-jdk8u382-b05
MAINTAINER
R&D(WH)@brilliance.com.cn
USER
root
ENV
APP_NAME="eureka-server" \
WORKDIR=/workspace
ENV
WORKDIR=/workspace
RUN
sed
-i
's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g'
/etc/apk/repositories
\
&&
apk update
\
&&
apk add unzip
ADD
./target/
eureka-server-1.0-SNAPSHOT.zip .
ADD
./target/
*.zip ./app.zip
RUN
echo
"starting RUN command"
&&
\
unzip
-qo
eureka-server-1.0-SNAPSHOT
.zip
-d
$WORKDIR
&&
\
unzip
-qo
app
.zip
-d
$WORKDIR
&&
\
chmod
-R
772
$WORKDIR
&&
\
chmod 772
$WORKDIR
/config
&&
\
chmod 772
$WORKDIR
/bin
...
...
Dockerfile.bak
deleted
100644 → 0
View file @
7c11cf0a
# 基于哪个镜像
From java:8
# 复制文件到容器
ADD ./target/eureka-server-1.0-SNAPSHOT.jar /app.jar
# 声明需要暴露的端口
EXPOSE 8769
# 配置容器启动后执行的命令
ENTRYPOINT java ${JAVA_OPTS} -jar /app.jar
\ No newline at end of file
src/main/resources/application.properties.bak
deleted
100644 → 0
View file @
7c11cf0a
# 给当前服务取一个名字
spring.application.name=eureka
# 设置端口号
server.port=8769
logging.config=classpath:logback.xml
# Eureka Server 也是一个普通的微服务,所以当它还是一个注册中心的时候,他会有两层身份:1.注册中心;2.普通服务。
# 默认情况下,会把自己注册到自己上面来,设置为 false 时,表示当前项目不要注册到注册中心上
eureka.client.register-with-eureka=false
# 表示是否从 Eureka Server 上获取注册信息
eureka.client.fetch-registry=false
src/main/scripts/startup.bat
deleted
100644 → 0
View file @
7c11cf0a
@echo off
@setlocal
REM set JUP SERVICE HOME
set "APP_WRK_HOME=%~dp0"
set "APP_WRK_HOME=%APP_WRK_HOME:~0,-4%"
set "APP_NAME=EUREKA-SERVER"
REM find boot jar file path
for %%i in (%APP_WRK_HOME%/*.jar) do set BOOT_JAR=%%i
set "JAVACMD=%JAVA_HOME%/bin/java.exe"
REM set "JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx512m"
set "JAVA_OPTS=%JAVA_OPTS% -Dlogging.path=%APP_WRK_HOME%"
set "JAVA_OPTS=%JAVA_OPTS% -Dlogging.file=%APP_WRK_HOME%/logs/application.log"
rem the file skywalking-agent.jar is used at the link to track.
rem When deploying, please follow the actural situation to modify the path or version and modify the agent.config configuration file in agent/config.
rem Please refer to the configuration document to modify the contents of the configuration item collector.backend_service in agent.config
rem set "JAVA_OPTS=%JAVA_OPTS% -javaagent:d:/jup/services/JavaUnifiedPlatform_APM_Center_0.4-RELEASE/agent/skywalking-agent.jar"
rem set "JAVA_OPTS=%JAVA_OPTS% -DSW_AGENT_NAME=HK-BUSINESS"
set "JAVA_OPTS=%JAVA_OPTS% -server -Djava.net.preferIPv4Stack=true -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=GBK -Dfile.encoding=GBK"
set "JAVA_OPTS=%JAVA_OPTS% -XX:+HeapDumpOnOutOfMemoryError"
REM execute
start "%APP_NAME%" "%JAVACMD%" %JAVA_OPTS% -jar %BOOT_JAR%
\ No newline at end of file
src/main/scripts/startup.sh
View file @
73469306
...
...
@@ -7,7 +7,6 @@ echoYellow() { echo $'\e[0;33m'"$1"$'\e[0m'; }
#启动脚本的主目录
PRG
=
"
$0
"
ENV
=
"
$1
"
APP_WRK_HOME
=
`
dirname
"
$PRG
"
`
/..
APP_WRK_HOME
=
`
cd
"
$APP_WRK_HOME
"
&&
pwd
`
...
...
@@ -32,7 +31,6 @@ dostart() {
echoYellow
"warn:
$APP_NAME
already started! (pid=
$psid
)"
else
export
JAVA_OPTS
=
"
$JAVA_OPTS
-Dlogging.path=
$APP_WRK_HOME
"
export
JAVA_OPTS
=
"
$JAVA_OPTS
-Dspring.profiles.active=
$ENV
"
export
JAVA_OPTS
=
"
$JAVA_OPTS
-server -Djava.net.preferIPv4Stack=true -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom"
export
JAVA_OPTS
=
"
$JAVA_OPTS
-XX:+HeapDumpOnOutOfMemoryError"
export
JAVA_OPTS
=
"
$JAVA_OPTS
-Xms512m -Xmx2048m"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment