forked from EUDAT-B2SHARE/dockerize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
118 lines (109 loc) · 3.88 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
version: '2.3'
services:
postgres:
image: postgres:9.6
environment:
- "POSTGRES_PASSWORD=${B2SHARE_POSTGRESQL_PASSWORD}"
- "POSTGRES_USER=${B2SHARE_POSTGRESQL_USER}"
- "POSTGRES_DB=${B2SHARE_POSTGRESQL_DBNAME}"
- "PGDATA=/var/lib/postgresql/data"
volumes:
- "${B2SHARE_DATADIR}/postgres-data:/var/lib/postgresql/data"
expose:
- "5432"
b2share-base:
image: eudatb2share/b2share:2.2.0
command:
- /bin/echo
environment:
- "B2ACCESS_CONSUMER_KEY=${B2ACCESS_CONSUMER_KEY}"
- "B2ACCESS_SECRET_KEY=${B2ACCESS_SECRET_KEY}"
- "USE_STAGING_B2ACCESS=${USE_STAGING_B2ACCESS}"
- "B2SHARE_SECRET_KEY=${B2SHARE_SECRET_KEY}"
- "B2SHARE_JSONSCHEMAS_HOST=${B2SHARE_JSONSCHEMAS_HOST}"
- "INIT_DB_AND_INDEX=${INIT_DB_AND_INDEX}"
- "LOAD_DEMO_COMMUNITIES_AND_RECORDS=${LOAD_DEMO_COMMUNITIES_AND_RECORDS}"
- "B2SHARE_PREFERRED_URL_SCHEME=https"
- "B2SHARE_SQLALCHEMY_DATABASE_URI='postgresql+psycopg2://${B2SHARE_POSTGRESQL_USER}:${B2SHARE_POSTGRESQL_PASSWORD}@postgres:5432/${B2SHARE_POSTGRESQL_DBNAME}'"
- "B2SHARE_CACHE_REDIS_HOST='redis'"
- "B2SHARE_CACHE_REDIS_URL='redis://redis:6379/0'"
- "B2SHARE_ACCOUNTS_SESSION_REDIS_URL='redis://redis:6379/1'"
- "B2SHARE_BROKER_URL='amqp://${B2SHARE_RABBITMQ_USER}:${B2SHARE_RABBITMQ_PASS}@mq:5672/'"
- "B2SHARE_CELERY_BROKER_URL='amqp://${B2SHARE_RABBITMQ_USER}:${B2SHARE_RABBITMQ_PASS}@mq:5672/'"
- "B2SHARE_CELERY_RESULT_BACKEND='redis://redis:6379/2'"
- "B2SHARE_SEARCH_ELASTIC_HOSTS='elasticsearch'"
volumes:
- "${B2SHARE_DATADIR}/b2share-data:/usr/var/b2share-instance"
b2share:
extends: b2share-base
command:
- /eudat/b2share.sh
expose:
- "5000"
links:
- elasticsearch
- redis
- postgres
- mq
elasticsearch:
build: elasticsearch
image: eudatb2share/elasticsearch:2.2
expose:
- "9200"
- "9300"
volumes:
- "${B2SHARE_DATADIR}/elasticsearch-data:/usr/share/elasticsearch/data"
redis:
image: redis:5-alpine
expose:
- "6379"
volumes:
- "${B2SHARE_DATADIR}/redis-data:/data"
nginx:
build: nginx
image: eudatb2share/nginx:1.18
ports:
- "80:80"
- "443:443"
# volumes:
# - "${B2SHARE_DATADIR}/nginx-data/ssl:/etc/ssl/"
links:
- b2share
mq:
image: rabbitmq:3.8-management-alpine
environment:
- "RABBITMQ_DEFAULT_USER=${B2SHARE_RABBITMQ_USER}"
- "RABBITMQ_DEFAULT_PASS=${B2SHARE_RABBITMQ_PASS}"
expose:
- "15672"
- "5672"
volumes:
- "${B2SHARE_DATADIR}/rabbitmq-data:/var/lib/rabbitmq"
# b2share-test:
# extends: b2share-base
# environment:
# - "DEBUG=True"
# - "FLASK_ENV=Development"
# - "FLASK_DEBUG=1"
# command:
# - /bin/sh
# - -c
# - |
# # Install test-dependencies and run tests
# pip install -e /eudat/b2share/.[all]
# /eudat/b2share/run_tests.sh
# expose:
# - "5001"
# links:
# - elasticsearch
# - redis
# - postgres
# - mq
# backup:
# build: backup
# environment:
# - "PGPASSWORD=${B2SHARE_POSTGRESQL_PASSWORD}"
# - "POSTGRES_USER=${B2SHARE_POSTGRESQL_USER}"
# - "NUMBER_OF_DUMPS=30"
# volumes:
# - "${B2SHARE_DATADIR}/db_dump:/usr/local/share/pgsql_dumps"