Allow running several instances

This commit is contained in:
Daniel Berteaud 2024-02-05 12:17:32 +01:00
parent 10ad6e6bc3
commit 1264ba8579
4 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,4 @@
FROM danielberteaud/alpine:24.1-8
FROM danielberteaud/alpine:24.2-1
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
ENV SQUID_CONFDIR=/etc/squid \

View File

@ -9,6 +9,8 @@ job "squid" {
mode = "bridge"
}
count = 1
service {
name = "squid"
port = 3128
@ -43,7 +45,7 @@ job "squid" {
driver = "docker"
config {
image = "danielberteaud/squid:24.1-1"
image = "danielberteaud/squid:24.2-1"
readonly_rootfs = true
pids_limit = 100
volumes = [

View File

@ -9,6 +9,8 @@ job "[[ .instance ]]" {
mode = "bridge"
}
count = [[ $c.count ]]
service {
name = "[[ .instance ]][[ .consul.suffix ]]"
port = 3128

View File

@ -6,7 +6,10 @@ instance: squid
squid:
# Docker image to use
image: '[[ .docker.repo ]]squid:24.1-1'
image: '[[ .docker.repo ]]squid:24.2-1'
# Number of instances to run:
count: 1
# Resources
resources: