feat: Astro starter kit minimal et élégant
- Design minimal monochrome (fond blanc, typo Inter) - Navigation avec Navbar (Home/About) - Pages index et about - Configuration Docker optimisée avec nginx - SEO et performance optimisés - Prêt pour la production
This commit is contained in:
29
Dockerfile
29
Dockerfile
@@ -1,10 +1,31 @@
|
||||
# Multi-stage build pour Astro
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copier les fichiers de dépendances
|
||||
COPY package*.json ./
|
||||
|
||||
# Installer les dépendances
|
||||
RUN npm ci
|
||||
|
||||
# Copier le code source
|
||||
COPY . .
|
||||
|
||||
# Build du projet Astro
|
||||
RUN npm run build
|
||||
|
||||
# Stage de production avec nginx
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy static assets to nginx default html folder
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
# Copier les fichiers statiques générés
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# Expose port 80
|
||||
# Copier la configuration nginx personnalisée
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Exposer le port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Start nginx in foreground
|
||||
# Démarrer nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user