From 1693e26f1e4e728262695cef1c2b467bf3ce71cd Mon Sep 17 00:00:00 2001 From: Fijxu Date: Sun, 15 Dec 2024 15:24:09 -0300 Subject: [PATCH] test --- Dockerfile | 4 ++-- src/main.ts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 94b4802..3ddcd83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM denoland/deno:debian-2.1.3 AS builder +FROM i.sanxian.tech/denoland/deno:debian-2.1.3 AS builder ARG TINI_VERSION=0.19.0 @@ -16,7 +16,7 @@ RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION RUN deno task compile # Stage for creating the non-privileged user -FROM alpine:3.20 AS user-stage +FROM i.sanxian.tech/alpine:3.20 AS user-stage RUN adduser -u 10001 -S appuser diff --git a/src/main.ts b/src/main.ts index 2b58465..ae94215 100644 --- a/src/main.ts +++ b/src/main.ts @@ -115,8 +115,13 @@ app.use("*", async (c, next) => { routes(app, konfigStore); +const cert = Deno.readTextFileSync("/app/config/cert.pem") +const key = Deno.readTextFileSync("/app/config/key.key") + Deno.serve({ port: Number(Deno.env.get("PORT")) || konfigStore.get("server.port") as number, hostname: Deno.env.get("HOST") || konfigStore.get("server.host") as string, + cert: cert, + key: key, }, app.fetch);