Run one app on multiple elastic beanstalk instances

I have one Flask app which handles a number of things which are common to a number of elastic beanstalk applications: logging, database/ORM, error handling, are all handled by Flask, and similar across elastic beanstalk instances.

I have four eb applications, which each do different jobs, demand different docker images, and so on.

  • Docker expose all ports or range of ports from 7000 to 8000
  • Import data.sql MySQL Docker Container
  • Can't start docker
  • docker error when called from network
  • Docker swarm mode load balancing
  • Shiny server inside Docker container reverse proxied with nginx will not follow 301 redirects
  • One approach would be have each eb app target its own unique endpoint on the Flask App and follow its own unique code path, while sharing common resources, such as the ORM and error handling.

    Is this possible? The big limitation seems to be one Dockerfile per project, which has a fixed name, and sets the image. I would rather be able to specify the Dockerfile-path at deploy-time.

    Is this even a reasonable approach to take?

  • how jenkins in a docker access git-repo of gitlab in another docker
  • Celery doesn't work on docker
  • gevent not valid running Docker Registry
  • Inspect non-daemon Docker container, after it has completed running
  • Daemonized buildbot start
  • Nodemon Doesn't Restart in Windows Docker Environment
  • One Solution collect form web for “Run one app on multiple elastic beanstalk instances”

    You’ve got three options:

    Run multiple services in one container: Treat containers like VMs; run both your Flask app and your other services in one container. You could then have the Flask app built as a base container and build your other 4 applications off that base.

    Run an internal service on another instance: Put the Flask app on a 5th EB machine, one that’s internal-facing, and direct the other 4 to talk to it.

    Don’t use Elastic Beanstalk: Provision your own instance and run it the way you like.

    Of these, I’d strongly consider the last. Once you find yourself trying to work around the limitations of EB, you’ve probably outgrown it.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.