How to config apache (installed in server) to run a web app (django) in docker?

I have a apache server installed and running for 3 website in PHP. I also developed a mobile api in django running on 4 docker containers
(django, redis, elasticsearch, rabbitmq using fig.sh).

Because apache is running and I want to keep it and configure it to run the web app on the docker containers. if it is django app I will config mod_wsgi for that but it is not so I don’t know.

  • Docker - Handling multiple services in a single container
  • Can't build ASP.NET Core app that references PCL in docker
  • Docker image size and how much space should I expect 'dnu restore' to take up?
  • MySQL Connection in Docker container
  • Docker backups from host vs data volume containers?
  • Testing Mongo with Docker
  • Any idea about that. Thank a lot.

    Note: I am using docker 1.5 and apache 2.2 on Centos 6.6.

    Edit:
    Apache is contain 3 <VirtualHost *:80 > for 3 domain of 3 website.

    1 website1.com

    2 website2.com

    3 website3.com

    and api I want to deploy is running on domain api.website1.com is subdomain of website1.com

    fig.yml

    db:
      image: mysql
      volumes:
        - /var/lib/mysql:/var/lib/mysql
      volumes_from:
        - mysql_data
      ports:
        - "3306:3306"
      environment:
        MYSQL_ROOT_PASSWORD: 123
      # command:
    
    
    redis:
     image: redis:3
    
    elasticsearch:
     image: elasticsearch
     ports:
       - "9200:9200"
       - "9300:9300"
    
    rabbitmq:
     image: tutum/rabbitmq
     environment:
       - RABBITMQ_PASS=123456
     ports:
       - "5672:5672"  # we forward this port because it's useful for debugging
       - "15672:15672"  # here, we can access rabbitmq management plugin
    
    web:
      build: .
      command: python3 manage.py runserver 0.0.0.0:8000
      volumes:
        - .:/code
      ports:
        - "8000:8000"
    
      links:
       - db:db
       - elasticsearch:elasticsearch
       - rabbitmq:rabbit
       - redis:redis
    
    # container with redis worker
    worker:
      build: .
      command:
      volumes:
        - .:/code/mobile_api
      links:
        - db:db
        - rabbitmq:rabbit
        - redis:redis
    

  • Cannot delete files from wwwroot with Dockerfile
  • Docker daemon and DNS
  • Docker Hub - Automatic build on tag with regex match not triggered
  • How are docker image names parsed?
  • Console prints not appearing when using Docker in Ruby on Rails
  • how to find MAX memory from docker stats?
  • One Solution collect form web for “How to config apache (installed in server) to run a web app (django) in docker?”

    For more information about the general issues around proxying Apache to backend Python web sites which use mod_wsgi, see:

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