- Add detailed OAuth setup instructions for Google and Facebook in README - Include step-by-step guides with console URLs and configuration details - Document required environment variables for OAuth - Add deployment instructions with Docker build args - Update Dockerfile to accept OAuth credentials as build arguments - Support NEXT_PUBLIC_GOOGLE_CLIENT_ID and NEXT_PUBLIC_FACEBOOK_APP_ID This enables OAuth authentication while keeping it optional for deployments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
848 B
Docker
32 lines
848 B
Docker
# Étape 1 : Build
|
|
FROM node:20 AS builder
|
|
WORKDIR /app
|
|
|
|
# Build arguments for environment variables
|
|
ARG NEXT_PUBLIC_API_URL
|
|
ARG NEXT_PUBLIC_FRONTEND_URL
|
|
ARG NEXT_PUBLIC_GOOGLE_CLIENT_ID
|
|
ARG NEXT_PUBLIC_FACEBOOK_APP_ID
|
|
|
|
# Set environment variables for build
|
|
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
|
|
ENV NEXT_PUBLIC_FRONTEND_URL=$NEXT_PUBLIC_FRONTEND_URL
|
|
ENV NEXT_PUBLIC_GOOGLE_CLIENT_ID=$NEXT_PUBLIC_GOOGLE_CLIENT_ID
|
|
ENV NEXT_PUBLIC_FACEBOOK_APP_ID=$NEXT_PUBLIC_FACEBOOK_APP_ID
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Étape 2 : Exécution
|
|
FROM node:20-alpine AS runner
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
COPY --from=builder /app/.next .next
|
|
COPY --from=builder /app/public ./public
|
|
COPY --from=builder /app/package*.json ./
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
EXPOSE 3000
|
|
CMD ["npm", "run", "start"]
|