-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.aasdeployment.yml
167 lines (165 loc) · 3.75 KB
/
docker-compose.aasdeployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 CERN.
#
# Asclepias Broker 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:
# Load balancer
lb:
extends:
file: docker-services.yml
service: lb
build: ./docker/haproxy-production/
image: asclepias-broker-lb-production
networks:
- main
volumes:
- /etc/letsencrypt/:/etc/letsencrypt
# Frontend
frontend:
extends:
file: docker-services.yml
service: frontend
build: ./docker/nginx-production/
image: asclepias-broker-frontend-production
volumes:
- static_data:/opt/invenio/var/instance/static
- /etc/letsencrypt/:/etc/certbot/conf
networks:
- main
# Web application
web:
extends:
file: docker-services.yml
service: app
command: pipenv run uwsgi /app/docker/uwsgi/uwsgi.ini
image: asclepias-broker-web
ports:
- "5000"
volumes:
- static_data:/opt/invenio/var/instance/static
networks:
- main
# Worker
worker:
extends:
file: docker-services.yml
service: app
restart: "always"
command: "pipenv run celery -A invenio_app.celery worker --beat --loglevel=INFO"
image: asclepias-broker-worker
networks:
- main
# Monitoring
# Turning off Flower and Kibana in production
# kibana:
# extends:
# file: docker-services.yml
# service: kibana
# networks:
# - main
# flower:
# extends:
# file: docker-services.yml
# service: flower
# networks:
# - main
# Base services
cache:
extends:
file: docker-services.yml
service: cache
networks:
- main
db:
extends:
file: docker-services.yml
service: db
volumes:
- pg_data:/var/lib/postgresql/data
networks:
- main
mq:
extends:
file: docker-services.yml
service: mq
mem_limit: 500M
networks:
- main
# Three Node Elasticsearch Cluster
es:
image: docker.elastic.co/elasticsearch/elasticsearch:7.14.1
restart: "always"
container_name: es
environment:
- node.name=es
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es02,es03
- cluster.initial_master_nodes=es,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
volumes:
- es_data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
networks:
- main
es02:
image: docker.elastic.co/elasticsearch/elasticsearch:7.14.1
restart: "always"
container_name: es02
environment:
- node.name=es02
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es,es03
- cluster.initial_master_nodes=es,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
volumes:
- es02_data:/usr/share/elasticsearch/data
networks:
- main
es03:
image: docker.elastic.co/elasticsearch/elasticsearch:7.14.1
restart: "always"
container_name: es03
environment:
- node.name=es03
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es,es02
- cluster.initial_master_nodes=es,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
volumes:
- es03_data:/usr/share/elasticsearch/data
networks:
- main
volumes:
static_data:
pg_data:
es_data:
driver: local
es02_data:
driver: local
es03_data:
driver: local
networks:
main: