for testing purposes i have a postgresql server running as a container on port 5432 and a fastapi container who relies on the communication with the databse. When using a public container instance everything works perfectly but when i use a container app the api won't connect to the database.
Does Azure container app can run 2 container in an App ? For example, I have a nginx container and a nodejs container in 1 Azure Container app ? Can we do that ?
Yes, it can, but I don't think it fits your needs actually. You have to publish 2 container apps: one for the nginx and another one for the other app you wanna publish. Node is apps are usually published using a nginx container... What specifically you're trying to try?
@@subzeroleaf I have the same question, I have a nginx container and django container running in the same ecs service, I'm exposing the django backend through nginx, I would like get the same using azure container app, How I can get it?
@@chaticassaldanaAzure container app already provides a proxy feature embedded named ingress. You can expose the services through it, publicly or privately
@@chaticassaldana you can use the container app ingress configuration to expose the underlying container. It works as a k8s service enabling public/private HTTP Traffic. You just set the container port and it's done.
Hi sir , but I tried this.I made frontend public and backend limited to container apps eng but i get cors error when request goes to backend although i added cors in the backend.How can i solve it?
The ingress setup intermediates the access to the container. Configure your cors policy in the ingress container app and leave the application itself unaware of it.
Did you manage to fix this issue? I'm running into the same issue and I've tried so many things already. I've tried changing the CORS settings in my program.cs, I've tried changing them in the container app itself, I've tried adding proxy settings to my nginx config,...
@@sem4461 I slightly changed architecture , i have made container apps limited to vnet and deployed API management service in the public subnet of same vnet. Now API management service is calling the private container apps. Api management url service is being used everywhere on top of private container apps
Configuring the cors policy seems to be only part of the solution. At least for me. Everything works fine when I set the Ingress traffic to ‘Accepting traffic from anywhere’. But for ‘Limited to Container Apps Environment’, it seems like Azure does not automatically integrate a virtual network, which I assume is the main problem. You can check if your environment has it by going to ‘Container Apps Environment’ > ‘Settings’ > ‘Networking (preview)’.
They have a possibility to expose the ingress as a TCP service ( you have to setup a custom vnet to use this feature) . I'm currently using it in a poc , I'm able to connect externally, but I'm still struggling to make the other containers use this PostgreSQL service internally through Terraform, but creating it manually is pretty functional, and I am able to connect on PostgreSQL from my Pc)
for testing purposes i have a postgresql server running as a container on port 5432 and a fastapi container who relies on the communication with the databse. When using a public container instance everything works perfectly but when i use a container app the api won't connect to the database.
Does Azure container app can run 2 container in an App ?
For example, I have a nginx container and a nodejs container in 1 Azure Container app ? Can we do that ?
Yes, it can, but I don't think it fits your needs actually. You have to publish 2 container apps: one for the nginx and another one for the other app you wanna publish.
Node is apps are usually published using a nginx container... What specifically you're trying to try?
@@subzeroleaf I have the same question, I have a nginx container and django container running in the same ecs service, I'm exposing the django backend through nginx, I would like get the same using azure container app, How I can get it?
@@chaticassaldanaAzure container app already provides a proxy feature embedded named ingress. You can expose the services through it, publicly or privately
@@chaticassaldana you can use the container app ingress configuration to expose the underlying container. It works as a k8s service enabling public/private HTTP Traffic. You just set the container port and it's done.
Hi sir , but I tried this.I made frontend public and backend limited to container apps eng but i get cors error when request goes to backend although i added cors in the backend.How can i solve it?
The ingress setup intermediates the access to the container. Configure your cors policy in the ingress container app and leave the application itself unaware of it.
Did you manage to fix this issue? I'm running into the same issue and I've tried so many things already. I've tried changing the CORS settings in my program.cs, I've tried changing them in the container app itself, I've tried adding proxy settings to my nginx config,...
@@sem4461 I slightly changed architecture , i have made container apps limited to vnet and deployed API management service in the public subnet of same vnet. Now API management service is calling the private container apps. Api management url service is being used everywhere on top of private container apps
Configuring the cors policy seems to be only part of the solution. At least for me. Everything works fine when I set the Ingress traffic to ‘Accepting traffic from anywhere’. But for ‘Limited to Container Apps Environment’, it seems like Azure does not automatically integrate a virtual network, which I assume is the main problem. You can check if your environment has it by going to ‘Container Apps Environment’ > ‘Settings’ > ‘Networking (preview)’.
I ran into the same problem and found no solution yet.
Is it a good idea to also deploy a postgres database to the Azure container apps ?
And what about if you have to comunícate 2 container app in the same container app internal environment
They have a possibility to expose the ingress as a TCP service ( you have to setup a custom vnet to use this feature) . I'm currently using it in a poc , I'm able to connect externally, but I'm still struggling to make the other containers use this PostgreSQL service internally through Terraform, but creating it manually is pretty functional, and I am able to connect on PostgreSQL from my Pc)
excellent
Hello sir i have a question ,how can i config load balancing for Azure Container App ,do you have a video about it thank you
The ingress configuration has the load balancing configuration. You can even set the affinity settings up for that