Some checks failed
CI/CD - Francia Ocupada (La Resistencia) / build-and-deploy (push) Failing after 6s
32 lines
626 B
Docker
32 lines
626 B
Docker
FROM node:20-alpine
|
|
|
|
# Build arguments
|
|
ARG NEXT_PUBLIC_API_URL=http://localhost:4000
|
|
ARG NEXT_PUBLIC_ADMIN_PASSWORD=admin123
|
|
|
|
# Make args available as env vars during build
|
|
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
|
|
ENV NEXT_PUBLIC_ADMIN_PASSWORD=$NEXT_PUBLIC_ADMIN_PASSWORD
|
|
|
|
# Create app directory
|
|
WORKDIR /app
|
|
|
|
# Copy shared module first (as a sibling to client)
|
|
COPY shared ./shared
|
|
|
|
# Setup Client directory
|
|
WORKDIR /app/client
|
|
|
|
# Install dependencies
|
|
COPY client/package*.json ./
|
|
RUN npm install
|
|
|
|
# Copy client source code
|
|
COPY client/ .
|
|
|
|
# Expose port
|
|
EXPOSE 3000
|
|
|
|
# Run Next.js in dev mode
|
|
CMD ["npx", "next", "dev"]
|