forked from cernopendata/opendata.cern.ch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
208 lines (197 loc) · 7.08 KB
/
docker-compose.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# -*- coding: utf-8 -*-
#
# This file is part of CERN Open Data Portal.
# Copyright (C) 2015, 2016, 2017, 2018, 2021, 2022, 2023, 2024 CERN.
#
# CERN Open Data Portal is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# CERN Open Data Portal is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with CERN Open Data Portal; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307, USA.
#
# In applying this license, CERN does not
# waive the privileges and immunities granted to it by virtue of its status
# as an Intergovernmental Organization or submit itself to any jurisdiction.
version: "2"
services:
web:
restart: "always"
build:
context: .
image: cernopendata/web
depends_on:
- opensearch
- postgresql
- rabbitmq
- redis
environment:
- DEBUG=False
- INVENIO_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://cernopendata:dbpass123@postgresql:5432/cernopendata
- INVENIO_CACHE_REDIS_HOST=redis
- INVENIO_CACHE_REDIS_URL=redis://redis:6379/0
- INVENIO_ACCOUNTS_SESSION_REDIS_URL=redis://redis:6379/1
- INVENIO_BROKER_URL=amqp://guest:guest@rabbitmq:5672/ # Celery 3
- INVENIO_CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672/ # Celery 4
- INVENIO_CELERY_RESULT_BACKEND=redis://redis:6379/2
- INVENIO_SEARCH_CLIENT_CONFIG={"use_ssl":True, "verify_certs":False, "http_auth":"admin:admin"}
- INVENIO_SEARCH_HOSTS=https://opensearch:9200
- INVENIO_PIDSTORE_DATACITE_TESTMODE=False
- INVENIO_PIDSTORE_DATACITE_DOI_PREFIX=10.5072
- INVENIO_PIDSTORE_DATACITE_USERNAME=CERN.OPENDATA
- INVENIO_PIDSTORE_DATACITE_PASSWORD=CHANGE_ME
- INVENIO_PIDSTORE_LANDING_BASE_URL=http://opendata.cern.ch/record/
- INVENIO_ACCOUNTS_REGISTER_BLUEPRINT=None
# - SENTRY_DSN=https://<INPUT_CORRECT_DSN_FOR_YOUR_SENTRY_INSTANCE>@<INPUT_YOUR_SENTRY_URL>
# - LOGGING_SENTRY_CELERY=True
volumes:
- web_data:/opt/invenio/var/instance/static
links:
- postgresql
- redis
- opensearch
- rabbitmq
ports:
- "5000"
worker:
restart: "always"
image: cernopendata/web # Use this to make sure that COD3 Python-code image is built only once.
depends_on:
- opensearch
- postgresql
- rabbitmq
- redis
- web # Added to make sure that cernopendata/web -image is build before starting this one.
command: bash -c "celery -A cernopendata.celery worker --loglevel=INFO"
environment:
- DEBUG=False
- INVENIO_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://cernopendata:dbpass123@postgresql:5432/cernopendata
- INVENIO_CACHE_REDIS_HOST=redis
- INVENIO_CACHE_REDIS_URL=redis://redis:6379/0
- INVENIO_ACCOUNTS_SESSION_REDIS_URL=redis://redis:6379/1
- INVENIO_BROKER_URL=amqp://guest:guest@rabbitmq:5672/ # Celery 3
- INVENIO_CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672/ # Celery 4
- INVENIO_CELERY_RESULT_BACKEND=redis://redis:6379/2
- INVENIO_SEARCH_CLIENT_CONFIG={"use_ssl":True, "verify_certs":False, "http_auth":"admin:admin"}
- INVENIO_SEARCH_HOSTS=https://opensearch:9200
- INVENIO_ACCOUNTS_REGISTER_BLUEPRINT=None
# - SENTRY_DSN=http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb@sentry:9000/2
# - LOGGING_SENTRY_CELERY=True
volumes:
- web_data:/opt/invenio/var/instance/static
links:
- postgresql
- redis
- opensearch
- rabbitmq
web-files:
restart: "always"
build:
context: .
image: cernopendata/web
depends_on:
- opensearch
- postgresql
- rabbitmq
- redis
environment:
- DEBUG=False
- INVENIO_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://cernopendata:dbpass123@postgresql:5432/cernopendata
- INVENIO_CACHE_REDIS_HOST=redis
- INVENIO_CACHE_REDIS_URL=redis://redis:6379/0
- INVENIO_ACCOUNTS_SESSION_REDIS_URL=redis://redis:6379/1
- INVENIO_BROKER_URL=amqp://guest:guest@rabbitmq:5672/ # Celery 3
- INVENIO_CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672/ # Celery 4
- INVENIO_CELERY_RESULT_BACKEND=redis://redis:6379/2
- INVENIO_SEARCH_CLIENT_CONFIG={"use_ssl":True, "verify_certs":False, "http_auth":"admin:admin"}
- INVENIO_SEARCH_HOSTS=https://opensearch:9200
- INVENIO_PIDSTORE_DATACITE_TESTMODE=False
- INVENIO_PIDSTORE_DATACITE_DOI_PREFIX=10.5072
- INVENIO_PIDSTORE_DATACITE_USERNAME=CERN.OPENDATA
- INVENIO_PIDSTORE_DATACITE_PASSWORD=CHANGE_ME
- INVENIO_PIDSTORE_LANDING_BASE_URL=http://opendata.cern.ch/record/
- INVENIO_ACCOUNTS_REGISTER_BLUEPRINT=None
# - SENTRY_DSN=https://<INPUT_CORRECT_DSN_FOR_YOUR_SENTRY_INSTANCE>@<INPUT_YOUR_SENTRY_URL>
# - LOGGING_SENTRY_CELERY=True
volumes:
- web_data:/opt/invenio/var/instance/static
links:
- postgresql
- redis
- opensearch
- rabbitmq
ports:
- "5000"
postgresql:
restart: "always"
image: docker.io/library/postgres:14.8
environment:
- POSTGRES_USER=cernopendata
- POSTGRES_DB=cernopendata
- POSTGRES_PASSWORD=dbpass123
ports:
- "5432"
volumes:
- postgresql_data:/var/lib/postgresql/data
redis:
restart: "always"
image: docker.io/library/redis:7
ports:
- "6379"
opensearch:
restart: "always"
image: docker.io/opensearchproject/opensearch:2.11.1
environment:
- bootstrap.memory_lock=true
# set to reasonable values on production
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
volumes:
- opensearch_data:/usr/share/opensearch/data/
# ulimits:
# memlock:
# soft: -1
# hard: -1
# mem_limit: 1g
ports:
- 9200:9200
opensearch-dashboards:
image: docker.io/opensearchproject/opensearch-dashboards:2.11.1 # Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes
ports:
- 5601:5601 # Map host port 5601 to container port 5601
expose:
- "5601" # Expose port 5601 for web access to OpenSearch Dashboards
environment:
OPENSEARCH_HOSTS: '["https://opensearch:9200"]' # Define the OpenSearch nodes that OpenSearch Dashboards will query
rabbitmq:
restart: "always"
image: docker.io/library/rabbitmq:3.12
depends_on:
- redis
ports:
- "4369"
- "5672"
nginx:
restart: "always"
build: ./nginx
image: cernopendata/nginx:1.22
ports:
- "80:80"
- "443:443"
volumes:
- web_data:/opt/invenio/var/instance/static
links:
- web
- web-files
volumes:
web_data:
postgresql_data:
opensearch_data: