【问题】docker容器修改环境变量的方式
问题
启动n8n之后,docker容器提示:
There is a deprecation related to your environment variables. Please take the recommended actions to update your configuration:
2025-04-28 09:20:08 - N8N_RUNNERS_ENABLED -> Running n8n without task runners is deprecated. Task runners will be turned on by default in a future version. Please set `N8N_RUNNERS_ENABLED=true` to enable task runners now and avoid potential issues in the future. Learn more: https://docs.n8n.io/hosting/configuration/task-runners/
界面如下:
就是需要给容器设置环境变量:N8N_RUNNERS_ENABLED=true
解决
查了一下,修改docker容器环境变量,有两种方式:
1、通过 docker-compose.yml
文件配置,不过n8n运行是单独容器,没有组件配置文件,这个用不了
2、通过 docker run
命令的参数直接设置,因为之前有了n8n的容器,不想删除,所以就创建一个修改了环境变量的新容器,原来那个容器停掉,等新容器彻底健康了,再删除老的。新容器的命令为:
docker run -it --name n8nNew -e N8N_RUNNERS_ENABLED=true -p 5678:5678 -v n8n_data:/home/node/.n8n n8nio/n8n
就是,比之前的n8n容器启动命令,多了环境变量设置参数: -e N8N_RUNNERS_ENABLED=true
结尾
修修补补,修修补补,在修修补补过程中,积蓄实力。。。。。。