Closed uwDavid closed 1 month ago
If you write out the value of builder.Configuration.GetConnectionString("Redis")
, what does that evaluate to in the failing deployment?
If you write out the value of
builder.Configuration.GetConnectionString("Redis")
, what does that evaluate to in the failing deployment?
Thanks for looking.
It's taking the value "cache:6379" as expected.
I have also tried using "host.docker.internal:6379"
I don't think we respect the empty option resulting in an invalid parse there - please try to adjust your YAML without the semicolon:
environment:
- ConnectionStrings__Redis=cache:6379
I don't think we respect the empty option resulting in an invalid parse there - please try to adjust your YAML without the semicolon:
environment: - ConnectionStrings__Redis=cache:6379
Thank you! Let me try it and report back.
I don't think we respect the empty option resulting in an invalid parse there - please try to adjust your YAML without the semicolon:
environment: - ConnectionStrings__Redis=cache:6379
Happy to report back that this is working!
Going to investigate your comment on the parsing to learn a little more.
Thank you both!
My .NET 8 application works when running locally. However, when I containerize my application using dotnet publish, I would get this error:
No endpoints specified (Parameter 'config')
Pretty sure the connection string for Docker container is set up correctly using Environment Override.
Appreciate any help.
My Program.cs
appsettings.json
docker-compose.yml