mirror of
https://github.com/arthur-pbty/calculatrice.git
synced 2026-06-03 15:07:19 +02:00
8400e26c0a
- 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.
26 lines
715 B
Docker
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"] |