-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
99 lines (92 loc) · 3.01 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
# -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014-2017 CERN.
#
# INSPIRE 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 3 of the License, or
# (at your option) any later version.
#
# INSPIRE 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 INSPIRE. If not, see <http://www.gnu.org/licenses/>.
#
# 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.3'
services:
service_base:
# Overrides default inspirehep config.
extends:
file: services.yml
service: base
environment:
- APP_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://scoap3:dbpass123@database:5432/scoap3
- APP_CELERY_BROKER_URL=pyamqp://guest:guest@rabbitmq:5672//
- APP_CELERY_RESULT_BACKEND=redis://redis:6379/1
- CELERY_BROKER_URL=pyamqp://guest:guest@rabbitmq:5672//
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- APP_CACHE_REDIS_URL=redis://redis:6379/0
- APP_ACCOUNTS_SESSION_REDIS_URL=redis://redis:6379/2
- APP_SEARCH_ELASTIC_HOSTS=indexer
- APP_ES_BULK_TIMEOUT=240
- APP_CRAWLER_HOST_URL=http://localhost:6800
- APP_CRAWLER_API_PIPELINE_URL=http://flower:5555/api/task/async-apply
- APP_LAST_RUNS_PATH=.lastruns
- APP_OAIHARVESTER_WORKDIR=/virtualenv/oaiharvest_workdir
- SCRAPY_FEED_URI=/virtualenv/scrapy_feed.json
- APP_JSONSCHEMAS_HOST=web:5000
- APP_SCOAP_DEFAULT_LOCATION=/tmp/
# Services using the inspirehep code.
web:
extends:
service: service_base
command: gunicorn -b 0.0.0.0:5000 -t 3600 --access-logfile "-" --reload scoap3.wsgi
ports:
- "5000:5000"
environment:
- APP_DEBUG=False
- APP_ASSETS_DEBUG=False
worker:
extends:
service: service_base
command: celery worker -E -A scoap3.celery --loglevel=INFO --queues celery,harvests --concurrency=1 --purge
redis:
platform: linux/x86_64
image: redis:5.0-alpine
ports:
- '6379:6379'
indexer:
extends:
file: services.yml
service: indexer
ports:
- "9200:9200"
environment:
- discovery.type=single-node
- TAKE_FILE_OWNERSHIP="true"
ports:
- '9200:9200'
- '9300:9300'
rabbitmq:
image: rabbitmq:3.8-management-alpine
ports:
- '5672:5672'
database:
extends:
file: services.yml
service: database
ports:
- '5432:5432'
scrapyd:
extends:
service: service_base
command: bash -c "rm -f twistd.pid && exec scrapyd"
environment:
- HEPCRAWL_BASE_WORKING_DIR=/tmp/data/