feat(docker): ajouter Dockerfile et docker-compose pour la configuration de l'environnement
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
FROM node:20-alpine AS build
|
||||
|
||||
# Dépendances système utiles (optionnel)
|
||||
RUN apk add --no-cache git
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copie package.json et package-lock.json si présent
|
||||
COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
|
||||
# Installation des dépendances
|
||||
RUN npm install
|
||||
|
||||
# Copie du reste du code
|
||||
COPY . .
|
||||
|
||||
# Expose le port utilisé par hugo server
|
||||
EXPOSE 1313
|
||||
|
||||
# Commande de démarrage
|
||||
CMD ["npm", "run", "start"]
|
||||
@@ -0,0 +1,11 @@
|
||||
version: '3.9'
|
||||
|
||||
services:
|
||||
front:
|
||||
image: hugomods/hugo:latest
|
||||
ports:
|
||||
- "127.0.0.1:1313:1313"
|
||||
volumes:
|
||||
- ".:/src"
|
||||
command: >
|
||||
npm run dev
|
||||
Reference in New Issue
Block a user