diff --git a/comanage-registry-internet2-tier/Dockerfile b/comanage-registry-internet2-tier/Dockerfile index 0c56c72..b01f63c 100644 --- a/comanage-registry-internet2-tier/Dockerfile +++ b/comanage-registry-internet2-tier/Dockerfile @@ -128,8 +128,7 @@ RUN mkdir -p "${COMANAGE_REGISTRY_DIR}" \ && cd /var/www/html \ && ln -s ${COMANAGE_REGISTRY_DIR}/app/webroot registry \ && rm -rf ${COMANAGE_REGISTRY_DIR}/local/* \ - && ln -s ${COMANAGE_REGISTRY_DIR}/local /local \ - && sed -ie 's/'"'"'engine'"'"' => '"'"'FileLog'"'"'/'"'"'engine'"'"' => '"'"'ConsoleLog'"'"'/' "$COMANAGE_REGISTRY_DIR/app/Config/bootstrap.php" + && ln -s ${COMANAGE_REGISTRY_DIR}/local /local COPY 000-comanage.conf /etc/httpd/conf.d/ COPY 10-php7.conf /etc/httpd/conf.modules.d/ diff --git a/comanage-registry-internet2-tier/docker-comanage-entrypoint b/comanage-registry-internet2-tier/docker-comanage-entrypoint index 901f4fd..ba378a4 100755 --- a/comanage-registry-internet2-tier/docker-comanage-entrypoint +++ b/comanage-registry-internet2-tier/docker-comanage-entrypoint @@ -281,4 +281,13 @@ fi # Configure Apache HTTP Server with the server name. sed -i -e s@%%SERVER_NAME%%@"${SERVER_NAME:-unknown}"@g /etc/httpd/conf.d/000-comanage.conf +# Create pipes to use for COmanage Registry instead of standard log files. +mkfifo -m 666 /srv/comanage-registry/app/tmp/logs/error.log +mkfifo -m 666 /srv/comanage-registry/app/tmp/logs/debug.log + +# Format any output from COmanange Registry into standard TIER form. +(cat <> /srv/comanage-registry/app/tmp/logs/error.log | awk -v ENV="$ENV" -v UT="$USERTOKEN" '{printf "COmanage Registry error.log %s %s %s\n", ENV, UT, $0; fflush()}' 1>/dev/stdout)& +(cat <> /srv/comanage-registry/app/tmp/logs/debug.log | awk -v ENV="$ENV" -v UT="$USERTOKEN" '{printf "COmanage Registry debug.log %s %s %s\n", ENV, UT, $0; fflush()}' 1>/dev/stdout)& + +# Start Apache HTTP Server exec /usr/sbin/httpd -DFOREGROUND