Skip to content

Commit

Permalink
Rollback dockerfile to use node to run server
Browse files Browse the repository at this point in the history
Bun has a weird bug where it returns null JSON in production
  • Loading branch information
yamalight committed Oct 15, 2024
1 parent 67d135d commit 451b90f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ COPY . .
RUN bun run build

# run app
FROM node:22-slim AS runner
ENV CI=true
ENV NODE_ENV=production

WORKDIR /app

COPY --from=base /app /app

EXPOSE 3000
ENV HOSTNAME=0.0.0.0
ENV PORT=3000

CMD ["bun", "run", "start"]
CMD ["npm", "run", "start"]
3 changes: 2 additions & 1 deletion packages/litlytics/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "litlytics",
"module": "dist/litlytics.js",
"main": "dist/litlytics.js",
"types": "litlytics.ts",
"type": "module",
"version": "0.3.0",
"version": "0.3.1",
"scripts": {
"build": "bun run build.ts",
"typecheck": "tsc",
Expand Down

0 comments on commit 451b90f

Please sign in to comment.