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.

  • How to unbind volume from docker image?
  • Docker limit memory usage is not working
  • Docker containers in different directories under one daemon
  • Rails 5, Kubernetes and Google Container Engine
  • Multiple similar containers across VMs
  • Docker - pull from docker repo fails (EOF / 403) but download from RH repo works
  • 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
    

  • Why can't docker commit a Jenkins container with customized configuration?
  • Unable to install features in servicemix docker image: ERROR http://repo1.maven.org/maven2/com.example/example/0.1/xml/example.xml
  • Start Solr cloud on Docker Swarm (1.12) without Zookeeper
  • Why am I getting NATed when talking to other Docker containers within the same bridge network
  • Cannot connect to remote docker host via SSH forwarded domain socket
  • What does |1 mean in Docker history
  • 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.