forked from pdonorio/restapi-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
201 lines (171 loc) · 5.09 KB
/
docker-compose.yml
File metadata and controls
201 lines (171 loc) · 5.09 KB
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
# ################
# ################
# ## RUN THE STACK
# Please use the bash script at the repo root directory:
# ./do help
# ################
# ################
#################################
# GRAPHdb neo4j
graphdb:
image: neo4j:2.3.3
hostname: gdb
environment:
NEO4J_AUTH: neo4j/catalogapi
# Other parameters?
#NEO4J_HEAP_MEMORY
#NEO4J_CACHE_MEMORY
volumes:
- ${VOLUMES_PREFIX}_graphdata:/data
#################################
# TextIndexing elasticsearch
searchindex:
image: elasticsearch
hostname: elastic
# environment:
# ES_HEAP_SIZE: 2g
# # curl http://el:9200/_nodes/process?pretty
# # http://stackoverflow.com/a/18152957/2114395
# #https://www.loggly.com/blog/nine-tips-configuring-elasticsearch-for-high-performance/
volumes:
- ${VOLUMES_PREFIX}_elasticdata:/usr/share/elasticsearch/data
- ./confs/elastic:/usr/share/elasticsearch/config
#################################
# REDIS key/value store
redqueue:
image: redis:alpine
command: redis-server --appendonly yes
hostname: myqueue
volumes:
- ${VOLUMES_PREFIX}_redisdata:/data
worker:
hostname: celworker
image: eudatb2safe/apiserver
command: celery worker -A restapi.resources.services.celery.worker.celery_app
volumes:
# Base code
- ./backend:/code
# Rest API asynchrounous tasks
- ./vanilla/tasks:/code/commons/tasks/custom
working_dir: /code
#################################
# iRODS iCAT server for EUDAT B2safe
rest:
hostname: api
image: eudatb2safe/apiserver
command: ./boot
environment:
## MODES
# APP_MODE: debug
# APP_MODE: development
# APP_MODE: production
# Base the user/role mechanism on neo4j
BACKEND_AUTH_SERVICE: graphdb
# # Application credentials to use the b2access environment
# B2ACCESS_APPNAME: httpapi
# B2ACCESS_APPKEY: GIVEMEAVALIDKEY
## Connection to irods
IRODS_USER: rods
# IRODS_AUTHSCHEME: GSI
# IRODS_USER: paolo
IRODS_ZONE: tempZone
## X509 certificates variables
#CA Authority
# X509_CERT_DIR: /opt/certificates/caauth
# #USER PEMs: Private (key) and Public (Cert)
# X509_USER_CERT: /opt/certificates/guest/usercert.pem
# X509_USER_KEY: /opt/certificates/guest/userkey.pem
working_dir: /code
volumes:
# Base code
- ./backend:/code
# Rest API configuration
- ./vanilla/specs:/code/restapi/confs/endpoints
# Rest API services models
- ./vanilla/models:/code/commons/models/custom
# Rest API asynchrounous tasks
- ./vanilla/tasks:/code/commons/tasks/custom
# Rest API endpoints
- ./vanilla/apis:/code/restapi/resources/custom
# # B2ACCESS dev certificates
# - ./certs:/usr/local/share/ca-certificates
# Tests
- ./vanilla/tests:/code/test/custom
# # Uploads dir
# - ${VOLUMES_PREFIX}_tmpuploads:/uploads
# # Sql lite database (only for this container)
# - ${VOLUMES_PREFIX}_restlitedb:/dbs
# # External irods Authority
# - ./certs/caauth:/opt/certificates/caauth
# # External irods User
# - ./certs/user:/opt/certificates/mynewuser
# volumes_from:
# - certshare
#################################
# REST API client
# (wget, curl, httpie, http-prompt)
apitests:
image: eudatb2safe/apiclient
command: sleep 1234567890
#################################
# Nginx proxy
proxy:
image: nginx
hostname: myproxy
volumes:
# Proxy configuration
- ./confs/nginx.conf:/etc/nginx/nginx.conf
links:
- rest:restapi
#################################
# Shared volume(s)
certshare:
image: alpine
command: echo "Data volume on"
volumes:
- ${VOLUMES_PREFIX}_sharedcerts:/opt/certificates
#################################
# Postgres database server
sql:
image: postgres
volumes:
- ${VOLUMES_PREFIX}_sqldata:/var/lib/postgresql/data
environment:
## FOR IRODS
POSTGRES_USER: irods
POSTGRES_PASSWORD: icatserver
POSTGRES_DB: ICAT
#################################
# iRODS iCAT server for EUDAT B2safe
icat:
# # Simple irods server
#image: cineca/icat
## OR
# B2safe instance on irods
image: eudatb2safe/b2safe
# # Open irods port to Outside world
# ## CAREFULL: don't uncomment the two lines below if you don't know why
# ports:
# - 1247:1247
hostname: rodserver
volumes:
- ${VOLUMES_PREFIX}_etcconf:/etc
- ${VOLUMES_PREFIX}_irodshome:/home/irods
- ${VOLUMES_PREFIX}_irodsvar:/var/lib/irods
- ${VOLUMES_PREFIX}_eudatopt:/opt
# a script to do operations inside the irods container
- ./confs/irestart.sh:/irestart
volumes_from:
- certshare
links:
- sql:db
#################################
# Database administration
# This docker image let you access sqllite/postgres/mysql
# with a phpmyadmin-like web page
sqladmin:
image: clue/adminer
links:
- sql:db
ports:
- 8888:80