Home > Blockchain >  How to run symfony on aws ecs with loadbalancer
How to run symfony on aws ecs with loadbalancer

Time:09-11

im new to aws services and some things are not really clear. On my local machine i have to services in my docker-compose.yaml (php - symfony6 ,database - mysql), all dependencies are loaded and installed through Dockerfile. To start the application i have a entrypoint.sh with command symfony server:start.

OK, thats fine for local.

Now, i have exactly this configuration to run up to 16 containers in aws ecs behind a loadbalancer, but im sure that isnt the correct way to run this because i cant configure, increase php settings and so i believe its the worst way when i look at the performance.

Do i need a separately nginx for every container? Is there any option in the loadbalancer settings to run a webserver from there?

Any idea is welcome.

(i think my config files are not interesting for now. If it is, tell me, then i can update and share)

CodePudding user response:

Do i need a separately nginx for every container?

Yes, that is the standard way to run this sort of thing, using two containers (nginx and php). Also, your MySQL server should not be deployed in the same ECS task. Ideally you would be running MySQL in RDS instead of ECS.

Is there any option in the loadbalancer settings to run a webserver from there?

No, a load balancer is just a load balancer. A load balancer is not a web server.

  • Related