-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
198 lines (196 loc) · 6.74 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
# Local development stack for Knowledge Commons Works
#
# Usage::
#
# $ docker-compose --file docker-compose.yml up -d
#
# Following services are included:
# - Frontend: Nginx (exposed ports: 80 and 443)
# - Cache: Redis (exposed port: 6379)
# - UI application: UWSGI (not exposed)
# - API application: UWSGI (not exposed)
# - Cache: Redis (exposed port: 6379)
# - DB: (PostgresSQL) (exposed port: 5432 or 3306)
# - Message queue: RabbitMQ (exposed ports: 5672, 15672)
# - Search platform: (OpenSearch) (exposed ports: 9200, 9300)
# - OpenSearch Dashboard (view OS indices) (exposed ports: 5601)
#
services:
cache:
extends:
file: docker-services.yml
service: cache
volumes:
- cache_data:/data
db:
extends:
file: docker-services.yml
service: db
volumes:
- database_data:/var/lib/postgresql/data
mq:
extends:
file: docker-services.yml
service: mq
volumes:
- mq_data:/var/lib/rabbitmq
search:
extends:
file: docker-services.yml
service: search
volumes:
- search_data:/usr/share/opensearch/data
opensearch-dashboards:
extends:
file: docker-services.yml
service: opensearch-dashboards
pgadmin:
extends:
file: docker-services.yml
service: pgadmin
volumes:
- pgadmin_data:/var/lib/pgadmin
# Frontend
frontend:
extends:
file: docker-services.yml
service: frontend
container_name: kcworks-frontend
build: ./docker/nginx/
volumes:
- ./docker/nginx_containerized/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx_containerized/conf.d:/etc/nginx/conf.d
- ./static:/opt/invenio/var/instance/static
# - static_data:/opt/invenio/var/instance/static
depends_on:
- web-ui
- web-api
ports:
- "80:80"
- "443:443"
# UI Application
# This container holds Python, pip, the virtualenv, and the invenio code,
# Node.js, NPM and some standard libraries Invenio usually needs
# command: ["uwsgi /opt/invenio/var/instance/uwsgi_ui.ini --daemonize=logs/uwsgi-ui.log --log-reopen --pidfile=/tmp/kcr_ui.pid"]
web-ui:
extends:
file: docker-services.yml
service: app
container_name: kcworks-ui
command: ["/opt/invenio/var/instance/startup_ui.sh"]
# command: ["/opt/invenio/src/docker/startup_ui.sh"]
# command: ["uwsgi /opt/invenio/var/instance/uwsgi_ui.ini"]
image: monotasker/kcworks:latest
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
- INVENIO_LOGGING_CONSOLE=True
- INVENIO_LOGGING_CONSOLE_LEVEL=DEBUG
- INVENIO_COMMONS_API_REQUEST_PROTOCOL=https
# - INVENIO_LOGGING_FS_LEVEL=DEBUG
# - INVENIO_LOGGING_FS_BACKUP_COUNT=10
# - INVENIO_LOGGING_FS_LOGFILE=/opt/invenio/src/logs/invenio.log
ports:
- "5000"
# extra_hosts:
# - "host.docker.internal:host-gateway"
volumes:
# - ./docker/startup_ui.sh:/opt/invenio/src/docker/startup_ui.sh
- ./logs/invenio.log:/opt/invenio/src/logs/invenio.log
- ./invenio.cfg:/opt/invenio/var/instance/invenio.cfg
- ./app_data:/opt/invenio/var/instance/app_data
# - ${INVENIO_LOCAL_INSTANCE_PATH}/assets:/opt/invenio/var/instance/assets
- ./static:/opt/invenio/var/instance/static
# FIXME: are the following two bind mounts needed?
- ./templates:/opt/invenio/var/instance/templates
- ./translations:/opt/invenio/var/instance/translations
- .:/opt/invenio/src
- archived_data:/opt/invenio/var/instance/archive
- uploaded_data:/opt/invenio/var/instance/data
- /${INVENIO_RECORD_IMPORTER_LOCAL_DATA_DIR}:${INVENIO_RECORD_IMPORTER_DATA_DIR}
# API Rest Application
web-api:
extends:
file: docker-services.yml
service: app
container_name: kcworks-api
# command: ["/opt/invenio/src/docker/startup_api.sh"]
command: ["/opt/invenio/var/instance/startup_api.sh"]
# command: ["uwsgi /opt/invenio/var/instance/uwsgi_rest.ini"]
image: monotasker/kcworks:latest
ports:
- "5001"
# extra_hosts:
# - "host.docker.internal:host-gateway"
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
- INVENIO_LOGGING_CONSOLE=False
- INVENIO_LOGGING_CONSOLE_LEVEL=DEBUG
- INVENIO_COMMONS_API_REQUEST_PROTOCOL=https
# - INVENIO_LOGGING_FS_LEVEL=DEBUG
# - INVENIO_LOGGING_FS_BACKUP_COUNT=10
# - INVENIO_LOGGING_FS_LOGFILE=/opt/invenio/src/logs/invenio.log
volumes:
# - ./docker/startup_api.sh:/opt/invenio/src/docker/startup_api.sh
- ./invenio.cfg:/opt/invenio/var/instance/invenio.cfg
- ./app_data:/opt/invenio/var/instance/app_data
- ./static:/opt/invenio/var/instance/static
- ./templates:/opt/invenio/var/instance/templates
- ./translations:/opt/invenio/var/instance/translations
- .:/opt/invenio/src
# - static_data:/opt/invenio/var/instance/static
- archived_data:/opt/invenio/var/instance/archive
- uploaded_data:/opt/invenio/var/instance/data
- /${INVENIO_RECORD_IMPORTER_LOCAL_DATA_DIR}:${INVENIO_RECORD_IMPORTER_DATA_DIR}
# Worker
worker:
extends:
file: docker-services.yml
service: app
container_name: kcworks-worker
command: ["/opt/invenio/var/instance/startup_worker.sh"]
# command: ["/opt/invenio/src/docker/startup_worker.sh"]
# command: ["celery -A invenio_app.celery worker --beat --loglevel INFO"]
image: monotasker/kcworks:latest
# extra_hosts:
# - "host.docker.internal:host-gateway"
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
- INVENIO_LOGGING_CONSOLE=True
- INVENIO_LOGGING_CONSOLE_LEVEL=DEBUG
- INVENIO_COMMONS_API_REQUEST_PROTOCOL=https
# - INVENIO_LOGGING_FS_LEVEL=DEBUG
# - INVENIO_LOGGING_FS_BACKUP_COUNT=10
# - INVENIO_LOGGING_FS_LOGFILE=/opt/invenio/src/logs/invenio.log
volumes:
# - ./docker/startup_worker.sh:/opt/invenio/src/docker/startup_worker.sh
- ./invenio.cfg:/opt/invenio/var/instance/invenio.cfg
- ./app_data:/opt/invenio/var/instance/app_data
- ./static:/opt/invenio/var/instance/static
- ./templates:/opt/invenio/var/instance/templates
- ./translations:/opt/invenio/var/instance/translations
- .:/opt/invenio/src
# - static_data:/opt/invenio/var/instance/static
- archived_data:/opt/invenio/var/instance/archive
- uploaded_data:/opt/invenio/var/instance/data
- /${INVENIO_RECORD_IMPORTER_LOCAL_DATA_DIR}:${INVENIO_RECORD_IMPORTER_DATA_DIR}
depends_on:
search:
condition: service_started
cache:
condition: service_started
db:
condition: service_started
mq:
condition: service_started
volumes:
archived_data:
static_data:
uploaded_data:
database_data:
cache_data:
mq_data:
search_data:
pgadmin_data: