diff --git a/Dockerfile b/Dockerfile index a0e2194..f8df815 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM denoland/deno:1.43.3 EXPOSE 4036 WORKDIR /app -RUN mkdir -p data/policy && chown -R deno data +RUN mkdir -p data && chown -R deno data USER deno COPY . . RUN deno cache src/server.ts diff --git a/data/.gitignore b/data/.gitignore index 3c46d84..c96a04f 100644 --- a/data/.gitignore +++ b/data/.gitignore @@ -1,3 +1,2 @@ * -!.gitignore -!/policy \ No newline at end of file +!.gitignore \ No newline at end of file diff --git a/data/policy/.gitignore b/data/policy/.gitignore deleted file mode 100644 index c96a04f..0000000 --- a/data/policy/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/src/workers/policy.ts b/src/workers/policy.ts index 3cc03c9..e392667 100644 --- a/src/workers/policy.ts +++ b/src/workers/policy.ts @@ -3,8 +3,6 @@ import * as Comlink from 'comlink'; import { Conf } from '@/config.ts'; import type { CustomPolicy } from '@/workers/policy.worker.ts'; -const policyDir = new URL('../../data/policy', import.meta.url).pathname; - export const policyWorker = Comlink.wrap( new Worker( new URL('./policy.worker.ts', import.meta.url), @@ -12,8 +10,8 @@ export const policyWorker = Comlink.wrap( type: 'module', deno: { permissions: { - read: [Conf.policy, policyDir], - write: [policyDir], + read: [Conf.policy], + write: false, net: 'inherit', env: false, },