Add docker log head

Summary: Should now display some of the docker logs if there are some errors

Test Plan: run the script

Reviewers: #reviewers

Differential Revision: https://hub.sealcode.org/D1072
master
Kuba Orlik 4 years ago
parent 5712fb0c4f
commit 3342cc8ce5

@ -15,7 +15,7 @@ docker-compose up -d db
rm -f log.txt
docker-compose run --user="$UID"\
CONTAINER=$(docker-compose run --user="$UID"\
-e "SEALIOUS_MONGO_PORT=27017" \
-e "SEALIOUS_MONGO_HOST=db" \
-e "SEALIOUS_PORT=$SEALIOUS_PORT" \
@ -23,5 +23,14 @@ docker-compose run --user="$UID"\
-p ${SEALIOUS_PORT}:${SEALIOUS_PORT} \
-d \
test \
/bin/sh -c "{ node . --color 2>&1; } | ./node_modules/.bin/ansi-html-stream > log.html" \
&& echo "App started on $SEALIOUS_PORT"
/bin/sh -c "{ node . --color 2>&1; } | ./node_modules/.bin/ansi-html-stream > log.html")
echo "App started on $SEALIOUS_PORT"
echo "App running in container $CONTAINER"
sleep 1
echo "Docker logs so far:"
docker logs "$CONTAINER"

37
package-lock.json generated

@ -16,7 +16,7 @@
"stimulus": "^2.0.0"
},
"devDependencies": {
"@sealcode/ansi-html-stream": "^1.0.0",
"@sealcode/ansi-html-stream": "^1.0.1",
"@types/koa__router": "^8.0.4",
"babel-loader": "^8.2.2",
"concurrently": "^5.3.0",
@ -422,10 +422,13 @@
}
},
"node_modules/@sealcode/ansi-html-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@sealcode/ansi-html-stream/-/ansi-html-stream-1.0.0.tgz",
"integrity": "sha512-OrEbze90s1bpJFiblMiMRHsVLGK4aO3f3Nzzw9HnER28igdLKZ+OSf3bu3Y19LLmCjGrVX5do5SXcrYGPKQ7VQ==",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@sealcode/ansi-html-stream/-/ansi-html-stream-1.0.1.tgz",
"integrity": "sha512-J5KyrLxzLtu4CcGkqXsLtqKMbKCp4LeOnXDYNI1mk1WaQYrMgczg7d9yngo2XabDFcs1yVqs7SZzdBRxWN9BEg==",
"dev": true,
"dependencies": {
"ansi_up": "^5.0.1"
},
"bin": {
"ansi-html-stream": "index.js"
}
@ -1389,6 +1392,15 @@
"ajv": "^6.9.1"
}
},
"node_modules/ansi_up": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi_up/-/ansi_up-5.0.1.tgz",
"integrity": "sha512-HGOTjFQECRKZM9fIlGhJfR2pcK8PMUWzFOqcPwqBEnNIa4P2r0Di+g2hxCX0hL0n1NUtAHGRA+fUyA/OajZYFw==",
"dev": true,
"engines": {
"node": "*"
}
},
"node_modules/ansi-align": {
"version": "3.0.0",
"license": "ISC",
@ -9389,10 +9401,13 @@
}
},
"@sealcode/ansi-html-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@sealcode/ansi-html-stream/-/ansi-html-stream-1.0.0.tgz",
"integrity": "sha512-OrEbze90s1bpJFiblMiMRHsVLGK4aO3f3Nzzw9HnER28igdLKZ+OSf3bu3Y19LLmCjGrVX5do5SXcrYGPKQ7VQ==",
"dev": true
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@sealcode/ansi-html-stream/-/ansi-html-stream-1.0.1.tgz",
"integrity": "sha512-J5KyrLxzLtu4CcGkqXsLtqKMbKCp4LeOnXDYNI1mk1WaQYrMgczg7d9yngo2XabDFcs1yVqs7SZzdBRxWN9BEg==",
"dev": true,
"requires": {
"ansi_up": "^5.0.1"
}
},
"@sindresorhus/is": {
"version": "0.14.0"
@ -10037,6 +10052,12 @@
"dev": true,
"requires": {}
},
"ansi_up": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi_up/-/ansi_up-5.0.1.tgz",
"integrity": "sha512-HGOTjFQECRKZM9fIlGhJfR2pcK8PMUWzFOqcPwqBEnNIa4P2r0Di+g2hxCX0hL0n1NUtAHGRA+fUyA/OajZYFw==",
"dev": true
},
"ansi-align": {
"version": "3.0.0",
"requires": {

Loading…
Cancel
Save