neptune-front/Dockerfile
Mathis a75a87f683
Add initial Neptune Frontend setup
Initial setup of the Neptune frontend project, including Dockerfile, environment files, TypeScript configuration, and essential components. Added basic page structures for dashboard and wallet, and configured Tailwind CSS and postcss.
2024-11-14 11:10:32 +01:00

31 lines
712 B
Docker

# Étape 1 : Build
FROM node:18-alpine AS builder
WORKDIR /app
RUN npm install -g pnpm
# Copier package.json et installer les dépendances
COPY pnpm-lock.yaml ./
COPY package.json ./
RUN pnpm install
# Copier le reste du code et construire l'application
COPY . .
RUN pnpm run build
# Étape 2 : Serveur de production
FROM node:18-alpine
WORKDIR /app
# Copier uniquement les fichiers nécessaires
COPY --from=builder /app/package.json ./
COPY --from=builder /app/pnpm-lock.yaml ./
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/node_modules ./node_modules
# Exposer le port de l'application
EXPOSE 3000
# Commande de démarrage
CMD ["npm", "start"]