Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
310 lines (287 sloc) 10.6 KB
version: '2'
services:
biomaj-mongo:
image: mongo
volumes:
- ${BIOMAJ_DIR}/mongo:/data/db
biomaj-redis:
image: redis
volumes:
- ${BIOMAJ_DIR}/redis:/data
biomaj-elasticsearch:
image: "elasticsearch:2"
command: "elasticsearch -Des.cluster.name='biomaj'"
biomaj-rabbitmq:
image: rabbitmq
hostname: biomaj-rabbitmq
command: rabbitmq-server
entrypoint: ""
volumes:
- ${BIOMAJ_DIR}/rabbitmq:/var/lib/rabbitmq
- ${BIOMAJ_DIR}/biomaj-config/rabbitmq.config:/etc/rabbitmq/rabbitmq.config:ro
environment:
- RABBITMQ_DEFAULT_USER=biomaj
- RABBITMQ_DEFAULT_PASS=biomaj
biomaj-consul:
image: consul
hostname: consulnode1
ports:
- "8400:8400"
- "8500:8500"
- "8600:53"
command: agent -dev -client 0.0.0.0 -log-level info
biomaj-prometheus:
image: prom/prometheus:v1.8.2
ports:
- "9090:9090"
volumes:
- ${BIOMAJ_DIR}/biomaj-config/prometheus.yml:/etc/prometheus/prometheus.yml
depends_on:
- biomaj-consul
command:
- '-storage.local.retention=720h'
- '-config.file=/etc/prometheus/prometheus.yml'
biomaj-influxdb:
image: influxdb
volumes:
- ${BIOMAJ_DIR}/influxdb:/var/lib/influxdb
environment:
- INFLUXDB_DB=biomaj
- INFLUXDB_USER=biomaj
- INFLUXDB_PASSWORD=biomaj
biomaj-public-proxy:
# In production, port 8080 should not be open
image: traefik:1.7
ports:
# - "8080:8080"
- "5000:80"
volumes:
- ${BIOMAJ_DIR}/proxy/traefik/traefik.toml:/etc/traefik/traefik.toml
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- biomaj-consul
biomaj-internal-proxy:
# In production, ports should not be open
image: traefik:1.7
#ports:
# - "8082:8080"
# - "8081:80"
volumes:
- ${BIOMAJ_DIR}/proxy/traefik/traefik-int.toml:/etc/traefik/traefik.toml
depends_on:
- biomaj-consul
biomaj-user-web:
image: quay.io/osallou/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajuser
- WAIT_HOSTS=biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-redis
command: ["/startup.sh", "gunicorn", "-b", "0.0.0.0:5000", "--log-config", "/etc/biomaj/production.ini biomaj_user.wsgi:app"]
biomaj-download-web:
image: quay.io/osallou/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajdownload
- WAIT_HOSTS=biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-redis
command: ["/startup.sh", "gunicorn", "-c", "/etc/biomaj/gunicorn_conf.py", "-b", "0.0.0.0:5000", "--log-config", "/etc/biomaj/production.ini biomaj_download.biomaj_download_web:app"]
biomaj-download-message:
image: quay.io/osallou/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajdownload
- RABBITMQ_USER=biomaj
- RABBITMQ_PASSWORD=biomaj
- WAIT_HOSTS=biomaj-rabbitmq:5672, biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-rabbitmq
- biomaj-redis
command: ["/startup.sh", "python3", "/root/biomaj-download/bin/biomaj_download_consumer.py"]
biomaj-process-web:
image: quay.io/osallou/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
- ${BIOMAJ_DIR}/biomaj/process:/opt/conda/envs
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajprocess
- WAIT_HOSTS=biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-redis
command: ["/startup.sh", "gunicorn", "-c", "/etc/biomaj/gunicorn_conf.py", "-b", "0.0.0.0:5000", "--log-config", "/etc/biomaj/production.ini biomaj_process.biomaj_process_web:app"]
biomaj-process-message:
image: quay.io/osallou/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
- ${BIOMAJ_DIR}/biomaj/process:/opt/conda/envs
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajprocess
- RABBITMQ_USER=biomaj
- RABBITMQ_PASSWORD=biomaj
- DOCKER_URL=${DOCKER_URL}
- WAIT_HOSTS=biomaj-rabbitmq:5672, biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-rabbitmq
- biomaj-redis
- biomaj-elasticsearch
command: ["/startup.sh", "python3", "/root/biomaj-process/bin/biomaj_process_consumer.py"]
biomaj-daemon-web:
image: quay.io/osallou/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajdaemon
- RABBITMQ_USER=biomaj
- RABBITMQ_PASSWORD=biomaj
- WAIT_HOSTS=biomaj-redis:6379, biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-rabbitmq
- biomaj-redis
- biomaj-influxdb
- biomaj-elasticsearch
- biomaj-user-web
- biomaj-download-web
- biomaj-process-web
command: ["/startup.sh", "gunicorn", "-c", "/etc/biomaj/gunicorn_conf.py", "-b", "0.0.0.0:5000", "--log-config", "/etc/biomaj/production.ini biomaj_daemon.daemon.biomaj_daemon_web:app"]
biomaj-daemon-message:
image: quay.io/osallou/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajdaemon
- RABBITMQ_USER=biomaj
- RABBITMQ_PASSWORD=biomaj
- WAIT_HOSTS=biomaj-redis:6379, biomaj-mongo:27017, biomaj-consul:8500, biomaj-rabbitmq:5672
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-rabbitmq
- biomaj-redis
- biomaj-elasticsearch
- biomaj-user-web
- biomaj-download-web
- biomaj-process-web
command: ["/startup.sh", "python3", "/root/biomaj-daemon/bin/biomaj_daemon_consumer.py"]
biomaj-watcher-web:
image: quay.io/osallou/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- WAIT_HOSTS=biomaj-redis:6379, biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-user-web
- biomaj-daemon-web
- biomaj-elasticsearch
command: ["/startup.sh", "/root/watcher.sh"]
biomaj-cron:
image: quay.io/osallou/biomaj-cron
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
depends_on:
- biomaj-daemon-web
biomaj-ftp:
image: quay.io/osallou/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajftp
- RABBITMQ_USER=biomaj
- RABBITMQ_PASSWORD=biomaj
- MASQUERADE_ADDRESS=${MASQUERADE_ADDRESS}
- WAIT_HOSTS=biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-user-web
- biomaj-elasticsearch
ports:
- "2121:21"
command: ["/startup.sh", "python3", "/root/biomaj-ftp/bin/biomaj_ftp_service.py"]
biomaj-release-web:
image: quay.io/osallou/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajrelease
- REDIS_DAEMON_PREFIX=biomajdaemon
- WAIT_HOSTS=biomaj-redis:6379, biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-consul
- biomaj-redis
- biomaj-daemon-web
- biomaj-daemon-message
command: ["/startup.sh", "python3", "/root/biomaj-release/bin/biomaj_release.py"]
biomaj-expose:
image: quay.io/osallou/biomaj-expose
labels:
- traefik.enable=true
- traefik.frontend.rule=PathPrefix:/db
- traefik.frontend.auth.forward.address=http://biomaj-daemon-web:5000/api/daemon/expose
- traefik.frontend.auth.forward.trustForwardHeader=true
depends_on:
- biomaj-internal-proxy
build:
context: proxy/nginx
volumes:
- ${PWD}/proxy/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ${BIOMAJ_DIR}/biomaj/db:/usr/share/nginx/html/db:ro
command: [nginx-debug, '-g', 'daemon off;']