Refactor BigQuery credentials handling in DataProcessor to use base64 encoded credentials from environment variables. Update Dockerfile and docker-compose.yml to use Bun instead of Node.js, and remove pnpm configuration. Adjust health checks and commands for Redis and Postgres services in docker-compose.yml.

This commit is contained in:
Luke Hagar
2025-10-19 21:56:34 -05:00
parent 293f297804
commit 6f98d8ab3f
6 changed files with 719 additions and 2887 deletions

View File

@@ -1,4 +1,4 @@
FROM node:latest
FROM oven/bun:latest
# Install deps needed by Prisma and shell
RUN apt-get update && apt-get install -y openssl bash && rm -rf /var/lib/apt/lists/*
@@ -10,30 +10,27 @@ ARG DATABASE_URL
ENV DATABASE_URL=$DATABASE_URL
# Copy package manifests first for better cache
COPY package.json pnpm-lock.yaml* ./
# Enable and use pnpm via corepack
RUN corepack enable && corepack prepare pnpm@10.14.0 --activate
COPY package.json bun.lockb* ./
# Install dependencies (include devDependencies needed for build)
RUN pnpm install --frozen-lockfile --prod=false
RUN bun install --frozen-lockfile
# Copy the rest of the source
COPY . .
# Generate Prisma client and build SvelteKit (Node adapter)
RUN pnpm prisma generate
RUN bun run prisma generate
# Make sure SvelteKit has synced types/config now that config files are present
RUN pnpm run prepare
RUN bun run prepare
RUN pnpm build
RUN bun run build
ENV NODE_ENV=production
EXPOSE 3000
# Default command can be overridden by compose
CMD ["node", "build/index.js"]
CMD ["bun", "run", "build/index.js"]