diff options
author | startxfr <clarue@startx.fr> | 2015-12-06 16:41:23 +0100 |
---|---|---|
committer | startxfr <clarue@startx.fr> | 2015-12-06 16:41:23 +0100 |
commit | 7fe1c9cf9f114d40fe3f534a3902f3dff73c602f (patch) | |
tree | 5d40c66b09a9eddab90ee209a71aa37eaed787cf /Services/apache | |
parent | 6fc395ce332cf2565705b3a36bceaaa6f3948417 (diff) | |
download | phpmyadmin-7fe1c9cf9f114d40fe3f534a3902f3dff73c602f.tar.gz phpmyadmin-7fe1c9cf9f114d40fe3f534a3902f3dff73c602f.tar.bz2 phpmyadmin-7fe1c9cf9f114d40fe3f534a3902f3dff73c602f.tar.xz phpmyadmin-7fe1c9cf9f114d40fe3f534a3902f3dff73c602f.zip |
correcting bug and improve startup display
Diffstat (limited to 'Services/apache')
-rw-r--r-- | Services/apache/Dockerfile | 12 | ||||
-rw-r--r-- | Services/apache/httpd.conf | 1 | ||||
-rw-r--r-- | Services/apache/sx-httpd.sh | 11 |
3 files changed, 18 insertions, 6 deletions
diff --git a/Services/apache/Dockerfile b/Services/apache/Dockerfile index 620add6..9682a0a 100644 --- a/Services/apache/Dockerfile +++ b/Services/apache/Dockerfile @@ -6,20 +6,22 @@ RUN dnf -y install httpd && \ dnf clean all ENV HTTPDCONF=/etc/httpd/conf.d/app.conf \ STARTUPLOG=/data/logs/apache/startup.log \ - LOG_PATH=/data/logs/apache \ - APP_PATH=/data/apache + LOG_PATH=/data/logs/apache \ + APP_PATH=/data/apache \ + TMP_APP_PATH=/tmp/apache COPY httpd.conf $HTTPDCONF COPY *.sh /bin/ RUN chmod 775 /bin/run.sh /bin/sx-httpd.sh && \ chmod ug+r $HTTPDCONF && \ rm -f /etc/httpd/conf.d/autoindex.conf && \ rm -f /etc/httpd/conf.d/welcome.conf && \ + mkdir -p $TMP_APP_PATH && \ mkdir -p $APP_PATH && \ mkdir -p $LOG_PATH && \ touch $STARTUPLOG -COPY ./ $APP_PATH -RUN rm -f $APP_PATH/Dockerfile $APP_PATH/httpd.conf $APP_PATH/run.sh $APP_PATH/sx-httpd.sh && \ - chown -R apache:apache $APP_PATH $LOG_PATH +COPY ./ $TMP_APP_PATH +RUN rm -f $TMP_APP_PATH/Dockerfile $TMP_APP_PATH/httpd.conf $TMP_APP_PATH/run.sh $TMP_APP_PATH/sx-httpd.sh && \ + chown -R apache:apache $TMP_APP_PATH $APP_PATH $LOG_PATH EXPOSE 80 443 VOLUME [$APP_PATH,$LOG_PATH] diff --git a/Services/apache/httpd.conf b/Services/apache/httpd.conf index 2f9d2fc..97672b4 100644 --- a/Services/apache/httpd.conf +++ b/Services/apache/httpd.conf @@ -10,7 +10,6 @@ ErrorLog ${LOG_PATH}/error.log CustomLog ${LOG_PATH}/access.log combined </IfModule> -Alias / ${APP_PATH} <Directory ${APP_PATH}> AddDefaultCharset UTF-8 AllowOverride All diff --git a/Services/apache/sx-httpd.sh b/Services/apache/sx-httpd.sh index 2b7581d..0344f1e 100644 --- a/Services/apache/sx-httpd.sh +++ b/Services/apache/sx-httpd.sh @@ -50,6 +50,17 @@ function display_container_httpd_header { # and start generating host keys function begin_config { echo "=> BEGIN APACHE CONFIGURATION" + if [[ -d $TMP_APP_PATH ]]; then + if [ "$(ls -A $TMP_APP_PATH)" ]; then + echo "COPY application from $TMP_APP_PATH into $APP_PATH" + FILE_LIST=$(find $TMP_APP_PATH -maxdepth 1 -mindepth 1 -printf "%f\n") + for FILE in $FILE_LIST; do + echo -n "adding $APP_PATH/$FILE" + cp -r $TMP_APP_PATH/$FILE $APP_PATH/ + echo " DONE" + done + fi + fi } # End configuration process just before starting daemon |