up angular-basic with lib setup
This commit is contained in:
		
							parent
							
								
									b9f3e4769e
								
							
						
					
					
						commit
						4d3a3d34b8
					
				
					 147 changed files with 15408 additions and 16030 deletions
				
			
		
							
								
								
									
										53
									
								
								angular-basic/Dockerfile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								angular-basic/Dockerfile
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,53 @@ | |||
| # --- Build stage --- ## Forcing rebuild 1 | ||||
| 
 | ||||
| FROM node:24 AS build | ||||
| 
 | ||||
| WORKDIR /app | ||||
| 
 | ||||
| # Copier l'application Angular et la librairie locale | ||||
| # On attend un contexte de build à la racine du repo pour inclure my-workspace | ||||
| COPY angular-basic /app/angular-basic | ||||
| COPY my-workspace /app/my-workspace | ||||
| 
 | ||||
| # Définir le répertoire de travail sur l'application | ||||
| WORKDIR /app/angular-basic | ||||
| 
 | ||||
| RUN echo "============= run setup script " | ||||
| 
 | ||||
| RUN ./setup.sh | ||||
| 
 | ||||
| # Construire le projet Angular (production) | ||||
| 
 | ||||
| RUN npm run build | ||||
| 
 | ||||
| # --- Production stage --- | ||||
| 
 | ||||
| FROM nginx:1.27-alpine AS production | ||||
| 
 | ||||
| #RUN apk add --no-cache bash nano wget | ||||
| 
 | ||||
| # Nettoyer les fichiers nginx par défaut | ||||
| 
 | ||||
| RUN rm -rf /usr/share/nginx/html/* | ||||
| 
 | ||||
| # Copier la sortie du build (on testera le bon chemin ensuite) | ||||
| 
 | ||||
| #COPY --from=build /app/dist /usr/share/nginx/html | ||||
| 
 | ||||
| COPY --from=build /app/angular-basic/dist/angular-basic/browser/* /usr/share/nginx/html | ||||
| 
 | ||||
| RUN echo "============= liste des fichiers dans nginx html" | ||||
| 
 | ||||
| RUN ls -l "/usr/share/nginx/html" | ||||
| 
 | ||||
| RUN echo "=============" | ||||
| 
 | ||||
| # 🔹 Exposer le port par défaut d'nginx (80) | ||||
| EXPOSE 80 | ||||
| 
 | ||||
| HEALTHCHECK --interval=30s --timeout=10s --retries=3 \ | ||||
| CMD wget -qO- http://localhost:80/ || exit 1 | ||||
| 
 | ||||
| RUN echo "servir le front static CSC: done." | ||||
| 
 | ||||
| CMD ["nginx", "-g", "daemon off;"] | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tykayn
						Tykayn