-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
executable file
·21 lines (17 loc) · 1.11 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
set -eu
OMEROHOST=${OMEROHOST:-omero}
REDISHOST=${REDISHOST:-redis}
OMERO_DATA=${OMERO_DATA:-/OMERO}
DBHOST=${DBHOST:-db}
DBNAME=${DBNAME:-postgres}
DBUSER=${DBUSER:-postgres}
DBPASSWORD=${DBPASSWORD:-postgres}
sed -i -re "s/(\"uri\":\s*\"redis:\/\/).*(@).*(:6379\/0\")/\1$REDIS_PASSWORD\2$REDISHOST\3/" /opt/omero/ms/omero-ms-pixel-buffer/conf.json
sed -i -re "s/(\"host\":\s*\").*(\")/\1$OMEROHOST\2/" /opt/omero/ms/omero-ms-pixel-buffer/conf.json
sed -i -re "s#(\"omero\.data\.dir\":\s*\").*(\")#\1$OMERO_DATA\2#" /opt/omero/ms/omero-ms-pixel-buffer/conf.json
sed -i -re "s/(\"omero\.db\.host\":\s*\").*(\")/\1$DBHOST\2/" /opt/omero/ms/omero-ms-pixel-buffer/conf.json
sed -i -re "s/(\"omero\.db\.name\":\s*\").*(\")/\1$DBNAME\2/" /opt/omero/ms/omero-ms-pixel-buffer/conf.json
sed -i -re "s/(\"omero\.db\.user\":\s*\").*(\")/\1$DBUSER\2/" /opt/omero/ms/omero-ms-pixel-buffer/conf.json
sed -i -re "s/(\"omero\.db\.pass\":\s*\").*(\")/\1$DBPASSWORD\2/" /opt/omero/ms/omero-ms-pixel-buffer/conf.json
/opt/omero/ms/omero-ms-pixel-buffer/bin/omero-ms-pixel-buffer -conf /opt/omero/ms/omero-ms-pixel-buffer/conf.json