Skip to content

Build your personal knowledge base with Trilium Notes

chore(docker): fix missing bindings after refactoring

Elian Doran78c88d797cb9
diff --git a/apps/server/Dockerfile b/apps/server/Dockerfile
index 4c27215045..46df1763b0 100644
--- a/apps/server/Dockerfile
+++ b/apps/server/Dockerfile
@@ -3,7 +3,7 @@ FROM node:22.14.0-bullseye-slim AS builder
# Install native dependencies since we might be building cross-platform.
WORKDIR /usr/src/app/build
- COPY ./dist/package.json ./dist/pnpm-lock.yaml /usr/src/app/
+ COPY ./dist/package.json ./dist/pnpm-lock.yaml ./docker/pnpm-workspace.yaml /usr/src/app/
RUN pnpm install --frozen-lockfile --prod && pnpm rebuild
FROM node:22.14.0-bullseye-slim
diff --git a/apps/server/Dockerfile.alpine b/apps/server/Dockerfile.alpine
index 1f27b94005..d5b68c1fbe 100644
--- a/apps/server/Dockerfile.alpine
+++ b/apps/server/Dockerfile.alpine
@@ -3,7 +3,7 @@ FROM node:22.14.0-alpine AS builder
# Install native dependencies since we might be building cross-platform.
WORKDIR /usr/src/app
- COPY ./dist/package.json ./dist/pnpm-lock.yaml /usr/src/app/
+ COPY ./dist/package.json ./dist/pnpm-lock.yaml ./docker/pnpm-workspace.yaml /usr/src/app/
RUN pnpm install --frozen-lockfile --prod && pnpm rebuild
FROM node:22.14.0-alpine
diff --git a/apps/server/docker/pnpm-workspace.yaml b/apps/server/docker/pnpm-workspace.yaml
new file mode 100644
index 0000000000..e7727cc4de
--- /dev/null
+++ b/apps/server/docker/pnpm-workspace.yaml
@@ -0,0 +1,2 @@
+onlyBuiltDependencies:
+- better-sqlite3
diff --git a/apps/server/package.json b/apps/server/package.json
index 3594e94d20..dd39f50207 100644
--- a/apps/server/package.json
+++ b/apps/server/package.json
@@ -166,10 +166,10 @@
"defaultConfiguration": "alpine",
"configurations": {
"debian": {
- "command": "docker build . -t triliumnext -f Dockerfile"
+ "command": "docker build . -t triliumnext-debian -f Dockerfile"
},
"alpine": {
- "command": "docker build . -t triliumnext -f Dockerfile.alpine"
+ "command": "docker build . -t triliumnext-alpine -f Dockerfile.alpine"
}
}
},
@@ -177,7 +177,16 @@
"dependsOn": [
"docker-build"
],
- "command": "docker run -p 8081:8080 triliumnext"
+ "executor": "nx:run-commands",
+ "defaultConfiguration": "alpine",
+ "configurations": {
+ "debian": {
+ "command": "docker run -p 8081:8080 triliumnext-debian"
+ },
+ "alpine": {
+ "command": "docker run -p 8081:8080 triliumnext-alpine"
+ }
+ }
}
}
}