mirror of
https://github.com/bitnami/containers.git
synced 2026-03-15 06:48:04 +08:00
configure wildfly as a s6 service
This commit is contained in:
@@ -4,7 +4,8 @@ MAINTAINER Bitnami <containers@bitnami.com>
|
||||
ENV BITNAMI_APP_DIR=$BITNAMI_PREFIX/wildfly \
|
||||
BITNAMI_APP_NAME=wildfly \
|
||||
BITNAMI_APP_USER=wildfly \
|
||||
BITNAMI_APP_VERSION=9.0.1-0
|
||||
BITNAMI_APP_VERSION=9.0.1-0 \
|
||||
BITNAMI_APP_DAEMON=standalone.sh
|
||||
|
||||
ENV BITNAMI_APP_VOL_PREFIX=/bitnami/$BITNAMI_APP_NAME \
|
||||
JAVA_HOME=$BITNAMI_PREFIX/java \
|
||||
@@ -20,4 +21,3 @@ EXPOSE 8080 9990
|
||||
VOLUME ["$BITNAMI_APP_VOL_PREFIX/conf", "$BITNAMI_APP_VOL_PREFIX/logs", "/app"]
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["standalone.sh"]
|
||||
|
||||
@@ -1,36 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
source $BITNAMI_PREFIX/bitnami-utils.sh
|
||||
|
||||
print_welcome_page
|
||||
|
||||
# if command starts with an option, prepend 'standalone.sh'
|
||||
if [ "${1:0:1}" = '-' ]; then
|
||||
EXTRA_OPTIONS="$@"
|
||||
set -- standalone.sh
|
||||
export EXTRA_OPTIONS="$@"
|
||||
set --
|
||||
elif [ "${1}" == "standalone.sh" -o "${1}" == "$(which standalone.sh)" ]; then
|
||||
export EXTRA_OPTIONS="${@:2}"
|
||||
set --
|
||||
elif [ "${1}" == "domain.sh" -o "${1}" == "$(which domain.sh)" ]; then
|
||||
export BITNAMI_APP_DAEMON=domain.sh
|
||||
export EXTRA_OPTIONS="${@:2}"
|
||||
set --
|
||||
fi
|
||||
|
||||
if [ ! "$(ls -A $BITNAMI_APP_VOL_PREFIX/conf)" ]; then
|
||||
generate_conf_files
|
||||
|
||||
if [ "$WILDFLY_PASSWORD" ]; then
|
||||
echo ""
|
||||
echo "Setting manager password..."
|
||||
add-user.sh -u manager -p $WILDFLY_PASSWORD -r ManagementRealm
|
||||
fi
|
||||
print_app_credentials $BITNAMI_APP_NAME manager `print_wildfly_password`
|
||||
else
|
||||
print_container_already_initialized $BITNAMI_APP_NAME
|
||||
fi
|
||||
|
||||
chown -R $BITNAMI_APP_USER:$BITNAMI_APP_USER $BITNAMI_APP_VOL_PREFIX/conf/ $BITNAMI_APP_VOL_PREFIX/logs/ /app/ || true
|
||||
|
||||
if [ "$1" = 'standalone.sh' -o "$1" = 'domain.sh' ]; then
|
||||
set -- $@ $PROGRAM_OPTIONS $EXTRA_OPTIONS
|
||||
|
||||
initialize_wildfly_deployments_directory
|
||||
|
||||
exec gosu $BITNAMI_APP_USER "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
exec /init "$@"
|
||||
|
||||
22
bitnami/wildfly/rootfs/etc/cont-init.d/01-bitnami-wildfly
Executable file
22
bitnami/wildfly/rootfs/etc/cont-init.d/01-bitnami-wildfly
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
set -e
|
||||
source $BITNAMI_PREFIX/bitnami-utils.sh
|
||||
|
||||
print_welcome_page
|
||||
|
||||
if [ ! "$(ls -A $BITNAMI_APP_VOL_PREFIX/conf)" ]; then
|
||||
generate_conf_files
|
||||
|
||||
if [ "$WILDFLY_PASSWORD" ]; then
|
||||
echo ""
|
||||
echo "Setting manager password..."
|
||||
add-user.sh -u manager -p $WILDFLY_PASSWORD -r ManagementRealm
|
||||
fi
|
||||
print_app_credentials $BITNAMI_APP_NAME manager `print_wildfly_password`
|
||||
else
|
||||
print_container_already_initialized $BITNAMI_APP_NAME
|
||||
fi
|
||||
|
||||
initialize_wildfly_deployments_directory
|
||||
|
||||
chown -R $BITNAMI_APP_USER:$BITNAMI_APP_USER $BITNAMI_APP_VOL_PREFIX/conf/ $BITNAMI_APP_VOL_PREFIX/logs/ /app/ || true
|
||||
1
bitnami/wildfly/rootfs/etc/services.d/wildfly/finish
Symbolic link
1
bitnami/wildfly/rootfs/etc/services.d/wildfly/finish
Symbolic link
@@ -0,0 +1 @@
|
||||
/bin/true
|
||||
5
bitnami/wildfly/rootfs/etc/services.d/wildfly/run
Executable file
5
bitnami/wildfly/rootfs/etc/services.d/wildfly/run
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
set -e
|
||||
source $BITNAMI_PREFIX/bitnami-utils.sh
|
||||
|
||||
exec s6-setuidgid $BITNAMI_APP_USER $BITNAMI_APP_DAEMON $PROGRAM_OPTIONS ${EXTRA_OPTIONS:+"$EXTRA_OPTIONS"}
|
||||
Reference in New Issue
Block a user