#!/bin/bash
docker stop hangfire
docker rm hangfire

docker run -idt \
--restart=always \
-v /home/hangfire:/publish/hangfire \
-e HangfireMysqlConnectionString='Server=192.168.0.45;Port=3306;Database=hangfire;Uid=root;Pwd=123456;charset=utf8;SslMode=none;Allow User Variables=True' \
-e HangfireQueues='default,apis,recurring' \
-e DefaultRecurringQueueName='recurring' \
-e HangfireUserName='hangfire' \
-e HangfirePwd='hangfire123456' \
-e Lang='zh' \
-p 5000:5000 \
--name hangfire \
nainaigu/mysqlhangfire:20210914002627

sleep 5s
docker logs hangfire