## 容器化构建
需提前构建好 innospots-base:latest 基础镜像,参考docs/docker/README.md
### 1.通过maven构建基础tar包
```$shell script
mvn clean install -DskipTests
```
TODO待验证--
```shell script
mvn docker:build
```
### 2.构建docker镜像
在当前目录下执行
```$shell script
docker build -t innospots-server-administration:版本号 .
```
示例:
```$shell script
[root@local innospots-server-administration]# docker build -t innospots-server-administration:1.1.0-SNAPSHOT .
Sending build context to Docker daemon 134MB
Step 1/6 : From innospots-base:latest
---> 53f3d21dfefc
Step 2/6 : ENV APPLICATION_NAME innospots-server-administration
---> Using cache
---> 7f079007bbbe
Step 3/6 : ENV SERVER_MAIN_CLASS io.innospots.administration.server.InnospotAdministrationServer
---> Using cache
---> aece1431267d
Step 4/6 : ENV INNOSPOTS_HOME /innospots/$APPLICATION_NAME
---> Using cache
---> 0e755f953c17
Step 5/6 : ADD target/$APPLICATION_NAME.tar.gz /innospots/
---> Using cache
---> 4776cecef2c3
Step 6/6 : ENTRYPOINT ["sh","/innospots/bin/app_entrypoint.sh"]
---> Using cache
---> 350fbda3df04
Successfully built 350fbda3df04
Successfully tagged innospots-server-administration:1.1.0-SNAPSHOT
[root@hadoop100 innospots-server-administration]#
```
执行完成后查看镜像,查看是否有innospots-server-administration镜像文件
```shell script
docker images
```
示例:
```shell script
[root@hadoop100 innospots-server-administration]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
innospots-server-administration 1.1.0-SNAPSHOT 350fbda3df04 2 hours ago 283MB
innospots-base latest 53f3d21dfefc 2 hours ago 143MB
alpine latest c059bfaa849c 12 months ago 5.59MB
```
### 3.启动容器
目前容器化启动支持两种数据库
- h2:已内置表结构和初始化数据,启动后,可直接登录系统,进行产品功能体验。
- mysql:需要提前准备一个mysql数据库实例,手动初始化表结构和基础数据。再参考下面命令启动容器。
#### 内置H2数据库启动
启动容器
```shell script
docker run \
--name innospots-server-administration \
-p 容器端口:宿主机端口 \
-e ENV_PROFILE=dockerH2 \
innospots-server-administration:版本号
```
示例:
```shell script
docker run \
--name innospots-server-administration \
-p 9800:9800 \
-e ENV_PROFILE=dockerH2 \
innospots-server-administration:1.1.0-SNAPSHOT
[root@hadoop100 innospots-server-administration]# docker run \
> --name innospots-server-administration \
> -p 9800:9800 \
> -e ENV_PROFILE=dockerH2 \
> innospots-server-administration:1.1.0-SNAPSHOT
================================================================================================================
Starting application io.innospots.administration.server.InnospotAdministrationServer, working directory:/innospots/innospots-server-administration
/usr/lib/jvm/default-jvm/bin/java -Xms128m -Xmx1g -Xss256k -XX:MaxMetaspaceSize=192m -XX:MetaspaceSize=192m -Djava.ext.dirs=/usr/lib/jvm/default-jvm/jre/lib/ext:/usr/lib/jvm/default-jvm/lib/ext -Xloggc:/innospots/innospots-server-administration/logs/innospots_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/innospots/innospots-server-administration/logs/java_heapdump.hprof -XX:-UseLargePages -Dspring.profiles.active=dockerH2 -cp /usr/lib/jvm/default-jvm/lib/dt.jar:/usr/lib/jvm/default-jvm/lib/tools.jar:/usr/lib/jvm/default-jvm/jre/lib/rt.jar:/innospots/innospots-server-administration/config:/innospots/innospots-server-administration/lib/* io.innospots.administration.server.InnospotAdministrationServer
___ _ _ _ _ ___ ____ ____ ___ _____ _ ___ ____ ____ _
|_ _| \ | | \ | |/ _ \/ ___|| _ \ / _ \_ _| | | |_ _| __ )| _ \ / \
| || \| | \| | | | \___ \| |_) | | | || |_____| | | || _ \| |_) | / _ \
| || |\ | |\ | |_| |___) | __/| |_| || |_____| |___ | || |_) | _ < / ___ \
|___|_| \_|_| \_|\___/|____/|_| \___/ |_| |_____|___|____/|_| \_\/_/ \_\
Spring Boot version: 2.7.2
2022-11-27T18:03:06,902 INFO [main] org.springframework.boot.StartupInfoLogger logStarting(55): Starting InnospotAdministrationServer v1.1.0-SNAPSHOT using Java 1.8.0_345 on 715dde5a055a with PID 20 (/innospots/innospots-server-administration/lib/innospots-server-administration-1.1.0-SNAPSHOT.jar started by root in /innospots)
2022-11-27T18:03:06,915 DEBUG [main] org.springframework.boot.StartupInfoLogger logStarting(56): Running with Spring Boot v2.7.2, Spring v5.3.22
2022-11-27T18:03:06,920 INFO [main] org.springframework.boot.SpringApplication logStartupProfileInfo(640): The following 2 profiles are active: "security", "dockerH2"
2022-11-27T18:03:09,603 INFO [main] org.springframework.data.repository.config.RepositoryConfigurationDelegate registerRepositoriesIn(132): Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-11-27T18:03:09,638 INFO [main] org.springframework.data.repository.config.RepositoryConfigurationDelegate registerRepositoriesIn(201): Finished Spring Data repository scanning in 15 ms. Found 0 JPA repository interfaces.
2022-11-27T18:03:11,368 INFO [main] com.zaxxer.hikari.HikariDataSource <init>(80): innospots-console-hikari - Starting...
2022-11-27T18:03:11,935 INFO [main] com.zaxxer.hikari.HikariDataSource <init>(82): innospots-console-hikari - Start completed.
2022-11-27T18:03:12,936 WARN [main] io.undertow.websockets.jsr.Bootstrap handleDeployment(68): UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2022-11-27T18:03:12,972 INFO [main] io.undertow.servlet.spec.ServletContextImpl log(382): Initializing Spring embedded WebApplicationContext
2022-11-27T18:03:12,973 INFO [main] org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext prepareWebApplicationContext(292): Root WebApplicationContext: initialization completed in 5882 ms
2022-11-27T18:03:13,347 INFO [main] org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration logDataSources(87): H2 console available at '/h2-console'. Database available at 'jdbc:h2:/innospots/innospots-server-administration/h2_db/innospots'
2022-11-27T18:03:16,188 INFO [main] org.springframework.orm.jpa.AbstractEntityManagerFactoryBean buildNativeEntityManagerFactory(437): Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-11-27T18:03:19,885 INFO [main] org.quartz.core.SchedulerSignalerImpl <init>(61): Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2022-11-27T18:03:19,885 INFO [main] org.quartz.core.QuartzScheduler <init>(229): Quartz Scheduler v.2.3.2 created.
2022-11-27T18:03:19,893 INFO [main] org.quartz.simpl.RAMJobStore initialize(155): RAMJobStore initialized.
2022-11-27T18:03:19,896 INFO [main] org.quartz.core.QuartzScheduler initialize(294): Scheduler meta-data: Quartz Scheduler (v2.3.2) 'SimpleQuartzScheduler' with instanceId 'SIMPLE_NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 8 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
```
启动&进入容器,屏蔽容器默认entrypoint命令
```shell script
docker run \
--entrypoint=/bin/sh \
-it \
--name innospots-server-administration \
-e ENV_PROFILE=dockerH2 \
-p 9800:9800 \
innospots-server-administration:1.1.0-SNAPSHOT
```
后台启动,服务器重启后,容器自动重启
```shell s
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Innospots专注于为企业提供全方位的一站式流程解决方案,专为满足企业在各种业务流程场景下的多元需求,包括:应用自动化、决策引擎、工作流引擎及任务调度等。大幅推动企业提升业务流程效率和生产力,同时降低对IT资源的依赖,迈向智能化、高效化的企业决策新时代。
资源推荐
资源详情
资源评论
收起资源包目录
Innospots专注于为企业提供全方位的一站式流程解决方案,专为满足企业在各种业务流程场景下的多元需求 (1142个子文件)
Dockerfile 319B
Dockerfile 254B
Dockerfile 249B
.gitignore 218B
io.innospots.data.provider.ISqlScriptBuilder 52B
BCrypt.java 39KB
WorkflowBuilderOperator.java 20KB
MenuManagementOperator.java 19KB
SqlBuilder.java 18KB
HttpClientBuilder.java 18KB
BaseAppNode.java 17KB
JdbcDataConnectionMinder.java 16KB
ApiDataNode.java 14KB
SqlDataNode.java 14KB
JavaExpressionEngineJavaAssit.java 14KB
VariablePlaceholder.java 14KB
WorkflowInstanceOperator.java 14KB
DataframeExecutor.java 14KB
JSONUtils.java 14KB
WorkflowService.java 14KB
ExtensionService.java 13KB
FakeDataTest.java 12KB
JavaExpressionEngineTest.java 12KB
JavaExpressionEngine.java 12KB
NodeInstanceOperator.java 12KB
ExcelUtil.java 12KB
NodeInstance.java 12KB
JdbcDataOperator.java 12KB
ExecutionUnit.java 12KB
FlowNodeSimpleDebugger.java 12KB
BeanUtils.java 11KB
UserOperator.java 11KB
JdbcFlowExecutionOperator.java 11KB
PlaceholderUtils.java 11KB
SchemaRegistryOperator.java 11KB
LibraClassPathExtPropertiesLoader.java 11KB
AppNodeDefinitionOperator.java 11KB
RoleResourceOperator.java 11KB
AppCredentialOperator.java 11KB
QuartzScheduleManager.java 11KB
Flow.java 11KB
KafkaQueueReceiver.java 11KB
FlowExecution.java 10KB
AppFlowTemplateOperator.java 10KB
I18nTransMessageService.java 10KB
LoginLogOperator.java 10KB
IExecutionContextOperator.java 10KB
UserService.java 10KB
AppNodeGroupOperator.java 10KB
TodoTaskService.java 10KB
PageOperator.java 10KB
DataConnectionMinderManager.java 10KB
WorkflowOperatorConfiguration.java 9KB
I18nTransMessageOperator.java 9KB
JavaScriptExpressionEngineTest.java 9KB
WorkspaceOperator.java 9KB
I18nLanguageOperator.java 9KB
ExtInstallmentOperator.java 9KB
KafkaDataConnectionMinder.java 9KB
JavaSourceFileStaticBuilder.java 9KB
CredentialController.java 9KB
HttpDataRegistryExecutor.java 9KB
WorkflowWebhookServer.java 9KB
AviatorFunctionLoaderTest.java 9KB
I18nCurrencyOperator.java 9KB
WorkflowRuntimeConfiguration.java 9KB
SqlDataNodeTest.java 8KB
BaseFlowEngine.java 8KB
ResourceItem.java 8KB
ScheduledNodeExecutionOperator.java 8KB
RoleOperator.java 8KB
SchemaRegistryController.java 8KB
SchemaFieldOperator.java 8KB
SysLogOperator.java 8KB
JwtAuthManager.java 8KB
AggregationComputeField.java 8KB
UserRoleOperator.java 8KB
AccessPermissionInterceptor.java 8KB
I18nLanguageController.java 8KB
PathRequestMatcher.java 8KB
JdbcNodeExecutionOperator.java 8KB
DerivedVariableNode.java 8KB
StreamFlowEngine.java 8KB
NotificationSenderManager.java 8KB
ParallelStreamFlowEngine.java 8KB
JoinNode.java 8KB
QueueRuntimeContainer.java 7KB
DatasetOperator.java 7KB
EdgeOperator.java 7KB
SqlVariableVisitor.java 7KB
ImageFileUploader.java 7KB
WorkflowBuilderController.java 7KB
WorkflowInstanceController.java 7KB
CronTimerNode.java 7KB
SqlSplitter.java 7KB
AppService.java 7KB
OperateLogAspect.java 7KB
DataNode.java 7KB
FieldValueType.java 7KB
FlowManager.java 7KB
共 1142 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 7288
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功