forked from ls1intum/Artemis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
33 lines (28 loc) · 1.09 KB
/
bootstrap.sh
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
#!/bin/bash
# Entrypoint file for Docker Images of Artemis. The deployment of the application is set to /opt/artemis
cd /opt/artemis || exit 1
if [ -z "$(ls -A config)" ]; then
echo "Config is Empty .. copying default ones .."
cp -n -a /defaults/artemis/. config/
else
echo "Config is not empty .. not copying default configs .."
fi
# Ensure at least the directories are owned by artemis. "-R" takes too long
chown artemis:artemis config data
echo "Starting application..."
exec gosu artemis java \
-Djdk.tls.ephemeralDHKeySize=2048 \
-DLC_CTYPE=UTF-8 \
-Dfile.encoding=UTF-8 \
-Dsun.jnu.encoding=UTF-8 \
-Djava.security.egd=file:/dev/./urandom \
-Xmx2048m \
--add-modules java.se \
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED \
--add-exports java.naming/com.sun.jndi.ldap=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.nio=ALL-UNNAMED \
--add-opens java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens java.management/sun.management=ALL-UNNAMED \
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED \
-jar Artemis.war