forked from coop-cloud/traefik
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			2.6.2+v2.1
			...
			error-mess
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b209bbb2d1 | |||
| 0a050e5977 | 
@ -15,6 +15,9 @@ COMPOSE_FILE="compose.yml"
 | 
				
			|||||||
# General settings                                                  #
 | 
					# General settings                                                  #
 | 
				
			||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Error pages
 | 
				
			||||||
 | 
					COMPOSE_FILE="$COMPOSE_FILE:compose.error-pages.yml"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Host-mode networking
 | 
					## Host-mode networking
 | 
				
			||||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.host.yml"
 | 
					#COMPOSE_FILE="$COMPOSE_FILE:compose.host.yml"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										31
									
								
								compose.error-pages.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								compose.error-pages.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,31 @@
 | 
				
			|||||||
 | 
					version: '3.8'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					services:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  app:
 | 
				
			||||||
 | 
					    command:
 | 
				
			||||||
 | 
					      - --providers.docker
 | 
				
			||||||
 | 
					      - --experimental.plugins.staticresponse.modulename=github.com/jdel/staticresponse
 | 
				
			||||||
 | 
					      - --experimental.plugins.staticresponse.version=v0.0.1
 | 
				
			||||||
 | 
					    deploy:
 | 
				
			||||||
 | 
					      labels:
 | 
				
			||||||
 | 
					        # custom traefik errors
 | 
				
			||||||
 | 
					        - "traefik.http.middlewares.web-secure.errors.status=400-599"
 | 
				
			||||||
 | 
					        - "traefik.http.middlewares.web-secure.errors.service=down-rule"
 | 
				
			||||||
 | 
					        - "traefik.http.middlewares.web-secure.errors.query=/traefik-http-error/{status}"
 | 
				
			||||||
 | 
					        # catchall rule
 | 
				
			||||||
 | 
					        - "traefik.http.routers.http-catchall.entrypoints=web-secure"
 | 
				
			||||||
 | 
					        - "traefik.http.routers.http-catchall.rule=PathPrefix(`/`)"
 | 
				
			||||||
 | 
					        # lowest possible priority, evaluated when no other router is matched
 | 
				
			||||||
 | 
					        - "traefik.http.routers.http-catchall.priority=1"
 | 
				
			||||||
 | 
					        - "traefik.http.routers.http-catchall.middlewares=503down"
 | 
				
			||||||
 | 
					        # static error message
 | 
				
			||||||
 | 
					        - "traefik.http.middlewares.503down.plugin.staticresponse"
 | 
				
			||||||
 | 
					        - "traefik.http.middlewares.503down.plugin.staticresponse.StatusCode=503"
 | 
				
			||||||
 | 
					        - "traefik.http.middlewares.503down.plugin.staticresponse.Body=Sorry, currently under maintenance. Please try again later."
 | 
				
			||||||
 | 
					        # error page
 | 
				
			||||||
 | 
					        - "traefik.http.routers.down-rule.rule=PathPrefix(`/traefik-http-error`)"
 | 
				
			||||||
 | 
					        - "traefik.http.routers.down-rule.service=noop@internal"
 | 
				
			||||||
 | 
					        - "traefik.http.routers.down-rule.entrypoints=web-secure"
 | 
				
			||||||
 | 
					        - "traefik.http.routers.down-rule.middlewares=503down"
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
		Reference in New Issue
	
	Block a user