通过Docker Compose部署
配置文件:
`version: "3"
services:
halo:
image: halohub/halo:2.0.1
container_name: halo
restart: on-failure:3
volumes:
- ./:/root/.halo2
ports:
- "8090:8090"
environment:
- SPRING_R2DBC_URL=r2dbc:pool:mysql://rm-2ze10ccj0tc452q07.mysql.rds.aliyuncs.com:3306/halo
- SPRING_R2DBC_USERNAME=root
MySQL 的密码,请保证与下方 MYSQL_ROOT_PASSWORD 的变量值一致。
- SPRING_R2DBC_PASSWORD=
- SPRING_SQL_INIT_PLATFORM=mysql
外部访问地址,请根据实际需要修改
- HALO_EXTERNAL_URL=http://blog.liquanlong.cn/
初始化的超级管理员用户名
- HALO_SECURITY_INITIALIZER_SUPERADMINUSERNAME=admin
初始化的超级管理员密码
- HALO_SECURITY_INITIALIZER_SUPERADMINPASSWORD= 上传比较大的插件和主题时报错:
halo | 2022-12-13T02:00:09.858+08:00 ERROR 7 --- [or-http-epoll-2] o.s.w.s.adapter.HttpWebHandlerAdapter : [28fac4c2-41] 500 Server Error for HTTP POST "/apis/api.console.halo.run/v1alpha1/plugins/install"
halo |
halo | reactor.netty.channel.AbortedException: Connection has been closed
halo | at reactor.netty.http.server.HttpServerOperations.onInboundClose(HttpServerOperations.java:615) ~[reactor-netty-http-1.1.0.jar:1.1.0]
halo | Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
halo | Error has been observed at the following site(s):
halo | *checkpoint ⇢ org.springframework.web.filter.reactive.ServerHttpObservationFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ LogoutPageGeneratingWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ LoginPageGeneratingWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ AnonymousAuthenticationWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ CsrfWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ CorsWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
halo | *checkpoint ⇢ HTTP POST "/apis/api.console.halo.run/v1alpha1/plugins/install" [ExceptionHandlingWebHandler]
halo | Original Stack Trace:
halo | at reactor.netty.http.server.HttpServerOperations.onInboundClose(HttpServerOperations.java:615) ~[reactor-netty-http-1.1.0.jar:1.1.0]
halo | at reactor.netty.channel.ChannelOperationsHandler.channelInactive(ChannelOperationsHandler.java:73) ~[reactor-netty-core-1.1.0.jar:1.1.0]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:305) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:274) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelInactive(CombinedChannelDuplexHandler.java:418) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:411) ~[netty-codec-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:376) ~[netty-codec-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.CombinedChannelDuplexHandler.channelInactive(CombinedChannelDuplexHandler.java:221) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:303) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:274) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:301) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:813) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403) ~[netty-transport-classes-epoll-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
halo |
halo | 2022-12-13T02:00:09.860+08:00 ERROR 7 --- [or-http-epoll-2] reactor.core.publisher.Operators : Operator called default onErrorDropped
halo |
halo | reactor.netty.channel.AbortedException: Connection has been closed
halo | at reactor.netty.http.server.HttpServerOperations.onInboundClose(HttpServerOperations.java:615) ~[reactor-netty-http-1.1.0.jar:1.1.0]
halo | Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
halo | Error has been observed at the following site(s):
halo | *checkpoint ⇢ org.springframework.web.filter.reactive.ServerHttpObservationFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ LogoutPageGeneratingWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ LoginPageGeneratingWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ AnonymousAuthenticationWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ CsrfWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ CorsWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
halo | *checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
halo | *checkpoint ⇢ HTTP POST "/apis/api.console.halo.run/v1alpha1/plugins/install" [ExceptionHandlingWebHandler]
halo | Original Stack Trace:
halo | at reactor.netty.http.server.HttpServerOperations.onInboundClose(HttpServerOperations.java:615) ~[reactor-netty-http-1.1.0.jar:1.1.0]
halo | at reactor.netty.channel.ChannelOperationsHandler.channelInactive(ChannelOperationsHandler.java:73) ~[reactor-netty-core-1.1.0.jar:1.1.0]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:305) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:274) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelInactive(CombinedChannelDuplexHandler.java:418) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:411) ~[netty-codec-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:376) ~[netty-codec-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.CombinedChannelDuplexHandler.channelInactive(CombinedChannelDuplexHandler.java:221) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:303) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:274) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:301) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:813) ~[netty-transport-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403) ~[netty-transport-classes-epoll-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.85.Final.jar:4.1.85.Final]
halo | at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
halo |
`
上传小文件没问题,Nginx配置也没问题,
请求大佬帮助,docker配置文件是否有问题?