feat(deploy): convert Dockerfile to high-performance oven/bun and remove legacy package-lock

This commit is contained in:
2026-05-29 13:49:31 -07:00
parent 221aee06e2
commit 98e75b81b5
2 changed files with 13 additions and 2990 deletions

View File

@@ -1,46 +1,25 @@
FROM node:20-slim FROM oven/bun:1.1-slim
# Install ripgrep, git, and docker CLI
RUN apt-get update && apt-get install -y --no-install-recommends \
ripgrep \
git \
ca-certificates \
curl \
gnupg \
&& install -m 0755 -d /etc/apt/keyrings \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
&& chmod a+r /etc/apt/keyrings/docker.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
> /etc/apt/sources.list.d/docker.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends docker-ce-cli \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app WORKDIR /app
# Install all deps including devDeps (tsc needs them). # Install git/curl for healthchecks or db utility scripts
# Override NODE_ENV so Coolify's build-time NODE_ENV=production doesn't skip devDeps. RUN apt-get update && apt-get install -y --no-install-recommends \
COPY package*.json ./ git \
RUN NODE_ENV=development npm ci curl \
&& rm -rf /var/lib/apt/lists/*
# Copy source and compile COPY package.json ./
# Install dependencies using bun
RUN bun install
# Copy source configurations
COPY tsconfig.json ./ COPY tsconfig.json ./
COPY src/ ./src/ COPY src/ ./src/
RUN npm run build
# Prune dev deps after build
RUN npm prune --omit=dev
# Create workspace dir
RUN mkdir -p /workspaces
# Git identity for commits made by agents
RUN git config --global user.email "agent@vibnai.com" && \
git config --global user.name "Vibn Agent Runner"
EXPOSE 3333 EXPOSE 3333
ENV NODE_ENV=production ENV NODE_ENV=production
ENV PORT=3333 ENV PORT=3333
CMD ["node", "dist/server.js"] CMD ["bun", "run", "src/index.ts"]

2956
package-lock.json generated

File diff suppressed because it is too large Load Diff