Skip to content

Commit da69397

Browse files
committed
Start inception from shell and pass on basic settings.properties
1 parent 5de8f52 commit da69397

File tree

3 files changed

+68
-5
lines changed

3 files changed

+68
-5
lines changed

inception/Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COPY --from=minio /usr/bin/curl* /usr/bin/
1515
COPY --from=minio /licenses/CREDITS /licenses/CREDITS
1616
COPY --from=minio /licenses/LICENSE /licenses/LICENSE
1717

18-
COPY --from=minio /usr/bin/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
18+
#COPY --from=minio /usr/bin/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
1919

2020
#ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
2121
EXPOSE 9900
@@ -33,17 +33,24 @@ ENV MINIO_BROWSER_REDIRECT_URL=
3333
## Inception
3434
##
3535
EXPOSE 8080
36+
ARG INCEPTION_HOST=http://localhost:8080
37+
ARG INCEPTION_USERNAME="admin"
38+
ARG INCEPTION_PASSWORD="provide-supersecret-key"
39+
ENV INCEPTION_HOST=${INCEPTION_HOST}
40+
ENV INCEPTION_USERNAME=${INCEPTION_USERNAME}
41+
ENV INCEPTION_PASSWORD=${INCEPTION_PASSWORD}
3642

3743
##
3844
## Combine Minio + Inception with supervisord
3945
##
4046
RUN set -ex \
4147
&& DEBIAN_FRONTEND=noninteractive \
4248
&& apt-get update \
43-
&& apt-get install -y supervisor
49+
&& apt-get install -y supervisor \
50+
&& apt-get install -y apache2-utils
4451

4552
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
46-
#COPY start_minio.sh /usr/bin/start_minio.sh
53+
COPY start_minio.sh /usr/bin/start_minio.sh
54+
COPY start_inception.sh /usr/bin/start_inception.sh
4755

48-
#CMD ["/usr/bin/supervisord", "--version"]
4956
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

inception/start_inception.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#! /bin/bash
2+
3+
echo "------- Environment variables / Password encryption ------"
4+
#env
5+
export INCEPTION_PASSWORD=$(htpasswd -bnBC 10 "" $INCEPTION_PASSWORD | tr -d ':\n')
6+
echo $INCEPTION_PASSWORD;
7+
8+
echo "------- Defining inception properties ------"
9+
cat << \EOF | tee /export/settings.properties
10+
##
11+
## Login of admin
12+
##
13+
#security.default-admin-username=INCEPTION_USERNAME
14+
#security.default-admin-password=INCEPTION_PASSWORD
15+
security.default-admin-remote-access=true
16+
remote-api.enabled=true
17+
##
18+
## Hosted at /inception
19+
##
20+
server.servlet.context-path=/inception
21+
sharing.invites.enabled=true
22+
sharing.invites.invite-base-url=INCEPTION_HOST
23+
wicket.core.csrf.enabled=false
24+
##
25+
## Backup
26+
## - Every 5 minutes
27+
## - Delete annotation backups older than 30 days (60 * 60 * 24 * 30 = 30 days)
28+
backup.interval=300
29+
backup.keep.time=2592000
30+
backup.keep.number=10
31+
##
32+
## Connection to the database with Inception metadata
33+
##
34+
useSSL=false
35+
allowPublicKeyRetrieval=true
36+
serverTimezone=UTC
37+
##
38+
## UI elements
39+
##
40+
annotation.default-preferences.page-size=2000
41+
websocket.enabled=true
42+
##
43+
## Disable some warnings
44+
##
45+
telemetry.auto-respond=REJECT
46+
warnings.embeddedDatabase=false
47+
EOF
48+
#sed -i 's/INCEPTION_USERNAME/'"$INCEPTION_USERNAME"'/g' /export/settings.properties
49+
#sed -i 's/INCEPTION_PASSWORD/{bcrypt}'"$INCEPTION_PASSWORD"'/g' /export/settings.properties
50+
sed -i 's/INCEPTION_HOST/'"$INCEPTION_HOST"'/g' /export/settings.properties
51+
cat /export/settings.properties
52+
53+
echo "------- Launching Inception ------"
54+
java "-Xmx750m" -Djava.awt.headless=true -Dinception.home=/export -jar inception-app-standalone.jar

inception/supervisord.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ stdout_logfile_maxbytes=0
1818
redirect_stderr=true
1919
autostart=true
2020
autorestart=true
21+
command=/usr/bin/start_inception.sh
22+
environment=INCEPTION_USERNAME="%(ENV_INCEPTION_USERNAME)s",INCEPTION_PASSWORD="%(ENV_INCEPTION_PASSWORD)s"
2123
#command=/opt/inception/launch.sh java "-Xmx750m" -Djava.awt.headless=true -Dinception.home=/export -jar inception-app-standalone.jar ${INCEPTION_ARGUMENTS}
22-
command=java "-Xmx750m" -Djava.awt.headless=true -Dinception.home=/export -jar inception-app-standalone.jar
24+
#command=java "-Xmx750m" -Djava.awt.headless=true -Dinception.home=/export -jar inception-app-standalone.jar

0 commit comments

Comments
 (0)