Open marcialwushu opened 5 years ago
docker-services.yml
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 fgf.
#
# fgf is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
version: '2.3'
services:
app:
build:
context: ./
args:
- ENVIRONMENT=DEV
image: repository
environment:
- "INVENIO_ACCOUNTS_SESSION_REDIS_URL=redis://cache:6379/1"
- "INVENIO_BROKER_URL=amqp://guest:guest@mq:5672/"
- "INVENIO_CACHE_REDIS_URL=redis://cache:6379/0"
- "INVENIO_CACHE_TYPE=redis"
- "INVENIO_CELERY_BROKER_URL=amqp://guest:guest@mq:5672/"
- "INVENIO_CELERY_RESULT_BACKEND=redis://cache:6379/2"
- "INVENIO_SEARCH_ELASTIC_HOSTS=['es:9200']"
- "INVENIO_SECRET_KEY=CHANGE_ME"
- "INVENIO_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://repository:repository@db/repository"
- "INVENIO_WSGI_PROXIES=2"
- "INVENIO_RATELIMIT_STORAGE_URL=redis://cache:6379/3"
lb:
build: ./docker/haproxy/
image: repository-lb
restart: "always"
ports:
- "80:80"
- "443:443"
- "8080:8080"
frontend:
build: ./docker/nginx/
image: repository-frontend
restart: "always"
ports:
- "80"
- "443"
cache:
image: redis
restart: "always"
read_only: true
ports:
- "6379:6379"
db:
image: postgres:9.6
restart: "always"
environment:
- "POSTGRES_USER=repository"
- "POSTGRES_PASSWORD=repository"
- "POSTGRES_DB=repository"
ports:
- "5432:5432"
mq:
image: rabbitmq:3-management
restart: "always"
ports:
- "15672:15672"
- "5672:5672"
es:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.2
restart: "always"
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
ports:
- "9200:9200"
- "9300:9300"
kibana:
image: docker.elastic.co/elasticsearch/kibana-oss:6.2.2
environment:
- "ELASTICSEARCH_URL=http://es:9200"
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports: ['5601:5601']
flower:
image: mher/flower
command: --broker=amqp://guest:guest@mq:5672/ --broker_api=http://guest:guest@mq:15672/api/
ports:
- "5555:5555"