I have a docker-compose.yml configuration docker-compose.yml that currently runs all applications on one server:
version: '2' services: nginx: image: nginx:latest ports: - "80:80" volumes: - ./dockerfiles/nginx:/etc/nginx/conf.d - ../static:/static - ../media:/media depends_on: - web web: build: ./dockerfiles/web/ command: bash -c 'uwsgi --ini ./settings/uwsgi_conf.ini' depends_on: - db - solr-docker - redis-docker - celery volumes: - ./web:/web - ../static:/static - ../media:/media solr-docker: image: solr:latest volumes: - ./dockerfiles/solr/default:/opt/solr/server/solr/mycores/default db: image: postgres:latest I want to bring Solr to 2nd server. After reading the articles on this issue, where it is proposed to use the Docker Machine + Swarm + Compose bundle, porridge formed in my head. Is it possible to make everything easier? On SO found an offer to use extra_hosts :
solr-docker: image: solr:latest volumes: - ./dockerfiles/solr/default:/opt/solr/server/solr/mycores/default extra_hosts: - "solrhost:111.222.333.44" But this option does not work. Maybe I'm not cooking it that way. Maybe something needs to be done on the 2nd server (on which I want to run Solr )?
Compose attractive because everything is configured in one file. If you can not implement a project on multiple servers through Compose , how to do it as simply as possible?
docker-machineallows you to installdockeron the specified machine. if you already have adockerthere, then you don't need it. - Mikhail Vaysman