DOCKER / Revert to old

This commit is contained in:
2025-10-04 19:10:25 +02:00
parent 497eeb5081
commit 39bbad8f33
2 changed files with 10 additions and 24 deletions

View File

@@ -1,28 +1,15 @@
FROM node:lts-alpine FROM node:lts-alpine
# installe un simple serveur http pour servir un contenu statique
# installer les dépendances système nécessaires pour build Vue
RUN apk add --no-cache python3 make g++ git
# installe http-server globalement
RUN npm install -g http-server RUN npm install -g http-server
# définit le dossier 'app' comme dossier de travail
# définit le dossier de travail
WORKDIR /app WORKDIR /app
# copie 'package.json' et 'package-lock.json' (si disponible)
# copie package.json et package-lock.json
COPY package*.json ./ COPY package*.json ./
# installe les dépendances du projet # installe les dépendances du projet
RUN npm install RUN npm install
# copie les fichiers et dossiers du projet dans le dossier de travail (par exemple : le dossier 'app')
# copie tout le projet
COPY . . COPY . .
# construit l'app pour la production en la minifiant
# construit l'app pour la production
RUN npm run build RUN npm run build
# expose le port
EXPOSE 4001 EXPOSE 4001
CMD [ "http-server", "dist", "-p", "4001", "-P", "http://localhost:4001?/" ]
# lance http-server sur dist avec redirection pour Vue Router
CMD ["http-server", "dist", "-p", "4001", "-P", "http://localhost:4001?/"]

View File

@@ -1,14 +1,13 @@
version: "3.9"
services: services:
subsonics-frontend: subsonics-frontend:
build: build:
context: . context: . # dossier contenant ton Dockerfile et ton code
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: subsonics-frontend container_name: subsonics-frontend
ports: ports:
- "4001:4001" - "4001:4001"
volumes:
- subsonics-frontend:/app/dist
restart: unless-stopped restart: unless-stopped
volumes: volumes:
subsonics-frontend: subsonics-frontend: