diff --git a/infrastructure/caddy/config/bensuperpc.org/Caddyfile b/infrastructure/caddy/config/bensuperpc.org/Caddyfile index d8b5ea8..a48ff04 100644 --- a/infrastructure/caddy/config/bensuperpc.org/Caddyfile +++ b/infrastructure/caddy/config/bensuperpc.org/Caddyfile @@ -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 { reverse_proxy adminer:8080 } @@ -97,10 +107,6 @@ syncthing.bensuperpc.org { } } -it-tools.bensuperpc.org { - reverse_proxy it-tools:80 -} - tools.bensuperpc.org { redir https://it-tools.bensuperpc.org permanent } diff --git a/infrastructure/homepage/config/services.yaml b/infrastructure/homepage/config/services.yaml index 21da5de..2f09480 100644 --- a/infrastructure/homepage/config/services.yaml +++ b/infrastructure/homepage/config/services.yaml @@ -84,7 +84,7 @@ href: https://it-tools.bensuperpc.org/ description: IT Tools ping: it-tools.bensuperpc.org - container: it-tools + container: it-tools0 - gitea: icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/gitea.png diff --git a/infrastructure/it-tools/docker-compose.it-tools.yml b/infrastructure/it-tools/docker-compose.it-tools.yml index d938520..c2e7f21 100644 --- a/infrastructure/it-tools/docker-compose.it-tools.yml +++ b/infrastructure/it-tools/docker-compose.it-tools.yml @@ -1,8 +1,29 @@ services: # it-tools - it-tools: + it-tools0: 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: - it-tools restart: on-failure:5