HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.37k stars 1.7k forks source link

HangFire Stuck in startup #1818

Closed gzh4455 closed 3 years ago

gzh4455 commented 3 years ago

The Log Message: INFO Hangfire.SqlServer.SqlServerObjectsInstaller Start installing Hangfire SQL objects...

It is still stucking and can't start the web application .

The Environment is Docker + Net 5.0

the docker file looks below .

FROM 指定功能所需的基础镜像,必须是第一条指令,我们这里指定aspnetcore

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base

FROM mcr.microsoft.com/dotnet/aspnet:5.0

FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim

COPY 程序所在本地目录 容器目录

COPY . /var/www/Centralism.Web

database connection allow from tls 1.2 to tls 1.0

RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf

time zone

ENV TZ=Asia/Shanghai RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

定义你工作目录的名字

WORKDIR /var/www/Centralism.Web

指定项webapi或mvc站点的内部启动端口,默认是80

ENV ASPNETCORE_URLS http://+:50001

暴露docker容器端口

EXPOSE 50001 EXPOSE 443

运行dotnet命令,参数是你的程序集的入口dll--就是你的Web程序dll

ENTRYPOINT ["dotnet", "Centralism.Web.dll"]

odinserj commented 3 years ago

Duplicates #1819