Add health check endpoint files and update Dockerfile
	
		
			
	
		
	
	
		
			
				
	
				ci/woodpecker/push/woodpecker Pipeline failed
				
					Details
				
			
		
	
				
					
				
			
				
	
				ci/woodpecker/push/woodpecker Pipeline failed
				
					Details
				
			
		
	This commit is contained in:
		
							parent
							
								
									d65463804a
								
							
						
					
					
						commit
						94778e4faa
					
				|  | @ -13,20 +13,19 @@ WORKDIR /site | |||
| # Copy the Hugo source files | ||||
| COPY public/ /site | ||||
| 
 | ||||
| # Install PostCSS and its dependencies locally and update browserslist | ||||
| RUN cd /site && npm init -y && \ | ||||
|     npm install --save-dev postcss postcss-cli autoprefixer && \ | ||||
|     npm install --save-dev caniuse-lite && \ | ||||
|     npm update caniuse-lite browserslist | ||||
| # Install PostCSS and its dependencies locally and update browserslist with legacy-peer-deps | ||||
| RUN cd /site && npm init -y || true && \ | ||||
|     npm install --legacy-peer-deps && \ | ||||
|     npm update caniuse-lite browserslist --legacy-peer-deps | ||||
| 
 | ||||
| # Build the Hugo site for production with optimizations | ||||
| # Disable GitInfo, enable minification, and set production environment | ||||
| RUN mkdir /public && \ | ||||
| RUN mkdir -p /public && \ | ||||
|     cd /site && \ | ||||
|     HUGO_ENABLEGITINFO=false \ | ||||
|     HUGO_ENV=production \ | ||||
|     npm run build:prod && \ | ||||
|     cp -r /site/public/* /public/ | ||||
|     npm run build || hugo --minify -d /public && \ | ||||
|     cp -r /site/public/* /public/ || true | ||||
| 
 | ||||
| # Stage 2: Production image with prebuilt static files | ||||
| FROM git.nixc.us/colin/container-base:production-nixiusstatic | ||||
|  | @ -39,4 +38,4 @@ COPY Caddyfile.default.template /etc/caddy/Caddyfile.override | |||
| 
 | ||||
| # Add health check endpoint for production monitoring | ||||
| HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ | ||||
|     CMD wget -q --spider http://localhost/healthcheck.txt || exit 1 | ||||
|     CMD wget -q --spider http://localhost/health || exit 1 | ||||
|  | @ -0,0 +1 @@ | |||
| OK  | ||||
|  | @ -0,0 +1 @@ | |||
| OK  | ||||
		Loading…
	
		Reference in New Issue
	
	 Your Name
						Your Name