diff --git a/scripts/deploy-via-docker.js b/scripts/deploy-via-docker.js index 418949a..d8df796 100644 --- a/scripts/deploy-via-docker.js +++ b/scripts/deploy-via-docker.js @@ -80,11 +80,17 @@ async function main() { Cmd: [ 'sh', '-c', - `set -e; ` + - `rm -rf ${HOST_STATIC}/front && ` + - `mkdir -p ${HOST_STATIC}/front && ` + - `cp -r ${SRC_IN_HELPER}/. ${HOST_STATIC}/front/ && ` + - `echo "copied"; ls -la ${HOST_STATIC}/front | head`, + // Write diagnostics to the host-mounted dir so we can inspect after the run. + `DBG=${HOST_STATIC}/_debug.txt; ` + + `echo "wsSource=${wsSource}" > $DBG; ` + + `echo "--- ls /src/front/dist/prod ---" >> $DBG; ` + + `ls -la ${SRC_IN_HELPER} >> $DBG 2>&1; ` + + `echo "src file count: $(find ${SRC_IN_HELPER} -type f 2>/dev/null | wc -l)" >> $DBG; ` + + `set -e; ` + + `rm -rf ${HOST_STATIC}/front && mkdir -p ${HOST_STATIC}/front && ` + + `cp -r ${SRC_IN_HELPER}/. ${HOST_STATIC}/front/ 2>> $DBG; ` + + `echo "dest file count: $(find ${HOST_STATIC}/front -type f 2>/dev/null | wc -l)" >> $DBG; ` + + `echo "copied"`, ], };