openstatus icon indicating copy to clipboard operation
openstatus copied to clipboard

Fix #974: Use bun compile for API server

Open sreeharsha-rav opened this issue 1 year ago • 2 comments

Type of change

  • [ ] 🐛 Bug fix
  • [x] 🌟 New feature
  • [ ] 🔨 Breaking change
  • [x] 📖 Refactoring / dependency upgrade / documentation

Description

This PR implements the use of bun compile for the API server. The main changes include:

  1. Modified the Dockerfile to use bun build --compile instead of directly running the server with bun start.
  2. Adjusted the Docker build process to work from the project root, ensuring all workspace dependencies are available.
  3. Updated the CMD instruction to run the compiled binary instead of using bun start.

These changes result in a significant reduction in initial memory usage, from 156 MB to 99 MB, potentially improving performance and resource efficiency.

Build Successful:

Closes #974

sreeharsha-rav avatar Aug 05 '24 19:08 sreeharsha-rav

@sreeharsha-rav is attempting to deploy a commit to the OpenStatus Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Aug 05 '24 19:08 vercel[bot]

why are you raise a PR ? I am working on this issue .

Ratnadeep2k avatar Aug 05 '24 20:08 Ratnadeep2k