mirror of
https://github.com/LukeHagar/pypistats.dev.git
synced 2025-12-06 04:21:09 +00:00
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:
17
Dockerfile
17
Dockerfile
@@ -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"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user