forked from inspirehep/inspire-next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.yml
150 lines (148 loc) · 3.93 KB
/
docker-compose.test.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
# -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2016, 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 licence, 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:
service_base:
# Overrides default inspirehep config.
extends:
file: services.yml
service: base
environment:
- APP_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://inspirehep:dbpass123@database:5432/inspirehep
- APP_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- APP_CELERY_RESULT_BACKEND=amqp://guest:guest@rabbitmq:5672//
- APP_CACHE_REDIS_URL=redis://redis:6379/0
- APP_ACCOUNTS_SESSION_REDIS_URL=redis://redis:6379/2
- APP_SEARCH_ELASTIC_HOSTS=indexer
unit:
extends:
service: service_base
volumes_from:
- static
command: py.test inspirehep tests/unit
disambiguation:
extends:
service: service_base
command: py.test tests/integration/disambiguation
volumes_from:
- static
links:
- database
- indexer
- rabbitmq
- redis
depends_on:
- worker
workflows:
extends:
service: service_base
command: py.test tests/integration/workflows
volumes_from:
- static
links:
- database
- indexer
- rabbitmq
- redis
depends_on:
- worker
integration:
extends:
service: service_base
command: py.test tests/integration --ignore tests/integration/disambiguation --ignore tests/integration/workflows
volumes_from:
- static
links:
- database
- indexer
- rabbitmq
- redis
depends_on:
- worker
acceptance:
extends:
service: service_base
command: py.test --driver Firefox --host selenium --port 4444 --capability browserName firefox --html=selenium-report.html tests/acceptance
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
volumes_from:
- static
links:
- database
- indexer
- rabbitmq
- redis
- selenium
depends_on:
- web
- worker
environment:
- SERVER_NAME=web:5000
- DISPLAY=$DISPLAY
web:
extends:
service: service_base
command: gunicorn -b 0.0.0.0:5000 -t 3600 -w 1 --access-logfile "-" inspirehep.wsgi_with_coverage:application
volumes_from:
- static
links:
- database
- indexer
- rabbitmq
- redis
environment:
- APP_SERVER_NAME=web:5000
worker:
container_name: inspirehep-test-worker
extends:
service: service_base
command: celery worker -E -A inspirehep.celery --loglevel=INFO --purge
volumes_from:
- static
links:
- database
- indexer
- rabbitmq
- redis
redis:
container_name: inspirehep-test-redis
image: redis
indexer:
container_name: inspirehep-test-indexer
extends:
file: services.yml
service: indexer
rabbitmq:
container_name: inspirehep-test-rabbitmq
image: rabbitmq
database:
container_name: inspirehep-test-database
extends:
file: services.yml
service: database
selenium:
image: selenium/standalone-firefox:2.53.1-beryllium
static:
container_name: inspirehep-test-static
extends:
file: services.yml
service: static