Version 2.0.0 - update of everything
This commit is contained in:
57 files changed
+9407
-364
No files matched your search
+13
-2
@@ -1,4 +1,5 @@
|
||||
FROM node:lts
|
||||
# 1. Construction du site (Vite)
|
||||
FROM node:lts AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -10,8 +11,18 @@ COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# 2. Image finale : uniquement le dist/ construit et le serveur statique
|
||||
FROM node:lts-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install -g http-server
|
||||
|
||||
COPY --from=build /app/dist ./dist
|
||||
|
||||
EXPOSE 4001
|
||||
|
||||
CMD ["http-server", "dist", "-p", "4001", "-P", "http://localhost:4001?/"]
|
||||
# -c-1 : pas de cache navigateur longue durée, sinon après un déploiement index.html (mis en cache 1 h)
|
||||
# peut référencer des assets hachés qui n'existent plus
|
||||
# -P : toute route inconnue renvoie index.html (routeur Vue en mode history)
|
||||
CMD ["http-server", "dist", "-p", "4001", "-c-1", "-P", "http://localhost:4001?/"]
|
||||
Reference in new issue
Block a user