Skip to content

Commit

Permalink
rename SERVICE_DIR to SERVICE_FILES_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
antonovchtd committed Nov 25, 2022
1 parent 38969da commit 361aca6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ARG APP_ROOT_DIR=$DEPLOYMENT_DIR/$APP_ROOT_NAME
ARG APP_SERVER_DIR=/opt/$APP_ROOT_NAME/AppServer
ARG APP_NAME_MASK=wsc_app*
ARG USER_NAME=wsc
ARG SERVICE_DIR=/var/lib
ARG SERVICE_FILES_DIR=/var/lib
ARG USER_ID=2000
ARG GROUP_ID=2000

Expand Down Expand Up @@ -65,7 +65,7 @@ ENV VIRTUAL_DIR=${VIRTUAL_DIR}
ENV WEB_SERVER_TYPE=2
ENV ACTIVATE_LICENSE=${ACTIVATE_LICENSE}
ENV LICENSE_TICKET_ID=${LICENSE_TICKET_ID}
ENV SERVICE_DIR=${SERVICE_DIR}
ENV SERVICE_FILES_DIR=${SERVICE_FILES_DIR}
ENV RESTART_WEB_SERVER=1
ENV CERT_DIR=${CERT_DIR}
ENV CERT_KEY_NAME=${CERT_KEY_NAME}
Expand All @@ -89,7 +89,7 @@ RUN groupadd --gid ${GROUP_ID} $USER_NAME && useradd --no-log-init --uid ${USER_

RUN mkdir -p $CUSTOM_DICTIONARIES_DIR \
$USER_DICTIONARIES_DIR \
$SERVICE_DIR/wsc \
$SERVICE_FILES_DIR/wsc \
/var/run/nginx

COPY $FILES_DIR/$APP_NAME_MASK $DEPLOYMENT_DIR/
Expand All @@ -102,7 +102,7 @@ RUN tar -xvf $DEPLOYMENT_DIR/$APP_NAME_MASK -C $DEPLOYMENT_DIR/ && \
ln -s /dev/stdout $APP_SERVER_DIR/Logs/Child-0.log && \
ln -s /dev/stdout $APP_SERVER_DIR/Logs/Child-1.log && \
ln -s /dev/stdout $APP_SERVER_DIR/Logs/Action.log && \
chown -R ${USER_ID}:${GROUP_ID} $SERVICE_DIR/wsc $DICTIONARIES_DIR $APP_SERVER_DIR
chown -R ${USER_ID}:${GROUP_ID} $SERVICE_FILES_DIR/wsc $DICTIONARIES_DIR $APP_SERVER_DIR

COPY $FILES_DIR/certificate/$CERT_KEY_NAME $CERT_DIR/$CERT_KEY_NAME
COPY $FILES_DIR/certificate/$CERT_FILE_NAME $CERT_DIR/$CERT_FILE_NAME
Expand Down
8 changes: 4 additions & 4 deletions DockerfileCentOS
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ARG APP_ROOT_DIR=$DEPLOYMENT_DIR/$APP_ROOT_NAME
ARG APP_SERVER_DIR=/opt/$APP_ROOT_NAME/AppServer
ARG APP_NAME_MASK=wsc_app*
ARG USER_NAME=wsc
ARG SERVICE_DIR=/var/lib
ARG SERVICE_FILES_DIR=/var/lib
ARG USER_ID=2000
ARG GROUP_ID=2000

Expand Down Expand Up @@ -63,7 +63,7 @@ ENV VIRTUAL_DIR=${VIRTUAL_DIR}
ENV WEB_SERVER_TYPE=2
ENV ACTIVATE_LICENSE=${ACTIVATE_LICENSE}
ENV LICENSE_TICKET_ID=${LICENSE_TICKET_ID}
ENV SERVICE_DIR=${SERVICE_DIR}
ENV SERVICE_FILES_DIR=${SERVICE_FILES_DIR}
ENV RESTART_WEB_SERVER=1
ENV CERT_DIR=${CERT_DIR}
ENV CERT_KEY_NAME=${CERT_KEY_NAME}
Expand Down Expand Up @@ -95,7 +95,7 @@ RUN groupadd --gid ${GROUP_ID} $USER_NAME && useradd --no-log-init --uid ${USER_

RUN mkdir -p $CUSTOM_DICTIONARIES_DIR \
$USER_DICTIONARIES_DIR \
$SERVICE_DIR/wsc \
$SERVICE_FILES_DIR/wsc \
$APP_SERVER_DIR \
/var/run/nginx

Expand All @@ -109,7 +109,7 @@ RUN tar -xvf $DEPLOYMENT_DIR/$APP_NAME_MASK -C $DEPLOYMENT_DIR/ && \
ln -s /dev/stdout $APP_SERVER_DIR/Logs/Child-0.log && \
ln -s /dev/stdout $APP_SERVER_DIR/Logs/Child-1.log && \
ln -s /dev/stdout $APP_SERVER_DIR/Logs/Action.log && \
chown -R ${USER_ID}:${GROUP_ID} $SERVICE_DIR/wsc $DICTIONARIES_DIR $APP_SERVER_DIR
chown -R ${USER_ID}:${GROUP_ID} $SERVICE_FILES_DIR/wsc $DICTIONARIES_DIR $APP_SERVER_DIR

COPY $FILES_DIR/certificate/$CERT_KEY_NAME $CERT_DIR/$CERT_KEY_NAME
COPY $FILES_DIR/certificate/$CERT_FILE_NAME $CERT_DIR/$CERT_FILE_NAME
Expand Down
8 changes: 4 additions & 4 deletions DockerfileRedHat
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ARG APP_ROOT_DIR=$DEPLOYMENT_DIR/$APP_ROOT_NAME
ARG APP_SERVER_DIR=/opt/$APP_ROOT_NAME/AppServer
ARG APP_NAME_MASK=wsc_app*
ARG USER_NAME=wsc
ARG SERVICE_DIR=/var/lib
ARG SERVICE_FILES_DIR=/var/lib
ARG USER_ID=2000
ARG GROUP_ID=2000

Expand Down Expand Up @@ -63,7 +63,7 @@ ENV VIRTUAL_DIR=${VIRTUAL_DIR}
ENV WEB_SERVER_TYPE=2
ENV ACTIVATE_LICENSE=${ACTIVATE_LICENSE}
ENV LICENSE_TICKET_ID=${LICENSE_TICKET_ID}
ENV SERVICE_DIR=${SERVICE_DIR}
ENV SERVICE_FILES_DIR=${SERVICE_FILES_DIR}
ENV RESTART_WEB_SERVER=1
ENV CERT_DIR=${CERT_DIR}
ENV CERT_KEY_NAME=${CERT_KEY_NAME}
Expand Down Expand Up @@ -94,7 +94,7 @@ RUN groupadd --gid ${GROUP_ID} $USER_NAME && useradd --no-log-init --uid ${USER_

RUN mkdir -p $CUSTOM_DICTIONARIES_DIR \
$USER_DICTIONARIES_DIR \
$SERVICE_DIR/wsc \
$SERVICE_FILES_DIR/wsc \
$APP_SERVER_DIR \
/var/run/nginx

Expand All @@ -108,7 +108,7 @@ RUN tar -xvf $DEPLOYMENT_DIR/$APP_NAME_MASK -C $DEPLOYMENT_DIR/ && \
ln -s /dev/stdout $APP_SERVER_DIR/Logs/Child-0.log && \
ln -s /dev/stdout $APP_SERVER_DIR/Logs/Child-1.log && \
ln -s /dev/stdout $APP_SERVER_DIR/Logs/Action.log && \
chown -R ${USER_ID}:${GROUP_ID} $SERVICE_DIR/wsc $DICTIONARIES_DIR $APP_SERVER_DIR
chown -R ${USER_ID}:${GROUP_ID} $SERVICE_FILES_DIR/wsc $DICTIONARIES_DIR $APP_SERVER_DIR

COPY $FILES_DIR/certificate/$CERT_KEY_NAME $CERT_DIR/$CERT_KEY_NAME
COPY $FILES_DIR/certificate/$CERT_FILE_NAME $CERT_DIR/$CERT_FILE_NAME
Expand Down
2 changes: 1 addition & 1 deletion files/configureFiles.pl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ sub configureSsl
sub configureAppServerParams
{
replaceFileContent('<Size>\d*</Size>', '<Size>0</Size>', $server_config_path);
replaceFileContent('</ServiceName>', "</ServiceName>\n <PathToServiceFilesDirectory>$ENV{'SERVICE_DIR'}</PathToServiceFilesDirectory>", $server_config_path);
replaceFileContent('</ServiceName>', "</ServiceName>\n <PathToServiceFilesDirectory>$ENV{'SERVICE_FILES_DIR'}</PathToServiceFilesDirectory>", $server_config_path);
}

sub replaceFileContent
Expand Down
2 changes: 1 addition & 1 deletion files/startService.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ perl configureWebServer.pl
perl configureFiles.pl

# activate a license automatically
LicenseFile="${SERVICE_DIR}/wsc/license/license.xml"
LicenseFile="${SERVICE_FILES_DIR}/wsc/license/license.xml"
if ! [ -f "${LicenseFile}" ]; then
./AppServerX -activateLicense ${LICENSE_TICKET_ID} -y
fi
Expand Down

0 comments on commit 361aca6

Please sign in to comment.