mirror of
				https://github.com/bensuperpc/infrastructure.git
				synced 2025-10-26 23:06:20 +01:00 
			
		
		
		
	Add test load balancer
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
		| @@ -47,6 +47,16 @@ wordpress.bensuperpc.org { | |||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | it-tools.bensuperpc.org { | ||||||
|  | 	# Load balance between 2 instances | ||||||
|  | 	reverse_proxy { | ||||||
|  | 		to it-tools0:80 it-tools1:80 | ||||||
|  | 		lb_policy round_robin | ||||||
|  | 		lb_retries 3 | ||||||
|  | 		lb_try_interval 1s | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  |  | ||||||
| adminer.bensuperpc.org { | adminer.bensuperpc.org { | ||||||
| 	reverse_proxy adminer:8080 | 	reverse_proxy adminer:8080 | ||||||
| } | } | ||||||
| @@ -97,10 +107,6 @@ syncthing.bensuperpc.org { | |||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
| it-tools.bensuperpc.org { |  | ||||||
| 	reverse_proxy it-tools:80 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| tools.bensuperpc.org { | tools.bensuperpc.org { | ||||||
| 	redir https://it-tools.bensuperpc.org permanent | 	redir https://it-tools.bensuperpc.org permanent | ||||||
| } | } | ||||||
|   | |||||||
| @@ -84,7 +84,7 @@ | |||||||
|         href: https://it-tools.bensuperpc.org/ |         href: https://it-tools.bensuperpc.org/ | ||||||
|         description: IT Tools |         description: IT Tools | ||||||
|         ping: it-tools.bensuperpc.org |         ping: it-tools.bensuperpc.org | ||||||
|         container: it-tools |         container: it-tools0 | ||||||
|  |  | ||||||
|     - gitea: |     - gitea: | ||||||
|         icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/gitea.png |         icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/gitea.png | ||||||
|   | |||||||
| @@ -1,8 +1,29 @@ | |||||||
| services: | services: | ||||||
|   # it-tools |   # it-tools | ||||||
|   it-tools: |   it-tools0: | ||||||
|     image: corentinth/it-tools:latest |     image: corentinth/it-tools:latest | ||||||
|     container_name: it-tools |     container_name: it-tools0 | ||||||
|  |     profiles: | ||||||
|  |       - it-tools | ||||||
|  |     restart: on-failure:5 | ||||||
|  |     depends_on: | ||||||
|  |       - caddy | ||||||
|  |     networks: | ||||||
|  |       - infra-network | ||||||
|  |     security_opt: | ||||||
|  |       - no-new-privileges:true | ||||||
|  |     read_only: false | ||||||
|  |     deploy: | ||||||
|  |       resources: | ||||||
|  |         limits: | ||||||
|  |           cpus: '0.5' | ||||||
|  |           memory: 512M | ||||||
|  |         reservations: | ||||||
|  |           cpus: '0.001' | ||||||
|  |           memory: 20M | ||||||
|  |   it-tools1: | ||||||
|  |     image: corentinth/it-tools:latest | ||||||
|  |     container_name: it-tools1 | ||||||
|     profiles: |     profiles: | ||||||
|       - it-tools |       - it-tools | ||||||
|     restart: on-failure:5 |     restart: on-failure:5 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user