Trying to deploy a Docker image in AWS Elastic Beanstalk running on a single instance for now. It all works fine, apart from WebSockets which I am using through Socket.IO.
Another post suggests to remove nginx, but that is either not possible anymore or just not an option for deployments with Docker.
I have a python script that changes the nginx configuration to allow WebSocket connections. When I ssh into the instance and run that script, it works. However, that part of the nginx configuration does not exist yet when ebextensions are run, so I cannot run this script automatically.
If you want to try it yourself, I am trying to deploy databench_examples. It is working when you deploy this with eb init
and eb start
and then ssh into the instance and go to /var/app/current
and run sudo python nginx_socketio_conf.py
which changes the nginx configuration file. If it is not working, you see a 500 error in the browser console for the Socket.IO handshake when running the simplepi
analysis.