aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-15 22:52:35 +0900
committernsfisis <nsfisis@gmail.com>2025-03-15 22:52:35 +0900
commitf9f5b7b5c51b2141540f4b5d96c357c9de1d010f (patch)
tree37a023d718a75aec7f8512182cfb5d43995f1fe6
parent6fe42b8840fd3508615e022cc65dad28a335abcd (diff)
downloadiosdc-japan-2025-albatross-f9f5b7b5c51b2141540f4b5d96c357c9de1d010f.tar.gz
iosdc-japan-2025-albatross-f9f5b7b5c51b2141540f4b5d96c357c9de1d010f.tar.zst
iosdc-japan-2025-albatross-f9f5b7b5c51b2141540f4b5d96c357c9de1d010f.zip
feat(worker): disable error reporting for E_WARNING, E_NOTICE and E_DEPRECATED
-rw-r--r--worker/Dockerfile4
-rw-r--r--worker/exec.mjs2
2 files changed, 5 insertions, 1 deletions
diff --git a/worker/Dockerfile b/worker/Dockerfile
index e633e53..18e715b 100644
--- a/worker/Dockerfile
+++ b/worker/Dockerfile
@@ -72,9 +72,11 @@ WORKDIR /app
ENV NODE_ENV=production
COPY --from=wasm-builder /src/php-wasm.js /src/php-wasm.wasm /app/
-COPY index.mjs exec.mjs package.json package-lock.json /app/
+COPY package.json package-lock.json /app/
RUN npm install
+COPY index.mjs exec.mjs /app/
+
ENTRYPOINT ["node", "index.mjs"]
EXPOSE 80
diff --git a/worker/exec.mjs b/worker/exec.mjs
index fc0accd..81dba8b 100644
--- a/worker/exec.mjs
+++ b/worker/exec.mjs
@@ -6,6 +6,8 @@ process.once("message", async ({ code: originalCode, input }) => {
define('STDOUT', fopen('php://stdout', 'r'));
define('STDERR', fopen('php://stderr', 'r'));
+ error_reporting(E_ALL & ~E_WARNING & ~E_NOTICE & ~E_DEPRECATED);
+
`;
// remove php tag