Answer the question
In order to leave comments, you need to log in
How can I deploy a project on 2 servers (some applications on the 1st server, some on the 2nd) using Docker Compose?
I have something like this docker-compose.yml config, which currently runs all applications on the same 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
solr-docker:
image: solr:latest
volumes:
- ./dockerfiles/solr/default:/opt/solr/server/solr/mycores/default
extra_hosts:
- "solrhost:111.222.333.44"
Answer the question
In order to leave comments, you need to log in
I want to take out Solr on the 2nd server. After reading articles on this issue, where it is proposed to use the Docker Machine + Swarm + Compose bundle, a mess has formed in my head. Is there any way to make everything easier?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question