Files
calculatrice/Dockerfile
T
Puechberty Arthur 8400e26c0a Refactor Dockerfile, update README, and enhance Calculator component
- Refactored Dockerfile for improved multi-stage builds and added development and production configurations.
- Updated README with clearer project description, local development instructions, and added contact information.
- Enhanced Calculator component to manage theme and history using localStorage, improving user experience.
- Added new pages for legal mentions and privacy policy, including relevant metadata.
- Updated docker-compose.yml for better service management and added environment variables.
- Introduced a new LICENSE file outlining usage rights and responsibilities.
2026-04-01 23:30:51 +02:00

26 lines
715 B
Docker

FROM node:22-alpine AS calculatrice-base
WORKDIR /app
ENV NEXT_TELEMETRY_DISABLED=1
FROM calculatrice-base AS calculatrice-deps
COPY package.json package-lock.json ./
RUN npm ci
FROM calculatrice-deps AS calculatrice-dev
COPY . .
EXPOSE 3000
CMD ["npm", "run", "dev", "--", "--hostname", "0.0.0.0", "--port", "3000"]
FROM calculatrice-deps AS calculatrice-builder
COPY . .
RUN npm run build
FROM calculatrice-base AS calculatrice-runner
ENV NODE_ENV=production
ENV HOSTNAME=0.0.0.0
ENV PORT=3000
COPY --from=calculatrice-builder /app/.next/standalone ./
COPY --from=calculatrice-builder /app/.next/static ./.next/static
COPY --from=calculatrice-builder /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]