fix: module '@keyv/sqlite' is not loaded when build

This commit is contained in:
Rafi
2023-02-11 19:59:42 +08:00
parent e0aa376210
commit 15f34b8a12
3 changed files with 16 additions and 3 deletions

View File

@@ -10,6 +10,16 @@ COPY . .
RUN yarn build
EXPOSE 3000
ENTRYPOINT ["node", ".output/server/index.mjs"]
FROM node:18-alpine3.16
ENV NITRO_HOST=0.0.0.0
ENV NITRO_PORT=80
WORKDIR /app
COPY --from=builder /app/.output .
EXPOSE 80
ENTRYPOINT ["node", "server/index.mjs"]

View File

@@ -5,4 +5,4 @@ services:
context: .
dockerfile: ./Dockerfile
ports:
- '${APP_PORT:-3000}:3000'
- '${APP_PORT:-80}:80'

View File

@@ -1,4 +1,7 @@
import Keyv from 'keyv'
import KeyvSqlite from "@keyv/sqlite";
const sqlite = new KeyvSqlite()
const cacheOptions = {
namespace: 'settings',