forked from ome/docker-example-omero-grid
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
277 lines (266 loc) · 10.4 KB
/
Copy pathdocker-compose.yml
File metadata and controls
277 lines (266 loc) · 10.4 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# Brings up all OMERO nodes on _one_ host computer, but multiple containers
# Version 3 is the newest version of the Compose file format
version: "3"
# Define all the services: database, omero server, omero web
services:
# Name of our database, referenced in omero_db_host
database:
# Define a prebuilt Postgres image with a version
image: "postgres:16" # Upgrade existing postgres 11 to 16 via backup and restore
# Define environment variables (user/pass here)
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
# Define named network to communicate with other containers
networks:
- omero
# Define named volumes to persist data on host after shutdown
volumes:
- "database:/var/lib/postgresql/data"
# - .\backup_and_restore\omero-2025-07-24-14-06-06-pg16:/var/lib/postgresql/data
database-biomero:
# Define a prebuilt Postgres image with a version
image: "postgres:16"
# Define environment variables (user/pass here)
environment:
POSTGRES_USER: ${BIOMERO_POSTGRES_USER}
POSTGRES_DB: ${BIOMERO_POSTGRES_DB}
POSTGRES_PASSWORD: ${BIOMERO_POSTGRES_PASSWORD}
# Define named network to communicate with other containers
networks:
- omero
# Define named volumes to persist data on host after shutdown
volumes:
- "database-biomero:/var/lib/postgresql/data"
# Name of our omero server, referenced in omero_master_host
omeroserver:
security_opt:
- "label=level:s0"
# This container uses the tag for the latest server release of OMERO 5
# To upgrade to the next major release, increment the major version number
# image: "openmicroscopy/omero-server:5"
# We build this container locally from the Dockerfile in the ./server folder
build:
context: ./
dockerfile: ./server/Dockerfile
args:
BIOMERO_VERSION: ${BIOMERO_VERSION}
OMERO_ZARR_PIXEL_BUFFER_VERSION: ${OMERO_ZARR_PIXEL_BUFFER_VERSION}
# Define environment variables for use in the container.
# 'nodedescriptors' assigns roles to all the containers
# 'omero_db_*' are same as in 'database' description.
environment:
CONFIG_omero_db_host: database
CONFIG_omero_db_user: ${POSTGRES_USER}
CONFIG_omero_db_pass: ${POSTGRES_PASSWORD}
CONFIG_omero_db_name: ${POSTGRES_DB}
CONFIG_omero_scripts_timeout: ${OMERO_SCRIPTS_TIMEOUT}
CONFIG_omero_logging_level: ${OMERO_LOGGING_LEVEL}
CONFIG_omero_server_nodedescriptors: >-
master:Blitz-0
omeroworker-1:Tables-0,Indexer-0,PixelData-0,DropBox,MonitorServer,FileServer,Storm
biomeroworker:Processor-0
CONFIG_omero_master_host: omeroserver
CONFIG_omero_sessions_timeout: ${OMERO_SESSIONS_TIMEOUT}
ROOTPASS: ${OMERO_ROOT_PASSWORD}
# Define named network to communicate with other containers
networks:
- omero
# Map ports to ports on the host machine, to connect remotely
ports:
- "4063:4063"
- "4064:4064"
# Define named volume and map a folder from the host machine
volumes:
- "omero:/OMERO"
- "./web/L-Drive:/data"
- "tus-destination:/tus_destination"
- "./logs/omeroserver:/opt/omero/server/OMERO.server/var/log"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
# Name of our worker node, can be anything
omeroworker-1:
security_opt:
- "label=level:s0"
# We build this image locally in the ./worker folder
build: ./worker
# Define variables for use in the container.
# WORKER_NAME is used in the omero/ice node description
environment:
CONFIG_omero_master_host: omeroserver
OMERO_WORKER_NAME: omeroworker-1
CONFIG_omero_scripts_timeout: ${OMERO_SCRIPTS_TIMEOUT}
# Named network to communicate with other containers
networks:
- omero
# Named volume to share data access and persist data
volumes:
- "omero:/OMERO"
- "./web/L-Drive:/data"
- "tus-destination:/tus_destination"
- "./logs/omeroworker-1:/opt/omero/server/OMERO.server/var/log"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
# Define our processor worker
biomeroworker:
security_opt:
- "label=level:s0"
# Build this image locally from current map './'
# This way we can share file access from Dockerfile in './worker-gpu'
# Uses args to provide variables from '.env' file to the Dockerfile
build:
context: ./
dockerfile: ./biomeroworker/Dockerfile
args:
BIOMERO_VERSION: ${BIOMERO_VERSION}
BIOMERO_IMPORTER_VERSION: ${BIOMERO_IMPORTER_VERSION}
# Define variables for use in the container.
# WORKER_NAME is used in the omero/ice node description
# logging_level doesn't work, but should increase logging
environment:
CONFIG_omero_master_host: omeroserver
OMERO_WORKER_NAME: biomeroworker
CONFIG_omero_logging_level: ${OMERO_LOGGING_LEVEL}
CONFIG_omero_sessions_timeout: ${OMERO_SESSIONS_TIMEOUT}
CONFIG_omero_scripts_timeout: ${OMERO_SCRIPTS_TIMEOUT}
PERSISTENCE_MODULE: eventsourcing_sqlalchemy
SQLALCHEMY_URL: postgresql+psycopg2://${BIOMERO_POSTGRES_USER}:${BIOMERO_POSTGRES_PASSWORD}@database-biomero:5432/${BIOMERO_POSTGRES_DB}
INGEST_TRACKING_DB_URL: postgresql+psycopg2://${BIOMERO_POSTGRES_USER}:${BIOMERO_POSTGRES_PASSWORD}@database-biomero:5432/${BIOMERO_POSTGRES_DB}
IMPORTER_ENABLED: ${IMPORTER_ENABLED}
# Named network to communicate with other containers
networks:
- omero
# Named volume to share data access and persist data
# Forward host SSH setup to container
volumes:
- "omero:/OMERO"
- "~/.ssh:/tmp/.ssh:ro"
- "./web/slurm-config.ini:/opt/omero/server/slurm-config.ini:rw"
- "./web/L-Drive:/data"
- "tus-destination:/tus_destination"
- "./config/biomero-importer:/opt/omero/server/config-importer:ro"
- "./web/biomero-config.json:/opt/omero/server/biomero-config.json:ro"
- "./logs/biomeroworker:/opt/omero/server/OMERO.server/var/log"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
# Service for the omero.web UI
omeroweb:
security_opt:
- "label=level:s0"
#image: "openmicroscopy/omero-web-standalone:5"
build:
context: ./
dockerfile: ./web/Dockerfile
args:
OMERO_BIOMERO_VERSION: ${OMERO_BIOMERO_VERSION}
OMERO_FORMS_VERSION: ${OMERO_FORMS_VERSION}
environment:
OMEROHOST: omeroserver
ROOTPASS: ${OMERO_ROOT_PASSWORD}
CONFIG_omero_scripts_timeout: ${OMERO_SCRIPTS_TIMEOUT}
CONFIG_omero_web_session__expire__at__browser__close: "${OMERO_WEB_SESSION_EXPIRE_AT_BROWSER_CLOSE}"
CONFIG_omero_web_session__cookie__age: ${OMERO_WEB_SESSION_COOKIE_AGE}
ENV: ${OMERO_WEB_ENV}
OMERO_BIOMERO_CONFIG_FILE: /opt/omero/web/OMERO.web/var/biomero-config.json
OMERO_BIOMERO_GROUP_MAPPINGS_FILE: /opt/omero/web/OMERO.web/var/group-mappings.json
METABASE_SITE_URL: ${METABASE_SITE_URL}
METABASE_SECRET_KEY: ${METABASE_SECRET_KEY}
METABASE_IMPORTS_DB_PAGE_DASHBOARD_ID: ${METABASE_IMPORTS_DB_PAGE_DASHBOARD_ID}
METABASE_WORKFLOWS_DB_PAGE_DASHBOARD_ID: ${METABASE_WORKFLOWS_DB_PAGE_DASHBOARD_ID}
INGEST_TRACKING_DB_URL: postgresql+psycopg2://${BIOMERO_POSTGRES_USER}:${BIOMERO_POSTGRES_PASSWORD}@database-biomero:5432/${BIOMERO_POSTGRES_DB}
IMPORT_MOUNT_PATH: ${IMPORT_MOUNT_PATH}
FORMS_MASTER_USER: ${FORMS_MASTER_USER}
FORMS_MASTER_PASSWORD: ${FORMS_MASTER_PASSWORD}
IMPORTER_ENABLED: ${IMPORTER_ENABLED}
ANALYZER_ENABLED: ${ANALYZER_ENABLED}
UPLOADER_DESTINATION_DIR: /tus_destination
# Named network to communicate with other containers
networks:
- omero
# Map ports to ports on the host machine, to allow opening of webpage
ports:
- "4080:4080"
volumes:
- "./web/slurm-config.ini:/opt/omero/web/OMERO.web/var/slurm-config.ini:rw"
- "./web/biomero-config.json:/opt/omero/web/OMERO.web/var/biomero-config.json:rw"
- "./web/group-mappings.json:/opt/omero/web/OMERO.web/var/group-mappings.json:rw"
- "./web/L-Drive:/data:rw"
- "tus-destination:/tus_destination"
- "./logs/omeroweb:/opt/omero/web/OMERO.web/var/log"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
metabase:
image: metabase/metabase@sha256:f7b5dc52c21aaa2dca910a450e7e6119a975090ce9fc80726aa0742882ca176c
container_name: metabase
hostname: metabase
environment:
MB_DB_FILE: /metabase-data/metabase.db
MB_USER: ${METABASE_USER}
MB_PASSWORD: ${METABASE_PASSWORD}
networks:
- omero
ports:
- "3000:3000" # Expose Metabase on port 3000
volumes:
- "./metabase:/metabase-data" # Mount existing H2 db
biomero-importer:
build:
context: ./biomero-importer
dockerfile: ./Dockerfile
privileged: true
profiles:
- "IMPORTER_ENABLED"
devices:
- "/dev/fuse:/dev/fuse"
security_opt:
- "label=disable"
environment:
OMERO_HOST: omeroserver
OMERO_USER: ${OMERO_IMPORTER_USER}
OMERO_PASSWORD: ${OMERO_ROOT_PASSWORD}
OMERO_PORT: ${OMERO_PORT}
INGEST_TRACKING_DB_URL: postgresql+psycopg2://${BIOMERO_POSTGRES_USER}:${BIOMERO_POSTGRES_PASSWORD}@database-biomero:5432/${BIOMERO_POSTGRES_DB}
ADI_RUN_MIGRATIONS: ${ADI_RUN_MIGRATIONS}
networks:
- omero
volumes:
- "omero:/OMERO"
- "./web/L-Drive:/data"
- "tus-destination:/tus_destination"
- "./config/biomero-importer:/auto-importer/config:ro"
- "./logs/biomero-importer:/auto-importer/logs"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
user: "${OMERO_CONTAINER_USER}"
# Define the network(s) to communicate between containers
networks:
omero:
# Define the named volume(s) to persist data to the host computer
# Mount restored data to the named volumes with external: true and name: <volume_name>
volumes:
database:
# external: true
# name: nl-biomero_database16 # If you upgraded from 11 to 16, use the restored db name here
database-biomero:
# external: true
# name: biomero-2025-07-24-14-06-06-pg16 # Restored data
omero:
# external: true
# name: omero-server-2025-07-29_12-09-40-UTC # Restored data
tus-destination: