fargate ?
I have tried but when multiple container starts, laravel starts giving 419 error (related to csrf).
However same project work perfect on single container.
Note:
My project is setup in docker container with auto deployment (using AWS CodeCommit) in AWS ECS Fargate container.
this probably happens because of how you handle laravel sessions, which session driver are you using in config/session.php? you should use a centralized store for sessions, shared by all containers it works like this: when a request is handled it creates a token and saves it in the session, the next request compares the token received from the client with the one on the session (if any) since you have several containers, if they do not share the session store you'll get 419 errors when the token is set in one container ald later requests are handled by a different container (making it look like it fails/works randomly) My recommendation of a possible solution is that you store your sessions using a centralized store, like redis or the database hope this helps you solve your problem
Thanks man.. Now I got this. Let me try to setup redis. I guess it should solve this issue. 👍👍
Обсуждают сегодня