-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
196 lines (175 loc) · 7.99 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
# Rogue Scholar Docker Compose
#
# Usage::
#
# $ docker compose up -d
#
# The following services are included:
# - Reverse proxy: Caddy (exposed ports: 80, 443)
# - Web application: Gunicorn (exposed port: none)
# - DB: (PostgresSQL) (exposed port: 5432)
# - Cache and message queue: Redis (exposed port: 6379)
# - Search platform: (OpenSearch) (exposed ports: 9200, 9300)
services:
proxy:
image: caddy:2.8.1
restart: "unless-stopped"
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
web:
image: ghcr.io/front-matter/rogue-scholar:latest
pull_policy: if_not_present
volumes:
- uploaded_data:/opt/invenio/var/instance/data
- archived_data:/opt/invenio/var/instance/archive
environment:
# Flask
- INVENIO_APP_ALLOWED_HOSTS=${INVENIO_APP_ALLOWED_HOSTS:-['0.0.0.0', 'localhost', '127.0.0.1']}
# Flask-SQLAlchemy
- INVENIO_SQLALCHEMY_DATABASE_URI=${INVENIO_SQLALCHEMY_DATABASE_URI:-postgresql+psycopg2://inveniordm:inveniordm@db/inveniordm}
# Flask-Babel
- INVENIO_BABEL_DEFAULT_LOCALE=${INVENIO_BABEL_DEFAULT_LOCALE:-en}
- INVENIO_BABEL_DEFAULT_TIMEZONE=${INVENIO_BABEL_DEFAULT_TIMEZONE:-UTC}
# Invenio-App
- INVENIO_CACHE_TYPE=${INVENIO_CACHE_TYPE:-redis}
- INVENIO_CACHE_REDIS_URL=${INVENIO_CACHE_REDIS_URL:-redis://cache:6379/0}
- INVENIO_ACCOUNTS_SESSION_REDIS_URL=${INVENIO_ACCOUNTS_SESSION_REDIS_URL:-redis://cache:6379/1}
- INVENIO_CELERY_RESULT_BACKEND=${INVENIO_CELERY_RESULT_BACKEND:-redis://cache:6379/2}
- INVENIO_RATELIMIT_STORAGE_URL=${INVENIO_RATELIMIT_STORAGE_URL:-redis://cache:6379/3}
- INVENIO_COMMUNITIES_IDENTITIES_CACHE_REDIS_URL=${INVENIO_COMMUNITIES_IDENTITIES_CACHE_REDIS_URL:-redis://cache:6379/4}
- INVENIO_BROKER_URL=${INVENIO_BROKER_URL:-redis://cache:6379/5}
- INVENIO_CELERY_BROKER_URL=${INVENIO_BROKER_URL:-redis://cache:6379/5}
- INVENIO_WSGI_PROXIES=4
- INVENIO_SECRET_KEY=${INVENIO_SECRET_KEY:-changeme}
# Invenio-I18N
# TODO: fix tuple parsing
# - INVENIO_I18N_LANGUAGES=${INVENIO_I18N_LANGUAGES:-'[("de", _("German"))]'}
# Invenio-Theme
- INVENIO_THEME_LOGO=${INVENIO_THEME_LOGO:-images/invenio-rdm-white.svg}
- INVENIO_THEME_SITENAME=${INVENIO_THEME_SITENAME:-InvenioRDM Starter}
- INVENIO_THEME_FRONTPAGE_TITLE=${INVENIO_THEME_FRONTPAGE_TITLE:-InvenioRDM Starter}
- INVENIO_THEME_FRONTPAGE_SUBTITLE=${INVENIO_THEME_FRONTPAGE_SUBTITLE:-A starter project for the turn-key research data management repository.}
- INVENIO_THEME_SHOW_FRONTPAGE_INTRO_SECTION=False
# Invenio-Records-Resources
- INVENIO_SITE_UI_URL=${INVENIO_SITE_UI_URL:-https://localhost}
- INVENIO_SITE_API_URL=${INVENIO_SITE_API_URL:-https://localhost/api}
# Invenio-RDM-Records
- INVENIO_DATACITE_ENABLED=${INVENIO_DATACITE_ENABLED:-False}
- INVENIO_DATACITE_USERNAME=${INVENIO_DATACITE_USERNAME:-}
- INVENIO_DATACITE_PASSWORD=${INVENIO_DATACITE_PASSWORD:-}
- INVENIO_DATACITE_PREFIX=${INVENIO_DATACITE_PREFIX:-}
- INVENIO_DATACITE_TEST_MODE=${INVENIO_DATACITE_TEST_MODE:-True}
- INVENIO_DATACITE_DATACENTER_SYMBOL=${INVENIO_DATACITE_DATACENTER_SYMBOL:-}
- INVENIO_RDM_ALLOW_METADATA_ONLY_RECORDS=${INVENIO_RDM_ALLOW_METADATA_ONLY_RECORDS:-True}
- INVENIO_RDM_ALLOW_RESTRICTED_RECORDS=${INVENIO_RDM_ALLOW_RESTRICTED_RECORDS:-True}
- INVENIO_RDM_ALLOW_EXTERNAL_DOI_VERSIONING=${INVENIO_RDM_ALLOW_EXTERNAL_DOI_VERSIONING:-True}
- INVENIO_RDM_CITATION_STYLES_DEFAULT=${INVENIO_RDM_CITATION_STYLES_DEFAULT:-apa}
- INVENIO_SECURITY_EMAIL_SENDER=${INVENIO_SECURITY_EMAIL_SENDER:-}
# TODO: fix tuple parsing
# - INVENIO_RDM_CITATION_STYLES=${INVENIO_RDM_CITATION_STYLES:-"[('apa', 'APA'), ('chicago-note-bibliography', 'Chicago'), ('harvard-cite-them-right', 'Harvard')]"}
# Invenio-Accounts
- INVENIO_ACCOUNTS_LOCAL_LOGIN_ENABLED=${INVENIO_ACCOUNTS_LOCAL_LOGIN_ENABLED:-True}
# OAI-PMH
- INVENIO_OAISERVER_ID_PREFIX=${OAISERVER_ID_PREFIX:-invenio-rdm}
# Invenio-Files-REST
- INVENIO_FILES_REST_STORAGE_FACTORY=invenio_s3.s3fs_storage_factory
# Invenio-S3
- INVENIO_S3_ENDPOINT_URL=${INVENIO_S3_ENDPOINT_URL:-}
- INVENIO_S3_ACCESS_KEY_ID=${INVENIO_S3_ACCESS_KEY_ID:-}
- INVENIO_S3_SECRET_ACCESS_KEY=${INVENIO_S3_SECRET_ACCESS_KEY:-}
- INVENIO_S3_BUCKET_NAME=${INVENIO_S3_BUCKET_NAME:-}
# Invenio-Search
- INVENIO_SEARCH_HOSTS=${INVENIO_SEARCH_HOSTS:-['search:9200']}
- INVENIO_SEARCH_INDEX_PREFIX=${INVENIO_SEARCH_INDEX_PREFIX:-invenio-rdm-}
# Logging
- INVENIO_LOGGING_CONSOLE_LEVEL=${INVENIO_LOGGING_CONSOLE_LEVEL:-WARNING}
depends_on:
search:
condition: service_started
cache:
condition: service_started
db:
condition: service_started
worker:
command: "celery -A invenio_app.celery worker --beat --events --loglevel=WARNING"
image: ghcr.io/front-matter/rogue-scholar:latest
pull_policy: if_not_present
volumes:
- uploaded_data:/opt/invenio/var/instance/data
environment:
- INVENIO_SQLALCHEMY_DATABASE_URI=${INVENIO_SQLALCHEMY_DATABASE_URI:-postgresql+psycopg2://inveniordm:inveniordm@db/inveniordm}
- INVENIO_SEARCH_HOSTS=${INVENIO_SEARCH_HOSTS:-['search:9200']}
- INVENIO_SEARCH_INDEX_PREFIX=${INVENIO_SEARCH_INDEX_PREFIX:-invenio-rdm-}
- INVENIO_CACHE_TYPE=${INVENIO_CACHE_TYPE:-redis}
- INVENIO_CACHE_REDIS_URL=${INVENIO_CACHE_REDIS_URL:-redis://cache:6379/0}
- INVENIO_ACCOUNTS_SESSION_REDIS_URL=${INVENIO_ACCOUNTS_SESSION_REDIS_URL:-redis://cache:6379/1}
- INVENIO_CELERY_RESULT_BACKEND=${INVENIO_CELERY_RESULT_BACKEND:-redis://cache:6379/2}
- INVENIO_RATELIMIT_STORAGE_URL=${INVENIO_RATELIMIT_STORAGE_URL:-redis://cache:6379/3}
- INVENIO_COMMUNITIES_IDENTITIES_CACHE_REDIS_URL=${INVENIO_COMMUNITIES_IDENTITIES_CACHE_REDIS_URL:-redis://cache:6379/4}
- INVENIO_BROKER_URL=${INVENIO_BROKER_URL:-redis://cache:6379/5}
- INVENIO_CELERY_BROKER_URL=${INVENIO_BROKER_URL:-redis://cache:6379/5}
- INVENIO_MAIL_SUPPRESS_SEND=${INVENIO_MAIL_SUPPRESS_SEND:-True}
- INVENIO_MAIL_SERVER=${INVENIO_MAIL_SERVER:-smtp.gmail.com}
- INVENIO_MAIL_PORT=${INVENIO_MAIL_PORT:-465}
- INVENIO_MAIL_USERNAME=${INVENIO_MAIL_USERNAME:-info}
- INVENIO_MAIL_PASSWORD=${INVENIO_MAIL_PASSWORD:-changeme}
- INVENIO_MAIL_USE_SSL=${INVENIO_MAIL_USE_SSL:-True}
# Invenio-Files-REST
- INVENIO_FILES_REST_STORAGE_FACTORY=${INVENIO_FILES_REST_STORAGE_FACTORY:-invenio_s3.s3fs_storage_factory}
# Invenio-S3
- INVENIO_S3_ENDPOINT_URL=${INVENIO_S3_ENDPOINT_URL:-}
- INVENIO_S3_ACCESS_KEY_ID=${INVENIO_S3_ACCESS_KEY_ID:-}
- INVENIO_S3_SECRET_ACCESS_KEY=${INVENIO_S3_SECRET_ACCESS_KEY:-}
- INVENIO_S3_BUCKET_NAME=${INVENIO_S3_BUCKET_NAME:-}
depends_on:
search:
condition: service_started
cache:
condition: service_started
db:
condition: service_started
cache:
image: valkey/valkey:7.2.5-bookworm
restart: "unless-stopped"
ports:
- "6379:6379"
db:
image: postgres:16.4-bookworm
restart: "unless-stopped"
environment:
- POSTGRES_USER=${POSTGRES_USER:-inveniordm}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-inveniordm}
- POSTGRES_DB=${POSTGRES_DB:-inveniordm}
ports:
- 5432:5432
search:
image: opensearchproject/opensearch:2.12.0
restart: "unless-stopped"
environment:
- bootstrap.memory_lock=true
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
- DISABLE_INSTALL_DEMO_CONFIG=true
- DISABLE_SECURITY_PLUGIN=true
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mem_limit: 2g
ports:
- "9200:9200"
- "9600:9600"
volumes:
app_data:
uploaded_data:
archived_data:
caddy_data:
caddy_config: