add an nginx proxy to docker service -- 2

Job ID: 35369406

Budget: $10 – $30 USD

The attached ec2.yaml is a simple CFT which launches an EC2 instance that builds and starts a Docker container listening publicly on port 5984.

I need this modified so that the port 5984 is locked down to localhost and the only public port is an nginx on port 80 reverse-proxying to the 5984. The nginx must require basic http auth with credentials from a config file. The desired setup is similar to this documentation: https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/ plus any Docker related complications.

Estimated development time for this task is one hour, with a deadline of 24 hours. I don't mind if you spend a full day to study and learn but the pay is still based on max one hour of work.
Related categories: System Admin Linux Nginx Amazon Web Services Docker