fgreg closed pull request #8: SDAP-65 ningesterpy output not printing in docker
logs
URL: https://github.com/apache/incubator-sdap-ningester/pull/8
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 250efc0..ae80a4c 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -13,12 +13,19 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-set -e
+set -eb
NINGESTER_JAR=`find ningester/build/libs -name ningester*.jar`
CONFIG_FILES=`find /config -name "*.yml" | awk -vORS=, '{ print $1 }'`
GRANULE=`find /data -type f -print -quit`
-python -m sdap.ningesterpy 2>&1 | sed "s/^/[ningesterpy] /" &
+echo "Launching ningesterpy. Logs from this process will be prefixed with
[ningesterpy]"
+python -u -m sdap.ningesterpy 2>&1 | stdbuf -o0 sed -e 's/^/[ningesterpy] /' &
+
+until $(curl --output /dev/null --silent --head --fail
http://127.0.0.1:5000/healthcheck); do
+ sleep 1
+done
+
+echo "Launching ningester. Logs from this process will be prefixed with
[ningester]"
+java -Dspring.profiles.active=$1
-Dspring.config.location=classpath:/application.yml,${CONFIG_FILES} -jar
${NINGESTER_JAR} granule=file://${GRANULE} ${@:2} 2>&1 | sed -e
's/^/[ningester] /'
-java -Dspring.profiles.active=$1
-Dspring.config.location=classpath:/application.yml,${CONFIG_FILES} -jar
${NINGESTER_JAR} granule=file://${GRANULE} ${@:2} | sed "s/^/[ningester] /"
\ No newline at end of file
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services