# /etc/supervisord.d/DotNetCoreTest.ini [program:DotNetCoreTest] directory=https://www.jb51.net/xxx/DotNetCoreTest command=dotnet DotNetCoreTest.dll autostart=true autorestart=true user=root numprocs=1 redirect_stderr=true stdout_logfile=https://www.jb51.net/xxx/logs/DotNetCoreTest.log # 环境变量 environment=ASPNETCORE_ENVIRONMENT=Dev240
方式一在发布时只需要编译Release就能自动读取对应环境的配置文件,无需上面的操作。