diff --git a/rootfs/usr/local/bin/entrypoint.sh b/rootfs/usr/local/bin/entrypoint.sh index 8a1b559..b814017 100755 --- a/rootfs/usr/local/bin/entrypoint.sh +++ b/rootfs/usr/local/bin/entrypoint.sh @@ -82,10 +82,10 @@ SERVICE_UID="0" # set the user id SERVICE_GID="0" # set the group id # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Primary server port- will be added to server ports -WEB_SERVER_PORT="" # port : 80,443 +WEB_SERVER_PORT="80" # port : 80,443 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Secondary ports -SERVER_PORTS="" # specifiy other ports +SERVER_PORTS="3306" # specifiy other ports # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Server directories WWW_ROOT_DIR="" # set default web dir diff --git a/rootfs/usr/local/etc/docker/init.d/00-mysqld.sh b/rootfs/usr/local/etc/docker/init.d/00-mysqld.sh index d9b1381..219b1b1 100755 --- a/rootfs/usr/local/etc/docker/init.d/00-mysqld.sh +++ b/rootfs/usr/local/etc/docker/init.d/00-mysqld.sh @@ -186,7 +186,7 @@ __run_pre_execute_checks() { # Put command to execute in parentheses { if [ ! -d "$DATABASE_DIR" ] || [ ! -f "$DATABASE_DIR/ibdata1" ]; then - rm -Rf "$DATABASE_DIR" + rm -Rf "${DATABASE_DIR:?}"/* mkdir -p "$DATABASE_DIR" chown -Rf $SERVICE_USER:$SERVICE_GROUP "$DATABASE_DIR" mysql_install_db --datadir=$DATABASE_DIR --user=$SERVICE_USER 2>/dev/null diff --git a/rootfs/usr/local/etc/docker/init.d/05-nginx.sh b/rootfs/usr/local/etc/docker/init.d/05-nginx.sh index 175a27e..8e8ee4d 100755 --- a/rootfs/usr/local/etc/docker/init.d/05-nginx.sh +++ b/rootfs/usr/local/etc/docker/init.d/05-nginx.sh @@ -107,12 +107,12 @@ RUNAS_USER="root" # normally root #SERVICE_GID="0" # set the group id # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # execute command variables - keep single quotes variables will be expanded later -EXEC_CMD_BIN='nginx' # command to execute -EXEC_CMD_ARGS='-c $CONF_DIR/nginx.conf' # command arguments -EXEC_PRE_SCRIPT='' # execute script before +EXEC_CMD_BIN='nginx' # command to execute +EXEC_CMD_ARGS='-c $ETC_DIR/nginx.conf' # command arguments +EXEC_PRE_SCRIPT='' # execute script before # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Is this service a web server -IS_WEB_SERVER="no" +IS_WEB_SERVER="yes" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Is this service a database server IS_DATABASE_SERVICE="no"