how to deploy the Camunda on AWS Fargate Container along with Nginx Web server.

I am trying to deploy the Camunda on AWS fargate using Nginx Webserver.
Getting an error response code 502.

DockerFile :

FROM camunda/camunda-bpm-platform:latest AS camunda

FROM nginx:latest AS nginx

COPY --from=camunda /camunda/webapps/ROOT /usr/share/nginx/html/camunda

COPY nginx.conf /etc/nginx/nginx.conf

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]