diff --git a/docker-compose-otherdb.yml b/docker-compose-otherdb.yml index ca5862b..318e68e 100644 --- a/docker-compose-otherdb.yml +++ b/docker-compose-otherdb.yml @@ -2,7 +2,7 @@ services: biomaj-mongo: - image: mongo + image: mongo:3.2 volumes: - ${BIOMAJ_DIR}/mongo:/data/db @@ -14,6 +14,8 @@ biomaj-elasticsearch: image: "elasticsearch:2" command: "elasticsearch -Des.cluster.name='biomaj'" + volumes: + - ${BIOMAJ_DIR}/elasticsearch:/usr/share/elasticsearch/data biomaj-rabbitmq: image: rabbitmq @@ -38,7 +40,7 @@ biomaj-prometheus: - image: prom/prometheus:v1.8.2 + image: prom/prometheus:v2.45.6 ports: - "9090:9090" volumes: @@ -46,37 +48,43 @@ depends_on: - biomaj-consul command: - - '-storage.local.retention=720h' - - '-config.file=/etc/prometheus/prometheus.yml' + - '--storage.tsdb.retention.time=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-internal-proxy: - image: osallou/biomaj-proxy - # To be deleted in production + biomaj-public-proxy: + # In production, port 8080 should not be open + image: traefik:1.7 ports: - - "5080:80" + - "8080:8080" + - "5000:80" volumes: - - ${BIOMAJ_DIR}/proxy/internal:/proxy:ro - - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj + - ${BIOMAJ_DIR}/proxy/traefik/traefik.toml:/etc/traefik/traefik.toml + - /var/run/docker.sock:/var/run/docker.sock depends_on: - biomaj-consul - biomaj-public-proxy: - image: osallou/biomaj-proxy - volumes: - - ${BIOMAJ_DIR}/proxy/public:/proxy:ro - - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data + biomaj-internal-proxy: + # In production, ports should not be open + image: traefik:1.7 ports: - - "5000:80" + - "8082:8080" + - "8081:80" + volumes: + - ${BIOMAJ_DIR}/proxy/traefik/traefik-int.toml:/etc/traefik/traefik.toml depends_on: - biomaj-consul biomaj-user-web: - image: osallou/biomaj-docker + image: quay.io/genouest/biomaj volumes: - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data - ${BIOMAJ_DATA_DIR}:${BIOMAJ_DATA_DIR} @@ -93,11 +101,11 @@ - biomaj-rabbitmq - biomaj-redis - biomaj-elasticsearch - command: bash -c "sleep 10 ; gunicorn -b 0.0.0.0:5000 --log-config /etc/biomaj/production.ini biomaj_user.wsgi:app" + command: ["/startup.sh", "gunicorn", "-b", "0.0.0.0:5000", "--log-config", "/etc/biomaj/production.ini biomaj_user.wsgi:app"] biomaj-download-web: - image: osallou/biomaj-docker + image: quay.io/genouest/biomaj volumes: - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data - ${BIOMAJ_DATA_DIR}:${BIOMAJ_DATA_DIR} @@ -114,10 +122,10 @@ - biomaj-rabbitmq - biomaj-redis - biomaj-elasticsearch - command: bash -c "sleep 10 ; 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" + 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: osallou/biomaj-docker + image: quay.io/genouest/biomaj volumes: - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data - ${BIOMAJ_DATA_DIR}:${BIOMAJ_DATA_DIR} @@ -134,10 +142,10 @@ - biomaj-rabbitmq - biomaj-redis - biomaj-elasticsearch - command: bash -c "sleep 10 ; python3 /root/biomaj-download/bin/biomaj_download_consumer.py" + command: ["/startup.sh", "biomaj_download_consumer.py"] biomaj-process-web: - image: osallou/biomaj-docker + image: quay.io/genouest/biomaj volumes: - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data - ${BIOMAJ_DIR}/biomaj/process:/opt/conda/envs @@ -155,10 +163,10 @@ - biomaj-rabbitmq - biomaj-redis - biomaj-elasticsearch - command: bash -c "sleep 10 ; 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" + 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: osallou/biomaj-docker + image: quay.io/genouest/biomaj volumes: - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data - ${BIOMAJ_DIR}/biomaj/process:/opt/conda/envs @@ -178,10 +186,10 @@ - biomaj-rabbitmq - biomaj-redis - biomaj-elasticsearch - command: bash -c "sleep 10 ; python3 /root/biomaj-process/bin/biomaj_process_consumer.py" + command: ["/startup.sh", "biomaj_process_consumer.py"] biomaj-daemon-web: - image: osallou/biomaj-docker + image: quay.io/genouest/biomaj volumes: - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data - ${BIOMAJ_DATA_DIR}:${BIOMAJ_DATA_DIR} @@ -202,10 +210,10 @@ - biomaj-user-web - biomaj-download-web - biomaj-process-web - command: bash -c "sleep 10 ; 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" + 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: osallou/biomaj-docker + image: quay.io/genouest/biomaj volumes: - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data - ${BIOMAJ_DATA_DIR}:${BIOMAJ_DATA_DIR} @@ -225,10 +233,10 @@ - biomaj-user-web - biomaj-download-web - biomaj-process-web - command: bash -c "sleep 10 ; python3 /root/biomaj-daemon/bin/biomaj_daemon_consumer.py" + command: ["/startup.sh", "biomaj_daemon_consumer.py"] biomaj-watcher-web: - image: osallou/biomaj-docker + image: quay.io/genouest/biomaj volumes: - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data - ${BIOMAJ_DATA_DIR}:${BIOMAJ_DATA_DIR} @@ -243,7 +251,7 @@ - biomaj-user-web - biomaj-daemon-web - biomaj-elasticsearch - command: bash -c "sleep 10 ; /root/watcher.sh" + command: ["/startup.sh", "/root/watcher.sh"] biomaj-cron: image: osallou/biomaj-cron @@ -257,7 +265,7 @@ - biomaj-daemon-web biomaj-ftp: - image: osallou/biomaj-docker + image: quay.io/genouest/biomaj volumes: - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data - ${BIOMAJ_DATA_DIR}:${BIOMAJ_DATA_DIR} @@ -276,10 +284,10 @@ - biomaj-elasticsearch ports: - "2121:21" - command: bash -c "sleep 10 ; python3 /root/biomaj-ftp/bin/biomaj_ftp_service.py" + command: ["/startup.sh", "biomaj_ftp_service.py"] biomaj-release-web: - image: osallou/biomaj-docker + image: quay.io/genouest/biomaj volumes: - ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data - ${BIOMAJ_DATA_DIR}:${BIOMAJ_DATA_DIR} @@ -293,4 +301,20 @@ - biomaj-redis - biomaj-daemon-web - biomaj-daemon-message - command: bash -c "sleep 10 ; python3 /root/biomaj-release/bin/biomaj_release.py" + command: ["/startup.sh", "biomaj_release.py"] + + biomaj-expose: + image: quay.io/genouest/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: + - ${BIOMAJ_DOCKER}/proxy/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro + - ${BIOMAJ_DIR}:/db:ro + command: [nginx-debug, '-g', 'daemon off;']