Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
junlarsen committed Mar 4, 2025
1 parent 8225c02 commit 5638784
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 31 deletions.
11 changes: 6 additions & 5 deletions apps/rpc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ COPY --from=builder /app/out/full/packages/db/prisma/schema.prisma packages/db/p
# Must enable scripts here for Prisma codegen to build
RUN apk update && apk add --no-cache python3 gcc g++ make
RUN pnpm install
COPY --from=builder /app/out/full .
RUN turbo run build --filter @dotkomonline/rpc

# Install for production
RUN pnpm install --production

FROM base AS runner
WORKDIR /app
Expand All @@ -38,7 +39,7 @@ RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 rpc
USER rpc

COPY --from=installer --chown=nodejs:rpc --chmod=755 /app/apps/rpc/dist/index.js ./
COPY --from=installer --chown=nodejs:rpc --chmod=755 /app/apps/rpc/package.json ./
COPY --from=installer --chown=rpc:nodejs --chmod=755 /app .
COPY --from=builder --chown=rpc:nodejs --chmod=755 /app/out/full .

CMD node index.js
CMD node --loader ./apps/rpc/runtime.mjs --experimental-strip-types ./apps/rpc/src/index.ts
3 changes: 0 additions & 3 deletions apps/rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"type": "module",
"scripts": {
"dev": "dotenv -o -- tsx watch src/index.ts",
"build": "tsup src/index.ts",
"docker:build": "docker build --platform linux/amd64 -t rpc:latest -f Dockerfile --progress plain ../..",
"lint": "biome check . --write",
"lint-check": "biome check .",
Expand All @@ -30,8 +29,6 @@
"@types/node": "^22.0.0",
"dotenv-cli": "^8.0.0",
"tslib": "^2.6.2",
"tsup": "^8.3.0",
"tsx": "^4.15.6",
"typescript": "^5.8"
}
}
3 changes: 1 addition & 2 deletions apps/rpc/runtime.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { URL } from "node:url"
import { existsSync } from "node:fs"
import path from "node:path"
import { URL } from "node:url"

export async function resolve(specifier, context, nextResolve) {
// Only handle relative or absolute paths without extensions
Expand Down
15 changes: 0 additions & 15 deletions apps/rpc/tsup.config.ts

This file was deleted.

6 changes: 0 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5638784

Please sign in to comment.