fix: mount /apps and docker socket in PR workflow build-and-deploy-ci job (#41)
Build CI Images / build-ci-base (push) Successful in 1m53s
Release / release (push) Failing after 12m42s

Reviewed-on: #41
Co-authored-by: David Gwilliam <dhgwilliam@gmail.com>
Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
This commit was merged in pull request #41.
This commit is contained in:
2026-05-20 19:51:35 +00:00
committed by david
parent 861e14503b
commit e455d5dba5
41 changed files with 11130 additions and 533 deletions
+11 -11
View File
@@ -4,7 +4,7 @@
FROM oven/bun:alpine AS builder
# Install dependencies (needed for native modules)
RUN apk add --no-cache python3 make g++
RUN apk add --no-cache python3 make g++ nodejs npm
# Set working directory
WORKDIR /app
@@ -13,14 +13,14 @@ WORKDIR /app
COPY package*.json ./
# Install dependencies (including dev dependencies for building)
RUN bun install
RUN npm ci --legacy-peer-deps
# Copy source code
COPY . .
# Generate Prisma client (with dummy PostgreSQL DATABASE_URL for build-time generation)
# Note: A dummy URL is used since the real database is not available during build
RUN DATABASE_PROVIDER=postgresql DATABASE_URL="postgresql://user:pass@localhost:5432/dummy" bun x prisma generate
RUN DATABASE_PROVIDER=postgresql DATABASE_URL="postgresql://user:pass@localhost:5432/dummy" npx prisma generate
# Build the application (with dummy DATABASE_URL for static page generation and git commit)
ARG GIT_COMMIT=unknown
@@ -30,7 +30,7 @@ RUN DATABASE_PROVIDER=postgresql DATABASE_URL="postgresql://user:pass@localhost:
FROM oven/bun:alpine AS test-runner
# Install dependencies
RUN apk add --no-cache python3 make g++ git
RUN apk add --no-cache python3 make g++ git nodejs npm
# Set working directory
WORKDIR /app
@@ -39,19 +39,19 @@ WORKDIR /app
COPY package*.json ./
# Install ALL dependencies (including dev dependencies for testing)
RUN bun install
RUN npm ci --legacy-peer-deps
# Copy source code
COPY . .
# Generate Prisma client
RUN DATABASE_PROVIDER=postgresql DATABASE_URL="postgresql://user:pass@localhost:5432/dummy" bun x prisma generate
RUN DATABASE_PROVIDER=postgresql DATABASE_URL="postgresql://user:pass@localhost:5432/dummy" npx prisma generate
# Stage 3: Production runner
FROM oven/bun:alpine AS runner
# Install dumb-init for proper signal handling
RUN apk add --no-cache dumb-init
# Install dumb-init and npm for production install
RUN apk add --no-cache dumb-init nodejs npm
# Create non-root user
RUN addgroup --system --gid 1001 euchre && \
@@ -64,15 +64,15 @@ WORKDIR /app
COPY --from=builder --chown=euchre:euchre /app/.next ./.next
COPY --from=builder --chown=euchre:euchre /app/public ./public
COPY --from=builder --chown=euchre:euchre /app/package.json ./package.json
COPY --from=builder --chown=euchre:euchre /app/bun.lock ./bun.lock
COPY --from=builder --chown=euchre:euchre /app/package-lock.json ./package-lock.json
COPY --from=builder --chown=euchre:euchre /app/prisma ./prisma
# Install only production dependencies
RUN bun install --production
RUN npm ci --legacy-peer-deps --omit=dev
# Generate Prisma client
# Note: We need to set DATABASE_URL even for generation because prisma.config.ts requires it
RUN DATABASE_PROVIDER=postgresql DATABASE_URL="postgresql://user:pass@localhost:5432/dummy" bun x prisma generate
RUN DATABASE_PROVIDER=postgresql DATABASE_URL="postgresql://user:pass@localhost:5432/dummy" npx prisma generate
# Switch to non-root user
USER euchre