new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Bun · all subjects

deployment/digitalocean

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Dockerfile for Bun on DigitalOcean

A Dockerfile for deploying a Bun application on DigitalOcean uses the official Bun image as the base. The typical structure sets the working directory to /app, copies package.json and bun.lock, installs dependencies with `bun install --production --frozen-lockfile`, copies the application files, exposes port 8080, and runs the entry point command such as `bun index.ts` or `bun run start`. The start command must match the application's entry point.

Docker build command for DigitalOcean on ARM Mac

When building on an ARM Mac (M1/M2), use `docker buildx build --platform=linux/amd64` to ensure compatibility with DigitalOcean's infrastructure. Building without the platform flag creates an ARM64 image that will not run on DigitalOcean. The full command is: `docker buildx build --platform=linux/amd64 -t registry.digitalocean.com/bun-digitalocean-demo/bun-digitalocean-demo:latest --push .`

DigitalOcean authentication for Docker

Before building and pushing a Docker image to DigitalOcean's Container Registry, authenticate Docker with the registry using `doctl registry login`. This command uses your DigitalOcean credentials. Without this step, the build and push command fails with a 401 authentication error.

Prerequisites for deploying Bun to DigitalOcean

Before deploying a Bun application to DigitalOcean, you must have: a Bun application ready for deployment, a DigitalOcean account, the DigitalOcean CLI (doctl) installed and configured, and Docker installed and added to your PATH.

Give your agent this brain